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 Graeme Pietersz <gr...@pietersz.net> on 2015/01/13 09:37:00 UTC

Solr fails to start with log file not found error

I get this error when starting Solr using the script in bin/solr

tail cannot open `[path]/logs/solr.log’ for reading: No such file or directory

It does not happen every time, but it does happen a lot. It sometimes clears up after a while.

I have tried creating an empty file, but solr then just says:

Backing up [path]/logs/solr.log

And repeats the same error.

I am guessing the problem is that it cannot get the error from the log file because the log file has not been created yet, but then how do I debug this?

Running  Solr 4.10.2 on Debian 7 using Jetty with the default IcedTea 2.5.3 java version 1.7.0_65

Thanks for any help or pointers.

Re: Solr fails to start with log file not found error

Posted by awhosit <aw...@Gmail.com>.
Thanks for the reply, Shawn.
But it seems to give me only 1.7.

#sudo rpm -qa | egrep "(java|jdk)"
java-1_7_0-openjdk-1.7.0.85-18.2.x86_64
libjavascriptcoregtk-3_0-0-2.4.8-16.2.x86_64
java-1_7_0-openjdk-headless-1.7.0.85-18.2.x86_64
timezone-java-2015g-0.26.1.noarch

# update-alternatives --config java
There is only one alternative in link group java (providing /usr/bin/java):
/usr/lib64/jvm/jre-1.7.0-openjdk/bin/java
Nothing to configure.

#update-alternatives --config javac
update-alternatives: error: no alternatives for javac

----------------
Regards,
Kevin Lee

On Fri, Oct 23, 2015 at 1:15 AM, Shawn Heisey-2 [via Lucene] <
ml-node+s472066n4236028h28@n3.nabble.com> wrote:

> On 10/22/2015 10:49 PM, awhosit wrote:
> Not working one is solr 5.2.1/SLES 12.
>
> > But I have working one with solr 5.2.1/SLES 11 and solr 5.2.1/Ubuntu 14.
> >
> > From the log left in sol-8983-console.log is as follow.
> > I'm using OpenJDK 1.7 as follow.
> >
> > java version "1.7.0_85"
> > OpenJDK Runtime Environment (IcedTea 2.6.1) (suse-18.2-x86_64)
> > OpenJDK 64-Bit Server VM (build 24.85-b03, mixed mode)
> >
> >
> > Exception in thread "main" java.lang.UnsupportedClassVersionError:
> > org/eclipse/jetty/start/Main : Unsupported major.minor version 51.0
>
> This error message means you're trying to start Solr with Java 6, not
> Java 7.  You might have OpenJDK 7 on your computer, but you also have an
> older version, and the older version is the one that is being used.
>
> I understand that suse uses RPM, so run this command to see if Java 6 is
> installed with a package:
>
> rpm -qa | egrep "(java|jdk)"
>
> If it is, then you should be able to uninstall it and let version 7 have
> center stage.
>
> On a CentOS 6 system, I get this output by running that command.  I've
> got Java 8 installed on this system:
>
> [root@mcp ~]# rpm -qa | egrep "(java|jdk)"
> java-1.8.0-openjdk-1.8.0.51-3.b16.el6_7.x86_64
> tzdata-java-2015f-1.el6.noarch
> java_cup-0.10k-5.el6.x86_64
> java-1.5.0-gcj-devel-1.5.0.0-29.1.el6.x86_64
> java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64
> java-1.8.0-openjdk-devel-1.8.0.51-3.b16.el6_7.x86_64
> gcc-java-4.4.7-16.el6.x86_64
> java-1.8.0-openjdk-headless-1.8.0.51-3.b16.el6_7.x86_64
> [root@mcp ~]# java -version
> openjdk version "1.8.0_51"
> OpenJDK Runtime Environment (build 1.8.0_51-b16)
> OpenJDK 64-Bit Server VM (build 25.51-b03, mixed mode)
>
> Thanks,
> Shawn
>
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://lucene.472066.n3.nabble.com/Solr-fails-to-start-with-log-file-not-found-error-tp4179130p4236028.html
> To unsubscribe from Solr fails to start with log file not found error, click
> here
> <http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4179130&code=YXdob3NpdEBHbWFpbC5jb218NDE3OTEzMHwtMzg1OTg4Mzc0>
> .
> NAML
> <http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-fails-to-start-with-log-file-not-found-error-tp4179130p4236114.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr fails to start with log file not found error

Posted by Shawn Heisey <ap...@elyograg.org>.
On 10/22/2015 10:49 PM, awhosit wrote:
Not working one is solr 5.2.1/SLES 12.
> But I have working one with solr 5.2.1/SLES 11 and solr 5.2.1/Ubuntu 14.
> 
> From the log left in sol-8983-console.log is as follow.
> I'm using OpenJDK 1.7 as follow.
> 
> java version "1.7.0_85"
> OpenJDK Runtime Environment (IcedTea 2.6.1) (suse-18.2-x86_64)
> OpenJDK 64-Bit Server VM (build 24.85-b03, mixed mode)
> 
> 
> Exception in thread "main" java.lang.UnsupportedClassVersionError:
> org/eclipse/jetty/start/Main : Unsupported major.minor version 51.0

This error message means you're trying to start Solr with Java 6, not
Java 7.  You might have OpenJDK 7 on your computer, but you also have an
older version, and the older version is the one that is being used.

I understand that suse uses RPM, so run this command to see if Java 6 is
installed with a package:

rpm -qa | egrep "(java|jdk)"

If it is, then you should be able to uninstall it and let version 7 have
center stage.

On a CentOS 6 system, I get this output by running that command.  I've
got Java 8 installed on this system:

[root@mcp ~]# rpm -qa | egrep "(java|jdk)"
java-1.8.0-openjdk-1.8.0.51-3.b16.el6_7.x86_64
tzdata-java-2015f-1.el6.noarch
java_cup-0.10k-5.el6.x86_64
java-1.5.0-gcj-devel-1.5.0.0-29.1.el6.x86_64
java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64
java-1.8.0-openjdk-devel-1.8.0.51-3.b16.el6_7.x86_64
gcc-java-4.4.7-16.el6.x86_64
java-1.8.0-openjdk-headless-1.8.0.51-3.b16.el6_7.x86_64
[root@mcp ~]# java -version
openjdk version "1.8.0_51"
OpenJDK Runtime Environment (build 1.8.0_51-b16)
OpenJDK 64-Bit Server VM (build 25.51-b03, mixed mode)

Thanks,
Shawn


Re: Solr fails to start with log file not found error

Posted by awhosit <aw...@Gmail.com>.
Hi, I'm newbie on solr, but have same issue.

More precisely, only one machine can't start solr with the message, "cannot
open {solr.log} file for reading: No such file or directory." Obviously
there is no file and even I created empty one, it doesn't help.

I've tried also - moving around the directory here and there, changing
owner/group like root/myself/solr:solr, use install_solr_service.sh or just
unzip, etc, but this machine doesn't allow to start.

Not working one is solr 5.2.1/SLES 12. 
But I have working one with solr 5.2.1/SLES 11 and solr 5.2.1/Ubuntu 14.

>From the log left in sol-8983-console.log is as follow.
I'm using OpenJDK 1.7 as follow.

java version "1.7.0_85"
OpenJDK Runtime Environment (IcedTea 2.6.1) (suse-18.2-x86_64)
OpenJDK 64-Bit Server VM (build 24.85-b03, mixed mode)


Exception in thread "main" java.lang.UnsupportedClassVersionError:
org/eclipse/jetty/start/Main : Unsupported major.minor version 51.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(Unknown Source)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.access$000(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: org.eclipse.jetty.start.Main. Program will
exit.





--
View this message in context: http://lucene.472066.n3.nabble.com/Solr-fails-to-start-with-log-file-not-found-error-tp4179130p4236026.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Solr fails to start with log file not found error

Posted by Graeme Pietersz <gr...@pietersz.net>.
I use the same user every time and the /logs directory and everything in it is owned by that user. I get the same problem occasionally developing on my Ubuntu 14.10 laptop as well, and all the files in the solr directory are owned by me on that machine (and I run Solr as me there as well).

Config issue? Is there anything that could cause this?

-- 
Graeme Pietersz
graeme@pietersz.net
+94 774 102149
On Tuesday 13 Jan 2015 07:42:43 Erick Erickson wrote:
> By any chance are you trying to start Solr as a different user when
> this happens? I'm
> wondering if there's a permissions issue here....
> 
> Wild guess.
> 
> On Tue, Jan 13, 2015 at 12:37 AM, Graeme Pietersz <gr...@pietersz.net> wrote:
> > I get this error when starting Solr using the script in bin/solr
> >
> > tail cannot open `[path]/logs/solr.log’ for reading: No such file or directory
> >
> > It does not happen every time, but it does happen a lot. It sometimes clears up after a while.
> >
> > I have tried creating an empty file, but solr then just says:
> >
> > Backing up [path]/logs/solr.log
> >
> > And repeats the same error.
> >
> > I am guessing the problem is that it cannot get the error from the log file because the log file has not been created yet, but then how do I debug this?
> >
> > Running  Solr 4.10.2 on Debian 7 using Jetty with the default IcedTea 2.5.3 java version 1.7.0_65
> >
> > Thanks for any help or pointers.


Re: Solr fails to start with log file not found error

Posted by Erick Erickson <er...@gmail.com>.
By any chance are you trying to start Solr as a different user when
this happens? I'm
wondering if there's a permissions issue here....

Wild guess.

On Tue, Jan 13, 2015 at 12:37 AM, Graeme Pietersz <gr...@pietersz.net> wrote:
> I get this error when starting Solr using the script in bin/solr
>
> tail cannot open `[path]/logs/solr.log’ for reading: No such file or directory
>
> It does not happen every time, but it does happen a lot. It sometimes clears up after a while.
>
> I have tried creating an empty file, but solr then just says:
>
> Backing up [path]/logs/solr.log
>
> And repeats the same error.
>
> I am guessing the problem is that it cannot get the error from the log file because the log file has not been created yet, but then how do I debug this?
>
> Running  Solr 4.10.2 on Debian 7 using Jetty with the default IcedTea 2.5.3 java version 1.7.0_65
>
> Thanks for any help or pointers.