LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   A stop job is running... (https://www.linuxquestions.org/questions/ubuntu-63/a-stop-job-is-running-4175653265/)

taylorkh 05-03-2019 01:15 PM

A stop job is running...
 
I am not sure if this is Ubuntu specific but I see it most often with Ubuntu. I am running Ubuntu Mate 18.04 on a Raspberry Pi 3B+ When I issue a shutdown from the appropriate notification area icon the system will begin to shut down as expected. The Plymouth (?) shutdown screen appears with the little dots moving in the middle. If I press Esc I will see various messages as the system is shutting down. On occasion I see
Code:

A stop job is running for Session c2 for user ken (20/1:30)
The first number steadily increases until a minute and a half has passed from whenever the job started. At this point the shutdown process continues.

My question is... How do I find out what the "stop job" is so that I can investigate and remediate the problem?

TIA,

Ken

sevendogsbsd 05-03-2019 01:34 PM

This is systemd stopping a process but not sure it's indicative of something broken. I used to get that message when I ran Debian and Gnome: gdm would hang at shutdown and I would just have to wait the 2 minutes or whatever. The only fix I knew of at the time was to change the timeout value but that masks the issue, if there is actually a problem.

You can run journalctl -b to see the system log entries since the last reboot. Might help troubleshoot if there is actually an issue.

273 05-03-2019 01:40 PM

I, too, see this and am running XFCE on Sid. I think it's a systemd thing as it started when that took over.
<waves arms> welcome to The Future by Poetering...

sevendogsbsd 05-03-2019 01:47 PM

Yeah, I was never able to find a solution, at least on Debian, then I later gave up on Gnome entirely, for different reasons. I don't remember having an issue with xfce on Debian stable (can't remember name) and using lightdm though - seemed to work just fine.

taylorkh 05-03-2019 02:41 PM

Thanks folks,

I guess I really need to do some investigating of the logs. If I start working from the most recent boot and work backwards perhaps.

Ken

sevendogsbsd 05-03-2019 02:51 PM

There is a way to use journalctl to view the logs in reverse order: newest first, I just can't remember the switch at the moment.

verndog 05-03-2019 07:08 PM

I use these two commands for timeouts:
Code:

sudo sed -i 's/\#DefaultTimeoutStartSec=90s/DefaultTimeoutStartSec=10s/' /etc/systemd/system.conf
sudo sed -i 's/\#DefaultTimeoutStopSec=90s/DefaultTimeoutStopSec=10s/' /etc/systemd/system.conf


frankbell 05-03-2019 08:32 PM

Code:

A stop job is running for Session c2 for user ken (20/1:30)
I got a similar message shutting down a VM of Fedora tonight, and I've seen it other places.

It is not a cause for concern.

homyzh 11-15-2020 03:19 AM

It will be a good idea to make sure which process was causing the delay so that we can fix it/discard it in the future.
steps:
1. use journalctl -b --list-boots to list boots
2. view logs of last boot: journalctl -b --boot xxxxxx to identify the process killed after 90 secs timeout.

ondoho 11-16-2020 01:40 AM

^ yes, that about sums up what others have posted here so far.
Quote:

Originally Posted by taylorkh (Post 5991126)
Code:

A stop job is running for Session c2 for user ken (20/1:30)

The c2 makes me think that maybe you have started a 2nd session on another tty, and not logged out?
If that is the case I think systemd behaves correctly.


All times are GMT -5. The time now is 10:41 AM.