Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

"A stop job is running"

If none of the specific sub-forums seem right for your thread, ask here.
Message
Author
Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: "A stop job is running"

#16 Post by Dai_trying »

One known reason for a 90 second delay on bootup (especially if you have installed another OS) is the swap partition being reformatted and having a different UUID in your fstab file, you can check this easily by typing (or cut n paste)

Code: Select all

if [ $(cat /etc/fstab | grep swap | awk '{print $1}') == $(cat /etc/fstab | grep swap | awk '{print $1}') ]; then echo "All is good";else echo "Swap UUID is different to fstab";fi
into a terminal and it will tell you "All is good" (if UUID's match) or "Swap UUID is different to fstab" if it is different. This is only a simple bash command and I just tested it on a machine here and it seemed to work.

After all this, it may not be anything to do with your fstab or swap, but I thought I would mention it as I have known it to be an issue before...

HTH

User avatar
Nili
Posts: 441
Joined: 2014-04-30 14:04
Location: $HOME/♫♪
Has thanked: 5 times
Been thanked: 3 times

Re: "A stop job is running"

#17 Post by Nili »

I remember my conky not let me to shutdown properly year ago.
Sometimes "A stop job is running" appeared unexpected. But every time i killed conky before shut down. That message never appeared.

Myself, I had from conky that thing. Maybe systemd did not like something from conky Or whatever...

I think this issue/feature or whatever it is, needs to be clarified/fixed by systemd. Since it has come out from it.
Or, Or systemd don't find peace with something on the system, kernel or something else behind my knowledge.

I fixed mine by changing init.
openSUSE Tumbleweed KDE/Wayland

♫♪ Elisa playing...
Damascus Cocktail ♪ Black Reverie ♪ Dye the sky.

silvaf6
Posts: 70
Joined: 2017-06-12 16:45

Re: "A stop job is running"

#18 Post by silvaf6 »

Nili wrote:I remember my conky not let me to shutdown properly year ago.
Sometimes "A stop job is running" appeared unexpected. But every time i killed conky before shut down. That message never appeared.

Myself, I had from conky that thing. Maybe systemd did not like something from conky Or whatever...

I think this issue/feature or whatever it is, needs to be clarified/fixed by systemd. Since it has come out from it.
Or, Or systemd don't find peace with something on the system, kernel or something else behind my knowledge.

I fixed mine by changing init.
What do you mean changing init? Did you disable conky service from booting?

User avatar
Nili
Posts: 441
Joined: 2014-04-30 14:04
Location: $HOME/♫♪
Has thanked: 5 times
Been thanked: 3 times

Re: "A stop job is running"

#19 Post by Nili »

silvaf6 wrote:What do you mean changing init? Did you disable conky service from booting?
I mean by chaning "systemd" to sysvinit.
There is a chance to Install without systemd at least on Debian Jessie, No idea regarding Stretch!

Code: Select all

Jessie installs systemd by default on new installs. Should one desire to install without systemd, i.e use sysvinit-core instead (old sysV5 init), it is possible to use preseed to replace systemd with sysvinit at the end of the install (This probably won't work if selecting one of the desktop environments that require systemd specific features however). If using a preseed file already, just make sure to set the preseed value
No i didn't disabled conky on startup, simply a conky kill killall -9 conky on console before reboot/shutdown.

Regards!
openSUSE Tumbleweed KDE/Wayland

♫♪ Elisa playing...
Damascus Cocktail ♪ Black Reverie ♪ Dye the sky.

silvaf6
Posts: 70
Joined: 2017-06-12 16:45

Re: "A stop job is running"

#20 Post by silvaf6 »

Nili wrote:
silvaf6 wrote:What do you mean changing init? Did you disable conky service from booting?
I mean by chaning "systemd" to sysvinit.
There is a chance to Install without systemd at least on Debian Jessie, No idea regarding Stretch!

Code: Select all

Jessie installs systemd by default on new installs. Should one desire to install without systemd, i.e use sysvinit-core instead (old sysV5 init), it is possible to use preseed to replace systemd with sysvinit at the end of the install (This probably won't work if selecting one of the desktop environments that require systemd specific features however). If using a preseed file already, just make sure to set the preseed value
No i didn't disabled conky on startup, simply a conky kill killall -9 conky on console before reboot/shutdown.

Regards!
Which DE are you using? I think gnome requires systemd, not sure about cinnamon

User avatar
Nili
Posts: 441
Joined: 2014-04-30 14:04
Location: $HOME/♫♪
Has thanked: 5 times
Been thanked: 3 times

Re: "A stop job is running"

#21 Post by Nili »

silvaf6 wrote:Which DE are you using? I think gnome requires systemd, not sure about cinnamon
I use Window Manager (WM) alone without DE.

Of course Desktop environment like GNOME, Cinnamon, KDE require systemd.
If one want to try Debian without systemd, can do only with Window Manager (WM) atleast, WM's are independent of systemd.

For example
We can have a Debian (netinst) with: Openbox (WM), Tint2 panel, PcmanFM file manager, Xterm, Browser etc...

This is how i did on my Debian copy.
Regards!
openSUSE Tumbleweed KDE/Wayland

♫♪ Elisa playing...
Damascus Cocktail ♪ Black Reverie ♪ Dye the sky.

tophack
Posts: 5
Joined: 2013-05-17 19:15

Re: "A stop job is running"

#22 Post by tophack »

This problem happened to me when I added or changed a boot drive. If you check the uuid of the drive that shows 'stop job running' and the uuid of the swap drive (simplest using gparted) and they are different that may be the cause of the delay.
t.

silvaf6
Posts: 70
Joined: 2017-06-12 16:45

Re: "A stop job is running"

#23 Post by silvaf6 »

Dai_trying wrote:if [ $(cat /etc/fstab | grep swap | awk '{print $1}') == $(cat /etc/fstab | grep swap | awk '{print $1}') ]; then echo "All is good";else echo "Swap UUID is different to fstab";fi
This said that the UUID is different, but it is not :p
I've been using lightdm + xfce and I stopped having the issue.

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: "A stop job is running"

#24 Post by Dai_trying »

Well as long as the issue is resolved that's what counts.

silvaf6
Posts: 70
Joined: 2017-06-12 16:45

Re: "A stop job is running"

#25 Post by silvaf6 »

I'm good, but I'm not sure if Ira fixxed it.

stroudmw
Posts: 19
Joined: 2017-09-01 12:55

Re: "A stop job is running"

#26 Post by stroudmw »

I've got the same problem.

Changing /etc/gdm3/daemon.conf to : WaylandEnable=false did not help. Neither did installing watchdog. I really don't want to change the timeout settings as I don't understand the implications of doing so.

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: "A stop job is running"

#27 Post by Dai_trying »

Dai_trying wrote:One known reason for a 90 second delay on bootup (especially if you have installed another OS) is the swap partition being reformatted and having a different UUID in your fstab file, you can check this easily by typing (or cut n paste)

Code: Select all

if [ $(cat /etc/fstab | grep swap | awk '{print $1}') == $(cat /etc/fstab | grep swap | awk '{print $1}') ]; then echo "All is good";else echo "Swap UUID is different to fstab";fi
into a terminal and it will tell you "All is good" (if UUID's match) or "Swap UUID is different to fstab" if it is different. This is only a simple bash command and I just tested it on a machine here and it seemed to work.
did you try this?

peer
Posts: 449
Joined: 2017-03-26 10:14
Has thanked: 8 times
Been thanked: 22 times

Re: "A stop job is running"

#28 Post by peer »

the command doest not work properly on my machine. The result is: "Swap UUID is different to fstab"
But the UIID in the fstab is the same as reported by gparted.

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: "A stop job is running"

#29 Post by Dai_trying »

when the stop job is running, what is the message it gives?

User avatar
sunrat
Administrator
Administrator
Posts: 6470
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 117 times
Been thanked: 474 times

Re: "A stop job is running"

#30 Post by sunrat »

Dai_trying wrote:...

Code: Select all

if [ $(cat /etc/fstab | grep swap | awk '{print $1}') == $(cat /etc/fstab | grep swap | awk '{print $1}') ]; then echo "All is good";else echo "Swap UUID is different to fstab";fi
into a terminal and it will tell you "All is good" (if UUID's match) or "Swap UUID is different to fstab" if it is different. This is only a simple bash command and I just tested it on a machine here and it seemed to work.
I tested it here and it appeared to work too, but then had a closer look at the commands. It appears to be comparing the output of two identical commands, so I don't see how it could flag a mismatch. Shouldn't it be comparing the fstab entry with UUID in blkid?
Please explain to me how it can work, and if I'm just being dumb.

This seems to work, needs to be run as root for blkid:

Code: Select all

if [ $(grep swap /etc/fstab | awk '{print $1}') == $(blkid | grep swap| awk '{print $2}'|sed s/'"'//g) ]; then echo "All is good";else echo "Swap UUID is different to fstab";fi
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: "A stop job is running"

#31 Post by Dai_trying »

I had to look through my bash history to understand why I posted this, and it was due to a number of tests not working properly and I posted one of the earlier lines!... anyway, your corrected version would do the trick (thank you for pointing it out) and my original post should have been

Code: Select all

if [ $(cat /etc/fstab | grep swap | awk '{print $1}') == $(sudo blkid | grep swap | awk '{print $2}' | tr -d '"') ]; then echo "All is good";else echo "Swap UUID is different to fstab";fi
It does beg the question of how it could have given the message "Swap UUID is different to fstab" to @peer? strange that....

User avatar
sunrat
Administrator
Administrator
Posts: 6470
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 117 times
Been thanked: 474 times

Re: "A stop job is running"

#32 Post by sunrat »

Dai_trying wrote:It does beg the question of how it could have given the message "Swap UUID is different to fstab" to @peer? strange that....
Indeed. Two identical commands should never give different output.
I guessed it was some kind of copy/pasta glitch you posted first. ;) And I had to check what tr command was, that could come in very handy!
PS. you don't need to use cat to grep a file. Sometimes known as cat abuse. Took me ages to wean myself from that habit. Probably save 0.1 secs to grep a 1GB file so more academic than important although it makes the command shorter:
https://en.wikipedia.org/wiki/Cat_(Unix ... use_of_cat
http://www.catwelfare.org/report-cat-abuse JK :D

Anyway, we strayed a bit from the actual topic. Two commands that can help identify problems like this are:

Code: Select all

systemd-analyze blame
journalctl -b -p 3
Check man journalctl for other options that may suit better.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
ticojohn
Posts: 1284
Joined: 2009-08-29 18:10
Location: Costa Rica
Has thanked: 21 times
Been thanked: 44 times

Re: "A stop job is running"

#33 Post by ticojohn »

I too occasionally get a "stop job is running" message at shutdown (maybe one out of ten times). This is on Debian Jessie (up to date) and XFCE desktop. I have two drives. Jessie is installed on a SSD and Stretch on a HDD. This is /etc/fstab for the SSD

Code: Select all

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=d217e984-5a4e-4019-9335-8dca4956514b /               ext4    noatime,errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=fd34d9a9-e492-4f05-827b-a32dca238490 none            swap    sw              0       0
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
And this is /etc/fstab for the HDD

Code: Select all

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb1 during installation
UUID=8fe14111-fb44-461b-b458-626c5737d8c2 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sdb5 during installation
UUID=f87f0147-03ee-4960-9d2a-2d76b0828b67 none            swap    sw              0       0
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
This is the result when running the following script I see it showing two(2) swap partitions, one for the SSD and one for the HDD.

Code: Select all

root@JohnBoy:/home/john# blkid | grep swap| awk '{print $2}'|sed s/'"'//g
UUID=f87f0147-03ee-4960-9d2a-2d76b0828b67
UUID=fd34d9a9-e492-4f05-827b-a32dca238490
The HDD is not mounted so why am I seeing the swap partition for that drive. I am assuming that this could be part of the problem. How do I fix this?

By the way, to get the bash script referenced in this post to run, I had to modify the variables with double quotes as shown here

Code: Select all

if [ "$(cat /etc/fstab | grep swap | awk '{print $1}')" == "$(sudo blkid | grep swap | awk '{print $2}' | tr -d '"')" ]; then echo "All is good";else echo "Swap UUID is different to fstab";fi
Otherwise I get an error message about too many arguments. And when I run that script I get the following

Code: Select all

root@JohnBoy:/home/john# if [ "$(cat /etc/fstab | grep swap | awk '{print $1}')" == "$(sudo blkid | grep swap | awk '{print $2}' | tr -d '"')" ]; then echo "All is good";else echo "Swap UUID is different to fstab";fi
Swap UUID is different to fstab
I am not irrational, I'm just quantum probabilistic.

User avatar
ticojohn
Posts: 1284
Joined: 2009-08-29 18:10
Location: Costa Rica
Has thanked: 21 times
Been thanked: 44 times

Re: "A stop job is running"

#34 Post by ticojohn »

Okay, I can answer one of my questions. BLKID is going to show the partitions even of unmounted devices. DOH! But as to why the script says the SWAP UUID is different than /etc/fstab I don't understand.

Do I need to remove one of the swap partitions? Rather not do that in case I have a failure of one or the other drive. And more importantly, is having two swap partitions causing any kind of problem? Not sure why it would but it's the question.

HMMM! Maybe the reason the script gives the result it does is because the swap partition for the HDD is listed first in the blkid response.
I am not irrational, I'm just quantum probabilistic.

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: "A stop job is running"

#35 Post by Dai_trying »

The script reports it as being wrong because there are two swap partitions, it was only something I quickly put up to check if they matched and has no checking for "non-standard" setups, and by non-standard I just mean it would expect to only see one swap space, but I doubt that would be causing the delay unless the swap space (listed in fstab) has been re-formatted.

As for why you are receiving the delay, that would really depend on the exact reason the stop job is running, it would help if you could post that here.

EDIT:
I also recall reading somewhere (maybe on this forum) that swap does not have to be entered into fstab, I'm not sure what debian version this started but the system will probably mount both swap spaces during boot-up, but you can easily check swap size with free from the command line.

Post Reply