Unable to connect to the system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: Connection refused (oneiric)

Bug #811441 reported by Rachid Achellal on 2011-07-16
This bug affects 133 people
Affects Status Importance Assigned to Milestone
dbus (Ubuntu)

Bug Description

The dbus service doesn't start correctly.
This happens since version dbus_1.4.12-4ubuntu2_amd64.

Jul 16 11:15:41 desktop kernel: [ 855.230791] init: dbus main process (2079) terminated with status 1
Jul 16 11:15:41 desktop kernel: [ 855.230812] init: dbus main process ended, respawning
Jul 16 11:15:41 desktop kernel: [ 855.234366] init: Unable to connect to the system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: Connection refused
Jul 16 11:15:41 desktop kernel: [ 855.234404] init: plymouth-upstart-bridge main process (2081) terminated with status 1
Jul 16 11:34:35 desktop kernel: [ 1988.064675] init: dbus main process (2452) terminated with status 1
Jul 16 11:34:35 desktop kernel: [ 1988.064706] init: dbus main process ended, respawning
Jul 16 11:34:35 desktop kernel: [ 1988.069952] init: Unable to connect to the system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: Connection refused
Jul 16 11:34:35 desktop kernel: [ 1988.069994] init: plymouth-upstart-bridge main process (2454) terminated with status 1

Rachid Achellal (rachid-s) wrote :

It seems that the init script is not removing the follow files:
root@desktop:/var/run/dbus# ls
pid system_bus_socket

After I remove this and reboot the pc then it works.
Also the Xorg is starting normally

tags: added: oneiric
pacrook (paul-crook) wrote :

I can confirm I'm experiencing the same problem with dbus service failing to start.

Log reports "dbus main process ... terminated with signal 1". Desktops report "Cannot open ConsoleKit Session unable to open session failed to connect to socket /var/run/dbus/system_bus_socket connection refused." Many things then broken.

Deleting pid system_bus_socket in /var/run/dbus and rebooting cures it until the next reboot.

pacrook (paul-crook) wrote :

Also oneiric.

This bug is likely related to #807306

I my case the problem was "umountroot" not being called at system shutdown due to wrongly renumbered init scripts caused by a broken 3rd party package.

pacrook (paul-crook) wrote :

Hi Eduard, Thanks for the pointer (note 4).

Looks like this bug is a different aspect of the underlying problem reported in #807306, i.e. a broken transition from /var/run to /run. I manually replaced /var/run with a simlink to /run and /var/lock with a simlink to /run/lock (having moved all the contents of /var/run into /run) and then rebooted. This seems to have cured the problem.

I was also stuck with a "system needs a reboot to complete the upgrade" message, suggesting that something possibly went wrong with the transition upgrade? That message has now cleared itself, and as I said, I didn't trash the contents of /var/run just moved them to /run.

kvark (kvarkno1) wrote :

I've got the same problem and dbus version is the same too. I'm using the Oneiric's repositories.
After reading your comments I've made a one line script what's running on shutdown and clearing the /var/run/dbus folder's content.
Now the problem is solved for me.
Thanks for the idea.

Rachid Achellal (rachid-s) wrote :

The bug with the mountall is fixed. But this issue is still there.
I'm still getting this error messages after the reboot

Changed in dbus (Ubuntu):
status: New → Confirmed
magelan (magelan) wrote :

I get this error and abortion of the shutdown with 11.04 when shutting down from command line.

magelan (magelan) on 2011-08-08
tags: added: natty
pacrook (paul-crook) wrote :

Rachid, did you try fixing the /run directories?

There's a transition happening from /var/run to /run see bug #807306. In my case the update that was supposed to handle this transition didn't work.

You need to
(i) create directories /run and /run/lock,
(ii) move contents of /var/run into /run and /var/lock into /run/lock,
(iii) delete directories /var/run and /var/lock
(iv) create replacement simlinks; e.g. 'ln -s /run /var/run' and 'ln -s /run/lock /var/lock'

magelan (magelan) wrote :

I tried you suggestions. When booting it says "While mounting /var/lock there was an error." (translated)
The reason is, that there is no /run/lock directory, although I created it and created it again. It's deleted every time. How do I solve this?
And, since the change, the login takes longer and chromium does not start at all any more. The shutdown bug is not fixed (this all although I create the directory manually).

Rachid Achellal (rachid-s) wrote :

pacrook, that works for me

magelan (magelan) wrote :

Do you want me to create a new bug report for ubuntu 11.04?
How do I proceed now with the dbus message and the new problem?

Manfred Whiting (m-whiting) wrote :

#9 / pacrook - works .. manually copying the directories/reset the simlinks solves the problem .. had problems at upgrade so probably a script did not work.

duni (duni777) wrote :

I tested also this solution that affects my upgrade from 11.04, but no luck, doesnt work.

Daniel Fletcher (xyzzyman) wrote :

Had same issue after 11.04>11.10 BETA 2 upgrade. Moving the files and creating the symlinks in recovery fixed it as pacrock suggested. The issue with 'Restart to complete system updates' even when I haven't ran any updates still happens so may be unrelated.

Nicolas Diogo (nicolasdiogo) wrote :

having this problem after upgrading to 11.10

Nicolas Diogo (nicolasdiogo) wrote :


upgraded to 11.10

and had to create all simlynks manually

i got errors about dbus not been available - somehing to do with wrong PID under /var/run/dbus/pid

Steve Murray (steve-murray) wrote :

I also had this issue - upgrading from Natty + backports + experimental to Oneiric.
Thanks to your comments I was able to solve the problems with removing the pid & socket file and moving the /var/run bits too. Thanks!

Changed in dbus (Ubuntu):
importance: Undecided → Medium
Tiago Ramos (tiagolramos) wrote :

#9 solved my problem and i also removed the pid.

You saved my life... i was really stuck

Steven Haber (sthaber) wrote :

For me, this problem was caused by VMWare Workstation 8 leaving a mount point of some sort in /var/run. After umounting and symlinking manually (per the comments above) I was good to go.

daemonrebel (irishphoenix) wrote :

how did you remove the pid? It won't let me from root access via command line, prior to booting.

daemonrebel (irishphoenix) wrote :

I cannot boot until this problem is fixed. I was considering booting 11.4 and scrapping 11.10 altogether, but I don't know what files have changed since I last backed up.

Whatever help I could get to remove the pid/dbus thing via command line, would be really appreciated, thanks. Please give details on how you guys fixed the problem and what commands you used. I'm a linux/ubuntu noob and it's finals week, so the urgency of fixing this bug and logging in asap is extremely important.

daemonrebel (irishphoenix) wrote :

As far as I know, and what I've looked at, this isn't a bug I've experienced before when I was using 11.4, but shutting down properly was a completely separate issue.

The shutting down issue never stopped me from booting up, but this new 11.10 upgrade was a bad idea. I should have waited till we knew it was a stable release, before clicking yes to upgrade.

I'm kicking myself for upgrading so soon now.

Steven Haber (sthaber) wrote :


The following worked for me (borrowed from post #9):

You need to
(i) create directories /run and /run/lock,
(ii) move contents of /var/run into /run and /var/lock into /run/lock,
(iii) delete directories /var/run and /var/lock
(iv) create replacement simlinks; e.g. 'ln -s /run /var/run' and 'ln -s /run/lock /var/lock'

If you've never messed too much with Linux, it will be a little tricky. I booted w/o recovery console (it gets stuck in read only mode for me sometimes). Once you get to point where it's hanging and failing to boot further, hit ctrl-alt-F1. This will bring you to a virtual terminal. Log in as root or as a sudoer (you should be one). Attempt to move all the contents of the folders as described, like:

mkdir /run
mv /var/run/* /run]


If there is anything in these folders you cannot move or delete, it's possible it is a special mount point file. If rm <file> fails, try umount -fl <file> then attempt rm <file> again. After you move all of the contents, create the symlinks, reboot, and you should be okay.

Digulla-hepe (digulla-hepe) wrote :

Try the recipe from comment #24 if you see these errors during boot:

Waiting for network configuration...
Waiting up to 60 more seconds for network configuration...

or when you have odd timeouts during boot or when the KDE daemon crashes at startup.

Chris (farun) wrote :

Tried #24, at least I can boot again now. "Waiting for network configuration..." still appears and I can't set up a Wlan Hotspot anymore, just won't work. Need help....

Marko (markojovicic) wrote :

I have done recommended things, it works just for the first time. After reboot the same issue is present. :-( This is a really huge bug. I can not believe this is happening. I shouldn't upgrade that soon.

pd5rm (pd5rm) wrote :

Hit this as well. This is pretty severe bug, even though system does seem to eventually boot.

sandybarton (sandbar) wrote :

I only had to do the sim links to get it running. The files we already in place.

daemonrebel (irishphoenix) wrote :

I do have vmware installed, I also have playonlinux installed, gametree, and virtual box. vmware player is version 4. but not sure of the other versions.

I moved the directories and linked them like so, and that didn't work. Also, when I selected to encypt my home folder, I never moved the keys outside of the home folder, so unless I can log in non-read only mode, then I can't get to them.

Eventually, I decided to scrap the installation and just revert to 11.4. I don't think I'll upgrade until 11.10 is considered stable.

I think selecting the upgrade window was a bad idea, and if I was going to upgrade, I should just burn an installation cd and install regularly.

Same problem on my notebook, I fixed partially following the instructions in this email however i sill have to wait the hole "waiting 60 seconds more for network config" or something like that. after that the system bootups.

Woko (wolfram-koehn) wrote :

Same problem here after upgrading from 11.04 to 11.10.
After following the instructions from #24 it's working again.
Even the "Waiting for network configuration" issue is gone.

Thanks a lot !

wyginwys (wyginwys-hotmail) wrote :

This bugs affects me too also with the bug "Waiting for network connection"(or something like that) .After upgrading Kubuntu 11.04 64 bit to 11.10 and I remember I did a reboot and it was working. I guess, after I updated some packages and rebooted the machine I began to getting these messages. Now I am fresh installing Kubuntu 11.10 64bit.

wyginwys (wyginwys-hotmail) wrote :

Also want to add that Vmware Player was luckily(!) installed at the system.

mama21mama (mama21mama2000) wrote :

Lubuntu 11.10 affected.
               via puppy 511 ;)

stable ubuntu?

bwzhou (bwzhou) wrote :

If anyone still experience delay in system booting with message "waiting for network configuration" after following post #9, you can try to comment out the line "auto wlan0" in /etc/network/interfaces.

johnnyb0y (ubuntu64) wrote :

Followed post #24 and it's all working now. What a complete mess this upgrade was, from 11.04 to 11.10.

After following the instructions from #24 I discover in directory /run/lock another directory was created named "lock", in directory /run/lock/lock/ again a sudirectory "lock". This is repeating for more then 42 levels in dept. Using command "rmdir lock" in /run/lock delivers the message "failed to remove 'lock' : Device or resource busy"

Any suggestions how to solve this?

Otavio Ferreira (otaviofff) wrote :

Newbie here, sorry. This post is regarding comment #9, by Paul Crook.

Firstly, what are the exact command lines to be used?

Secondly, my file system already has a /run directory, populated with sub-directories such as /lock, /mount, and /udev. This is a different set of sub-directories when compared to /var/run.

Given the above, can I really move the latter set of sub-directories (/var/run) over to the former (/run)? Won't I override files or merge sub-directories in a way that can damage my system?

Thank you a lot.

palewire (ben-welsh) wrote :

I had this bug on my Dell Inspiron laptop, which I upgraded from 11.04 to 11.10. I upgraded using the software tool, and the process threw an error at the end related to nautlus-dropbox, though I couldn't tell if that stopped everything from finish or what.

I implemented fix #24, as described above. Everything is now running from /run symlinked to /run/lock, and it still is showing the error on my boot. This is not fixing my problem. I'm considering wiping the machine and reinstalling 11.10 from scratch, but color me very disappointed. I quickly upgrade my machines every time Ubuntu blows the trumpet, and I feel like I got let down on this one.

daemonrebel (irishphoenix) wrote :

I may be a newbie here, but I'm getting Certified in Network+ and Linux+ very soon, and as far as I'm concerned 11.4 is a stable version.

Under windows, I'm usually the type to update all the time, unless the update fails and in which case under windows, you can just system restore if something goes wrong.

Is there anything for Ubuntu like restore for windows?

This upgrade is tricky to install while logged in, so it's probably a better idea to back up files and do a clean install.

daemonrebel (irishphoenix) wrote :

Because of this bug, I'm probably not upgrading for a while, at least till I have a good reason.

11.4 works just fine and has plenty of free programs you can download using software center.

Scrap the upgrade till we know it's a stable version.

fmo (fmo) wrote :

Same problem here, I upgraded from Natty to Oneiric and it broke my system. I fixed the problem with the commands from #9

Woko (wolfram-koehn) wrote :

Otavio: In my case the '/run' directory also existed, so I simply omitted the 'mkdir' and moved the '/var/run' into it.
In order to remove the '/var/run' completely, I had to do a 'umount -fl /var/run/samba/'.
All this I did in a console-session (Strg/Alt F1) after stopping KDE (stop kde).
Couldn't do this in the recovery-console, because the filesystem was mounted readonly.

Aurélien COUDERC (coucouf) wrote :

Same problem here.
Strangely enough, the system booted yesterday after the upgrade, and broke afterwards, this morning.

nandha (andalmagan) wrote :

works excellent in my case
Thanks so much, everything back now

Henrique Sant'Anna (hsantanna) wrote :

got this error after upgrading from 11.04 to 11.10 and couldn't boot up anymore.

did what was in this post and solved the problem:


    Hit Ctrl+Alt+F1 at the blank screen to get you to a non-X terminal (tty1)
    Login in with your username and password
    Change to root with: sudo -i and enter your password
    mkdir -p /run /run/lock
    rm -rf /var/run /var/lock
    ln -s /run /var
    ln -s /run/lock /var

mama21mama (mama21mama2000) wrote :

remains a temporary solution .-

sigue siendo una solucion temporal.-

sergio (serge-simon) wrote :

Same problem for me.
Really a huge bug.
Migrated yesterday from 11.04 (which worked perfecly !) to this rather crappy and unstable 11.10 (there are really plenty of bugs in this release, including this severe one).

Tonny Hooijer (tonny-hooijer) wrote :

#9 did it for me too.
Exept i did not have to create /run and /run/lock

(i) create directories /run and /run/lock,
(ii) move contents of /var/run into /run and /var/lock into /run/lock,
(iii) delete directories /var/run and /var/lock
(iv) create replacement simlinks; e.g. 'ln -s /run /var/run' and 'ln -s /run/lock /var/lock'

I updated xubuntu 11:04 to 11:10
Now working again, thank you.

jerico (jerico-dev) wrote :

If I'm not mistaken then /run/lock should get the correct permissions, too.

This means executing as a final step:

(v) chmod 1777 /run/lock

Can someone from Ubuntu or a more experienced dev please confirm this?

adrian (adrianub) wrote :

Similar problem here, fixed using the above procedures.

/run existed, had some content
/lock existed, empty
/var/run had content, a directory vmblock-fuse couldn't be deleted until unmounted

I also noticed a crash dump during the upgrade, while attempting to close the wireless interface. My wireless interface was switched off (hardware switch) at the time, I was using wired ethernet.

Wireless and wired working fine after the fixes above. 3G dongle also looks ok (poor signal here, hard to be sure).

Belhorma Bendebiche (saziel) wrote :

I have the same problem on a fresh install of oneiric since initially rebooting it. I tried deleting /run/dbus/*, tried deleting and recreating the symlinks in /var/, nothing seems to help. I even got the error when I tried to dpkg-reconfigure dbus.

Unable to connect to the system bus: Failed to connect to socket /var/run/dbus/system_bus_socket

Alexander (roth-a) wrote :

#24 from RawwrBag (sthaber) did work for me! Thanks. And it was important to unmount the files.

erwinvdw (er-jo) wrote :

# 24 was for me also the solution yesterday.
But for the "not terminal experts" be carefull and look first if directory's exist, and when you make a directory take a look if the directory is in the right place. With the command "ls" you can see in which directory you are.

And don't forget to do changes as told in 24 in the console to use ctr-alt-f1, otherwise you get messages of files/directory's you can not delete.

* What i also did is a chmod 1777 on de directoy "lock" eg
cd /run
chmod 1777 lock
* i didn't delete the directory /var/run and var/lock ,but move the directory's because when you delete someting you never get it back.
cd /var
mv run run.bak
mv lock lock.back

Itehnological (itay-o) wrote :

I have a Lenovo 3000 N200. I upgraded from 11.04 to 11.10. I followed the instructions in #24 an the note in #52 and it worked perfectly for me. The X-ORG is fine, the 'restart to finish updates' message is gone and the 'Waiting for network configuration' is gone as well.
In conclusion it doesn't matter that this wasn't a stable version and i had a huge bug. I guess that you couldn't have known. The good thing is that you provided simple instructions for fixing the problem and they work.
Thanks lot.

Irving Duran (blacknred0) wrote :

indeed solution #24 worked for me as well on 11.10. Though my issues was different - I already had the upgrade made on my ubuntu server and has been using 11.10 for 2 months of so. All of the sudden I got this error message.

Solution #24 just solved my boot issues with Oneiric, which had just appeared. Thanks a lot!

Tom Hallam (thallam08) wrote :

#24 is not a solution - it is a workaround. /var/run is the correct location for most of these items.

mschoellhorn (hu6hzq0-michael) wrote :

I have the same problem and #24 doesnt resolve the issue for me: I am running a virtual machine based on KVM and bridged networking. And the network bridge doesnt come up any more. Therefore I cannot run the virtual machine any more. This is the output from virsh:

error: Failed to start domain vm
error: Failed to add tap interface to bridge 'br0': No such device

If I try to configure the bridge in /etc/network/interfaces the system disconnects completely. Can anybody help?

Alexander Adam (7ql6) wrote :

Like in #61 I am also affected by this bug but the possible bugfix which seems to help often don't work here.
I upgraded yesterday (25th of november) from 11.04. to 11.10.
All seem to work flawlessly but after an reboot keyboard and mouse are not responding under X11.
With Sysreq + r and e I can reach the console and in Xorg.0.log I get the same error message as described here (Failed to connect to socket /var/run/dbus/system_bus_socket: Connection refused).
dpkg-reconfigure dbus also leads to this message.

There are already symlinks pointing from /var/lock to /run/lock and from /var/run to /run and I also checked the permissions as described in #52.

Cleaning up /run/dbus also brought no success.

Do you have any suggestions for me?

cyp (lurapuy) wrote :

I got the exact same problem as #58 and solved it using Paul Crook # way : all of us at icyp.fr are really grateful as you saved our day ;-)

mama21mama (mama21mama2000) wrote :

#9 not working

Nothing really works. At every restart I delete / var / run / dbus / pid and / var / run / dbus / system_bus_socket

I should also delete / var / run / *. pid

Realmente nada funciona. A cada reinicio debo borrar /var/run/dbus/pid y /var/run/dbus/system_bus_socket

Tambien debo borrar /var/run/*.pid

John Doe (gehkacken02) wrote :

Unassigned must be busy, seeing as how many bugs he has to take care of lately.

Montblanc (montblanc) wrote :

I'm being affected by this bug since upgrading from quantal to raring.

tags: added: raring
Jörg Winkler (joewinkler) wrote :

I know, it's weird, but this simple command works for me:

sudo /etc/init.d/dbus restart

Now everything works fine.

#24 works fine for me, although i already had /var and /var/lock with all the data, only command i ran was to create symlinks,
after reboot, works fine for now, still cant believe it happened at the first place

Peter Reiser (williman9999) wrote :

I have this too. ProFtp throws this error after each disconnect of a ftp user:

roftpd: pam_systemd(proftpd:session): Failed to connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory

After I disable RequireValidShell in proftpd.conf it vanishes. BUT my users have a valid shell, according to etc/shell. proftpd user does not have a shell of course.
so for now I have disabled RequireValidShell.

The file /var/run/dbus/system_bus_socket DOES exist and proftg is in the group nogroup:

-rw-r--r-- 1 root root 6 Jan 20 15:00 pid
srwxrwxrwx 1 root root 0 Jan 20 15:00 system_bus_socket

of course system_bus_socket is owned by root, but what do i have to change, i dont care bout that file.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions