Re: solr-6.2.0 cannot be launched by systemd service

2016-10-19 Thread Shawn Heisey
On 10/17/2016 9:20 AM, yunjiez wrote:
> solr_systemd.log
>   
>
> There is no problem when launching the solr-6.2.0 with the script bin/solr.
> But when I launching it with systemd service, the solr instance will soon be
> stopped by systemd. I attached the error log. Anyone can help? thanks.

I had to go to Nabble to see your log.  It didn't make it to the list.

This log line shows when shutdown begins:

2016-10-12 08:20:09.973 INFO (ShutdownMonitor) [ ]
o.e.j.s.ServerConnector Stopped
ServerConnector@62ddbd7e{HTTP/1.1,[http/1.1]}{0.0.0.0:8983}

This is a little more than halfway through the log.  Solr did not stop
because of any error, it was shut down externally.  The errors that show
up later in the log happened because Solr was shutting down.

There is no official systemd config for Solr.  That probably means that
you built it yourself or obtained it somewhere else and modified it. 
Looking in the latest Solr download, I do not see any file or directory
containing "systemd" in its name.  That makes this an unsupported
configuration.  I have absolutely no idea why this is happening.

Is there any particular reason you can't use the included shell script
for service installation?

https://cwiki.apache.org/confluence/display/solr/Taking+Solr+to+Production#TakingSolrtoProduction-RuntheSolrInstallationScript

That script should work on most UNIX-like operating systems, especially
Linux, where it has been pretty thoroughly tested.  It installs an init
script to /etc/init.d/ when it runs.  If you find that the script
doesn't work on your UNIX-like operating system, and you are sure that
recent versions of the required tools (bash, lsof, grep, ps, and similar
-- open source versions highly recommended) are installed, then that
would most likely be considered a bug.  Please discuss any problems
encountered with the install script here before opening an issue in Jira.

Thanks,
Shawn



solr-6.2.0 cannot be launched by systemd service

2016-10-17 Thread yunjiez
solr_systemd.log
  

There is no problem when launching the solr-6.2.0 with the script bin/solr.
But when I launching it with systemd service, the solr instance will soon be
stopped by systemd. I attached the error log. Anyone can help? thanks.

=
systemd service for solr
=
[Unit]
After=basic.target
After=network.target
Description=Standalone Solr server
Wants=basic.target

[Service]
Environment="SOLR_INCLUDE=/home/bob/solr/bin/solr.in.sh"
User=search
Group=search
ExecStart=/home/bob/solr/bin/solr start
ExecStop=/home/bob/solr/bin/solr stop
Restart=on-failure

[Install]
WantedBy=multi-user.target



--
View this message in context: 
http://lucene.472066.n3.nabble.com/solr-6-2-0-cannot-be-launched-by-systemd-service-tp4301482.html
Sent from the Solr - User mailing list archive at Nabble.com.