This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Extensions » eZ Find » Install solr as service (init script)
expandshrink

Install solr as service (init script)

Install solr as service (init script)

Tuesday 14 July 2009 11:59:12 am - 7 replies

Hi,

I am using Red Hat Enterprise Linux 4. I tried the init script which is delivered with ezfind 2.0, but it is not working.

I followed the instructions in the solr file and edited the path to solr and java in this file.
When I tried to start the script I got no error message. But the server is not running.

Is there anything I still have to customize? Any other idea where I have to look?

Thanks in advance for answers.

Tuesday 14 July 2009 12:55:22 pm

Make sure that the shell script the init script calls is executable: extension/ezfind/java/solr.sh otherwise it will not work. Also try running that shell script from the command line to see if it displays any errors.

Tuesday 14 July 2009 1:17:43 pm

Thanks for your answer.

The shell script solr.sh is executable. When I run the script, it gives me the error message that the JAVA_HOME environment is not set. When I added the JAVA_HOME variable to the script, then the script is wokring. The server starts.

I looked into the solr init script again, but I could not see any call to the solr.sh file.

Any other ideas?

Tuesday 14 July 2009 1:40:19 pm

Huh, well, I've never looked at the red hat script, it is different from the debian script and yeah I don't see where solr.sh is defined anywhere either. In the debian script it would be this line:

DAEMON=$SOLR_HOME/$NAME.sh

Have you tried running the init script with shell debugging i.e.
sh -x /etc/init.d/solr start
maybe that will help narrow the problem down.

Are you sure your script is the correct script for the version of ezfind you are running?

Tuesday 14 July 2009 1:49:41 pm

Looks like solr.sh is only for debian... the line in the redhat script that should start it is:

daemon --check $NAME --pidfile /var/run/solr.pid nohup java -jar start.jar > /dev/null 2>&1 &

Could be possible that java is not in root's $PATH or something like that.

You might want to temporarily remove the > /dev/null 2>&1 to see if there is an error that's being suppressed.

Modified on Tuesday 14 July 2009 1:51:29 pm by Steven E Bailey

Tuesday 14 July 2009 5:04:01 pm

NB: there's a small bug in the version of that script delivered with ezfind 2.0. It should be

daemon --check $NAME --pidfile /var/run/solr.pid nohup $JAVA -jar start.jar > /dev/null 2>&1 &

notice the usage of $JAVA instead of "java" when starting the server

Thursday 16 July 2009 3:49:11 pm

Thanks for your help. But I could not solve the problem until now.

It looks like that the row with the daemon call ist not working. I got a return value of zero, what is normaly OK. But there is no java in the process list and the solr pid file is empty.

Is there anything else I can try?

Friday 21 August 2009 10:20:36 am

The reply has been removed because of violation of forum rules.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from