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 Shawn Heisey <ap...@elyograg.org> on 2014/11/05 01:52:02 UTC

CentOS 7 and solr init script

This is only partially on-topic for this list ... I'm trying to start
Solr. :)

I have a handful of programs, one of which is Solr using the example
jetty, for which I've written init scripts.  They work very well on
CentOS 6.

I'm trying to set up a new dev solr server with CentOS 7, and none of my
init scripts will work.  CentOS 7 has migrated to systemd, but maintains
backward compatibility with /etc/init.d scripts.

-----------------
[root@bigindy5 ~]# service solr4 restart
Restarting solr4 (via systemctl):  Warning: Unit file of solr4.service
changed on disk, 'systemctl daemon-reload' recommended.
Job for solr4.service failed. See 'systemctl status solr4.service' and
'journalctl -xn' for details.
                                                           [FAILED]
-----------------

The init script is basically what I've put on the wiki, although there
probably have been a few extremely minor adjustments since I put it up:

http://wiki.apache.org/solr/ShawnHeisey#Init_script

The systemctl command that they've mentioned has this output:

-----------------
[root@bigindy5 ~]# systemctl status solr4.service -l
solr4.service - SYSV: Starts and stops Solr
   Loaded: loaded (/etc/rc.d/init.d/solr4)
   Active: failed (Result: exit-code) since Tue 2014-11-04 17:45:18 MST;
3min 5s ago
  Process: 7638 ExecStart=/etc/rc.d/init.d/solr4 start (code=exited,
status=4)

Nov 04 17:45:18 bigindy5 su[7638]: (to solr) root on none
Nov 04 17:45:18 bigindy5 systemd[1]: solr4.service: control process
exited, code=exited status=4
Nov 04 17:45:18 bigindy5 systemd[1]: Failed to start SYSV: Starts and
stops Solr.
Nov 04 17:45:18 bigindy5 systemd[1]: Unit solr4.service entered failed
state.

Warning: Unit file changed on disk, 'systemctl daemon-reload' recommended.
-----------------

/etc/init.d/solr4 is a symlink to /opt/solr4/init.sh ... if I run
"./init.sh restart" from /opt/solr4, it works.

Any ideas at all, even a suggestion for another place to ask?

Thanks,
Shawn