Close, but not quite there yet. The rules say use
        systemctl start (or stop or status) solr.service
That dot service part ought to be there. I suspect that if we omit it then we may be scolded on-screen and lose some grade points.     On your error report below. Best to ensure that Solr is started by either /etc/init.d or systemd but not both. To check on the /etc/init.d part, go to /etc/init.d and give command chkconfig -l solr. if the result shows "On" for any run level then /etc/init.d is supposed to be in charge rather than systemd. If that were the case then your systemd control page ought to indicate that solr is a "LSB" process. On the other hand, if systemd were to be the controlling agent then ensure that the /etc/init.d part does not interfere by issuing command chkconfig -d solr  which will unlink solr from its to-do list. Then say systemctl enable solr    to let systemd take charge.      Thus some busy work to check on things, and then making a choice of which flavour will be in charge.
    Thanks,
    Joe D.

On 15/10/2020 21:03, Ryan W wrote:
I didn't realize that to start a systemd service, I need to do...

systemctl start solr

...and not...

service solr start

Now the output from the status command looks a bit better, though still
with some problems...

[root@faspbsy0002 system]# systemctl status solr.service
? solr.service - LSB: A very fast and reliable search engine.
    Loaded: loaded (/etc/rc.d/init.d/solr; bad; vendor preset: disabled)
    Active: active (exited) since Thu 2020-10-15 15:58:23 EDT; 19s ago
      Docs: man:systemd-sysv-generator(8)
   Process: 34100 ExecStop=/etc/rc.d/init.d/solr stop (code=exited,
status=1/FAILURE)
   Process: 98871 ExecStart=/etc/rc.d/init.d/solr start (code=exited,
status=0/SUCCESS)



On Thu, Oct 15, 2020 at 3:24 PM Ryan W <rya...@gmail.com> wrote:

Does anyone have a simple systemd definition for a solr service?

The things I am finding on the internet don't work.  I am not sure if this
is the kind of thing where there might be some boilerplate that (usually)
works?  Or do situations vary so much that no boilerplate is possible?

Here is what I see when I try to use one of the definitions I found on the
internet:

[root@faspbsy0002 system]# systemctl status solr.service
? solr.service - LSB: A very fast and reliable search engine.
    Loaded: loaded (/etc/rc.d/init.d/solr; bad; vendor preset: disabled)
    Active: failed (Result: exit-code) since Thu 2020-10-15 09:32:02 EDT;
5h 50min ago
      Docs: man:systemd-sysv-generator(8)
   Process: 34100 ExecStop=/etc/rc.d/init.d/solr stop (code=exited,
status=1/FAILURE)
   Process: 1337 ExecStart=/etc/rc.d/init.d/solr start (code=exited,
status=0/SUCCESS)

Oct 15 09:32:01 faspbsy0002 systemd[1]: Stopping LSB: A very fast and
reliab....
Oct 15 09:32:01 faspbsy0002 su[34102]: (to solr) root on none
Oct 15 09:32:02 faspbsy0002 solr[34100]: No process found for Solr node
runn...3
Oct 15 09:32:02 faspbsy0002 systemd[1]: solr.service: control process
exited...1
Oct 15 09:32:02 faspbsy0002 systemd[1]: Stopped LSB: A very fast and
reliabl....
Oct 15 09:32:02 faspbsy0002 systemd[1]: Unit solr.service entered failed
state.
Oct 15 09:32:02 faspbsy0002 systemd[1]: solr.service failed.
Warning: Journal has been rotated since unit was started. Log output is
incomplete or unavailable.
Hint: Some lines were ellipsized, use -l to show in full.


Reply via email to