Linux – What does status “active (exited)” mean for a SystemD service

linuxservicessystemdsysvinit

I'm working with a custom service which essentially runs a web server, called thisismywebserver. Currently it's not working (ie I get an "Unable to Connect" error trying to access a page).

When I run this command service thisismywebserver status to see the status of the service I see that the status is "active (exited)". Does this mean the service has stopped working? If not, then what does this mean?

root@thisismywebserver-testing:~# service thisismywebserver status
● thisismywebserver.service - LSB: ThisIsMyWebServer server
   Loaded: loaded (/etc/init.d/thisismywebserver)
   Active: active (exited) since Sun 2015-11-08 23:01:33 EST; 18h ago

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

Best Answer

It seems you are running a system with systemd yet you are using sysV commands. Did you create a sysV init script or a systemd unit file?

State active (exited) means that systemd has successfully run the commands but that it does not know there is a daemon to monitor.

If there is you must define it in the unit file by configuring the Type and ExecStart options appropriately according to whether the process you start is the main proces, forks child processes and exits etc.

Check the different systemd man pages or update your question and post the unit file or init script.