title: Systemd tomcat.service failed with no errors
body: <p>I have Tomcat configured to run as a service using Systemd on CentOS 7.2. I can start Tomcat with no problems:</p>
  
  <pre><code>sudo systemctl start tomcat
  </code></pre>
  
  <p>I can access the splash screen, the manager app, and even deploy applications. Then I shut down Tomcat:</p>
  
  <pre><code>sudo systemctl stop tomcat
  </code></pre>
  
  <p>I don't see any errors. But then I check the status:</p>
  
  <pre><code>sudo systemctl status tomcat
  
  ● tomcat.service - Apache Tomcat Web Application Container
     Loaded: loaded (/etc/systemd/system/tomcat.service; disabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Sun 2016-10-30 17:27:19 UTC; 2s ago
    Process: 10833 ExecStop=/bin/kill -TERM $MAINPID (code=exited, status=0/SUCCESS)
    Process: 10785 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, status=0/SUCCESS)
   Main PID: 10795 (code=exited, status=143)
  
  Oct 30 17:26:31 java2016 systemd[1]: Starting Apache Tomcat Web Application Container...
  Oct 30 17:26:31 java2016 startup.sh[10785]: Existing PID file found during start.
  Oct 30 17:26:31 java2016 startup.sh[10785]: Removing/clearing stale PID file.
  Oct 30 17:26:31 java2016 systemd[1]: Started Apache Tomcat Web Application Container.
  Oct 30 17:27:19 java2016 systemd[1]: Stopping Apache Tomcat Web Application Container...
  Oct 30 17:27:19 java2016 systemd[1]: tomcat.service: main process exited, code=exited, status=143/n/a
  Oct 30 17:27:19 java2016 systemd[1]: Stopped Apache Tomcat Web Application Container.
  Oct 30 17:27:19 java2016 systemd[1]: Unit tomcat.service entered failed state.
  Oct 30 17:27:19 java2016 systemd[1]: tomcat.service failed.
  </code></pre>
  
  <p>It shows that <code>kill</code> functioned just fine. And <code>/opt/tomcat/logs/catalina.out</code> doesn't show any problems, either:</p>
  
  <pre><code>30-Oct-2016 17:27:19.268 INFO [Thread-5] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
  30-Oct-2016 17:27:19.324 INFO [Thread-5] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
  30-Oct-2016 17:27:19.375 INFO [Thread-5] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
  30-Oct-2016 17:27:19.491 INFO [Thread-5] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
  30-Oct-2016 17:27:19.493 INFO [Thread-5] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
  30-Oct-2016 17:27:19.494 INFO [Thread-5] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
  30-Oct-2016 17:27:19.495 INFO [Thread-5] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-nio-8009"]
  </code></pre>
  
  <p>Why does Systemd consider Tomcat "failed"? Does it have anything to do with that "stale PID file" message?</p>