Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17854

systemd and tomcat pidfile

$
0
0

I have a tomcat installation that i've configured with it's service file

[Unit] Description=Tomcat for xxx After=syslog.target network.target [Service] Type=forking PIDFile=/home/xxx/tomcat/bin/catalina.pid ExecStart=/home/xxx/tomcat/bin/startup.sh ExecStop=/home/xxx/tomcat/bin/shutdown.sh User=xxx Group=xxx [Install] WantedBy=multi-user.target 

The tomcat was started from a user by not using systemctl but the standard tomcat script under ~/tomcat/bin/. Now systemctl status shows me a wrong PID and there for a dead/inactive service. Even though the pid file contains the correct PID.

systemctl status xxx_tomcat.service ● xxx_tomcat.service - Tomcat for xxx Loaded: loaded (/usr/lib/systemd/system/xxx_tomcat.service; enabled; vendor preset: disabled) Active: inactive (dead) since Fri 2016-02-19 09:04:24 CET; 2 weeks 5 days ago Main PID: 19994 (code=exited, status=0/SUCCESS) 

I've tried to find any documentation, but all of them mention that systemd should use the PIDFilfe. But it actually does not. Am I doing something wrong here?

submitted by /u/4gqa4Gh9_bLn-mZ
[link] [comments]

Viewing all articles
Browse latest Browse all 17854