Cannot run solr (cannot open log file)

Zack picture Zack · May 10, 2016 · Viewed 7.2k times · Source

Been trying to get solr running for a while now... finally seemed like I got it. Following this tutorial. Ran this command

bin/solr start

And saw this text

Waiting up to 30 seconds to see Solr running on port 8983

But then...

Still not seeing Solr listening on 8983 after 30 seconds!
tail: cannot open `/root/downloads/solr-6.0.0/server/logs/solr.log' for reading: No such file or directory

This is getting highly frustrating. I tried to run the bin command with sudo, still no luck. What am I doing wrong?

EDIT : I ran it in the foreground with

bin/solr start -f

and got this

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/eclipse/jetty/start/Main : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:296)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:406)

My java-foo is not up to par, so I have no idea what to make of this.

Answer

Artem Dolobanko picture Artem Dolobanko · Dec 13, 2016

This issue could be related to RAM size on Solr node. If you are running Solr on VM with small RAM size, enabling swap or increasing RAM should resolve this.