You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Ashish Kumar9 <as...@in.ibm.com> on 2016/11/16 08:25:11 UTC

Solr Start-Up Error

Hi 

I am facing below exception issue when starting Solr in standalone mode on 
my environment 

Solr Version : 6.2.0 

I downloaded solr and built the source successfully it got built . During 
executing I first tried to run the built package and I got below exception 
....

=================================================================================
[root@sys-77402 solr]# bin/solr start -f
Starting Solr on port 8983 from 
/tempdisk/software/mhahadoopdistro/solr-6.2.0/solr/server
The stack size specified is too small, Specify at least 328k
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
[root@sys-77402 solr]# 
=====================================================================================

Then I thought this is generic java issue . and I specified the flag to 
bump up the memory available for jvm stack size 

#export _JAVA_OPTIONS="-Xss1g"

But when I further tried to start solr , I got below exception 

Starting Solr on port 8983 from 
/tempdisk/software/mhahadoopdistro/solr-6.2.0/solr/server

Picked up _JAVA_OPTIONS: -Xss1g -Xms5g -Xmx8g -Xrs
2016-11-16 06:26:51.614:INFO::main: Logging initialized @480ms
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.eclipse.jetty.start.Main.invokeMain(Main.java:214)
        at org.eclipse.jetty.start.Main.start(Main.java:457)
        at org.eclipse.jetty.start.Main.main(Main.java:75)
Caused by: java.lang.StackOverflowError
        at 
java.util.concurrent.ConcurrentHashMap.tabAt(ConcurrentHashMap.java:755)
        at 
java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1018)
        at 
java.util.concurrent.ConcurrentHashMap.putIfAbsent(ConcurrentHashMap.java:1535)
        at java.lang.ClassLoader.getClassLoadingLock(ClassLoader.java:463)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:404)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
        at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
        at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
        at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
        at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
        at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at org.eclipse.jetty.util.Loader.loadClass(Loader.java:86)
        at 
org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.nodeClass(XmlConfiguration.java:368)
        at 
org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configure(XmlConfiguration.java:306)
        at 
org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:259)
        at 
org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1498)
        at java.security.AccessController.doPrivileged(Native Method)
        at 
org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1435)
        ... 7 more

Usage: java -jar start.jar [options] [properties] [configs]
       java -jar start.jar --help  # for more information
[root@sys-77402 bin]# 

Thanks
Ashish


Re: Solr Start-Up Error

Posted by Shawn Heisey <ap...@elyograg.org>.
On 11/16/2016 1:25 AM, Ashish Kumar9 wrote:
> Solr Version : 6.2.0 
>
> I downloaded solr and built the source successfully it got built . During 
> executing I first tried to run the built package and I got below exception 
<snip>
> Then I thought this is generic java issue . and I specified the flag to 
> bump up the memory available for jvm stack size 
>
> #export _JAVA_OPTIONS="-Xss1g"
>
> But when I further tried to start solr , I got below exception 
>
> Starting Solr on port 8983 from 
> /tempdisk/software/mhahadoopdistro/solr-6.2.0/solr/server
>
> Picked up _JAVA_OPTIONS: -Xss1g -Xms5g -Xmx8g -Xrs
> 2016-11-16 06:26:51.614:INFO::main: Logging initialized @480ms
> java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:497)
>         at org.eclipse.jetty.start.Main.invokeMain(Main.java:214)
>         at org.eclipse.jetty.start.Main.start(Main.java:457)
>         at org.eclipse.jetty.start.Main.main(Main.java:75)
> Caused by: java.lang.StackOverflowError

Some initial questions:  Why are you building Solr?  If the source is
unmodified, the binary release should be identical in function. Why not
just download the binary and use it?  Why are you using 6.2.0, when
there is a 6.2.1 bugfix release that's been out for nearly a month and
fixes at least 15 bugs in 6.2.0?

The stacktrace for the second problem does not contain a single Apache
class.  It's all native Java and Jetty.  It complains about running out
of stack space while loading classes.

Solr's scripts default the stack size to 256kb.  Yes, that's kilobytes,
not even megabytes. This is even smaller than Java 8 itself will use for
the stack size by default (320kb for 32-bit, 1mb for 64-bit), and Solr's
default is plenty large enough for an unmodified Solr to start with no
problems.  By setting the stack size to 1GB, it is 4096 times as large
as what Solr chooses by default (translation -- really really large),
but you're still blowing the stack.  That's a LOT of excess information
being loaded into memory.

Something about your install has been modified, so the first thing to do
is try an unmodified Solr.  If that works, then you would need to track
down the author of any modifications that you made, and ask them for
help.  If an unmodified download of the Solr binary install doesn't
work, then there's probably something about your environment that's bad.

Thanks,
Shawn