Forums / Extensions / eZ Find / Install solr as service (init script)

Install solr as service (init script)

Author Message

Martin Bergmeyer

Tuesday 14 July 2009 2:59:12 am

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.

Steven E. Bailey

Tuesday 14 July 2009 3:55:22 am

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.

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Martin Bergmeyer

Tuesday 14 July 2009 4:17:43 am

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?

Steven E. Bailey

Tuesday 14 July 2009 4:40:19 am

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?

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Steven E. Bailey

Tuesday 14 July 2009 4:49:41 am

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.

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Gaetano Giunta

Tuesday 14 July 2009 8:04:01 am

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

Principal Consultant International Business
Member of the Community Project Board

Martin Bergmeyer

Thursday 16 July 2009 6:49:11 am

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?

eZ debug

Timing: Jan 18 2025 03:11:34
Script start
Timing: Jan 18 2025 03:11:34
Module start 'content'
Timing: Jan 18 2025 03:11:34
Module end 'content'
Timing: Jan 18 2025 03:11:34
Script end

Main resources:

Total runtime0.2299 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0095 587.8594180.7734
Module start 'content' 0.00950.0161 768.6328103.1016
Module end 'content' 0.02560.2042 871.7344532.1250
Script end 0.2297  1,403.8594 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00441.9005200.0002
Check MTime0.00180.7894200.0001
Mysql Total
Database connection0.00170.743410.0017
Mysqli_queries0.151165.73621410.0011
Looping result0.00140.62371390.0000
Template Total0.203688.510.2036
Template load0.00341.469510.0034
Template processing0.200287.074610.2002
Override
Cache load0.00210.893110.0021
Sytem overhead
Fetch class attribute can translate value0.00100.419810.0010
XML
Image XML parsing0.00030.126110.0003
General
dbfile0.02199.5122200.0011
String conversion0.00000.003530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs