Ubuntu shutdown fail "* Killing all remaining processes..."

43

13

I have a fresh installation of Ubuntu Server. "reboot" works, but shutdown fails on the * Killing all remaining processes... step. I am using:

sudo shutdown now

After the failure, indicated by [fail] (with "fail" in red), I get this message:

 * will now switch to single-user mode

with no other error messages. The user is root after the program exits.

Any ideas about how to trouble-shoot this, or what the problem might be?

The Ubuntu version is 11.10 and I ran sudo aptitude update && sudo aptitude dist-upgrade before this.

jtpereyda

Posted 2011-11-23T02:33:05.297

Reputation: 2 079

I am experiencing exactly the same issue. – Kouber Saparev – 2011-12-28T22:28:52.553

See if this helps. it forced the shutdown, though the red "failed" didn't disappear.

– None – 2012-01-15T13:53:16.817

Does the sudo poweroff make the problem go away? – pbies – 2013-12-05T13:43:46.600

Answers

38

I've experienced the same, so I had to use halt which worked

shutdown -h now

Zdenek F

Posted 2011-11-23T02:33:05.297

Reputation: 496

3This may require sudo to run – Simon Sheehan – 2012-01-20T01:20:24.223

Is there any explanation on why this is necessary? I have the above problem on a 13.10 distro and even the "shutdown -h now" variant does not work. The only way I can recover from this -- it seems -- is to reboot -f now but this skips the whole shutdown process and can't be good for the long-term health of the system. – ken – 2013-11-27T18:45:06.533

This works, though not really sure why the other one fails. – Nuno Furtado – 2013-12-02T14:04:55.480

1@user19726 - see other answers for why the simple shutdown "fails" (it is actually not failing, it is simply going to single user mode, rather than straight to halt condition). – qxotk – 2014-03-12T15:32:13.407

21

From the man pages of shutdown:

... runlevel 1 is used to put to system into a state where administrative tasks can be per- formed; this is the default if neither the -h or -r flag is given to shutdown."

shutdown shuts the system down from a user perspective, as linux is designed as a multi-user system, hence the system-wide message and optional time delay.

To shutdown the machine, use the -h option.

And I wouldn't worry about some processes that couldn't be killed in time, which is probably the meaning of the [fail] message you got.

Markus

Posted 2011-11-23T02:33:05.297

Reputation: 356

As a total Noob to Linux, and seeking to up my skills, I prefer to be worried about anything that fails. I want to know Linux to the point where I can run in on the open public internet. That said, I voted for this answer: quotes the man page and explains the default behavior. I'm tempted to remove the "And I wouldn't worry..." at the end - what value does that add? – qxotk – 2014-03-12T15:27:29.983

7

I encountered this when trying to reboot with sudo reboot now. sudo shutdown now also failed. In both cases, the system switched to single-user mode and stalled.

Halting the system isn't feasible, since it is remote and I don't want to trek to the basement to turn it back on. What worked is sudo shutdown -r 0.

I'm running Ubuntu 13.04 server on an Asus Aspire One netbook.

I know this thread is old, but I'm experiencing this problem with a current distro.

MattM

Posted 2011-11-23T02:33:05.297

Reputation: 71

1Thanks for posting this: Ubuntu 13.04 refused to reboot properly without the shutdown -r 0 command. – ojdo – 2013-09-27T22:44:02.363

1sudo shutdown -h -r worked for me, not sure on the differences. – Tracker1 – 2013-11-19T22:01:47.297

Voted this up for adding perspective for the person running a physical not-nearby machine - not everyone is in a situation to turn the machine off - I am because: using a VM locally and in the cloud - both places where a machine can be turned off and started via locally available keyboard/cloud control panel. – qxotk – 2014-03-12T15:30:37.917