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.

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.

  • Thanks for your answer! I have just started work on this system since the previous developer became unavailable, so I don't know which of those alternatives applies. I'll have a read of the man pages you mention, and see if I can figure it out. – Highly Irregular Nov 10 '15 at 1:23
  • 1
    @Bram Can you let us know how to specify that? Is it via the ExecStart and ExecStop ? I am facing same issue – kingsmasher1 Jan 14 '16 at 13:30
  • 1
    @ whoever downvoted my answer: please comment and explain why you feel this answer is not correct or not complete. – Bram May 5 '17 at 11:11
  • The LSB: in the supplied description tells you that the questioner did not create a service unit, Bram. See unix.stackexchange.com/a/386876/5132 and unix.stackexchange.com/a/387314/5132 . – JdeBP Sep 26 '17 at 4:06
  • 1
    This state can also mean that the service has been started but its process immediately exited, most likely due to a fatal error. This happened to me with a misconfigured openvpn service. – jlh May 23 '18 at 16:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.