help with systemctl Ubuntu 22.04
Bob Proulx
bob at proulx.com
Fri Sep 29 04:56:30 UTC 2023
Hi Phil,
Phil Marsh wrote:
> I am trying to start vncserver as a service on bootup.
...
> The unit vncserver.service has successfully entered the 'dead' state.
I think that is the main clue. But since I am one of those that
despise systemd I am not the best person to debug this. However I do
have some hints.
Ask systemd what is the systemd status.
systemctl status
If it says "running" up top in green that that's good. If it says
"degraded" up top in red then that is bad. To list units that have
logged failures causing the degraded mode run this to list failed
units.
systemctl list-units --state=failed
I say the above because often I find systemd systems that are degraded
for reasons of things other than the thing that is causing us to look.
Often other things are also broken and also need to be repaired. It's
good to get the system into a happy state first and then proceed from
there with adding something new.
For your service file check the status of it specifically.
systemctl status vncserver.service
What does that say about it? Can also dump the systemd system log for
it specifically too.
journalctl -ru vncserver.service
Hopefully there will be some hints in there somewhere that are useful
to figure out why it is not running. Good luck!
Bob
More information about the NCLUG
mailing list