Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
systemd-logind can't start because /run/dbus does not exist
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
tinloaf
n00b
n00b


Joined: 08 Dec 2005
Posts: 12

PostPosted: Fri Mar 30, 2018 12:30 pm    Post subject: systemd-logind can't start because /run/dbus does not exist Reply with quote

Hi.

My system has trouble booting. It can all be traced back to systemd-logind (and some other services) not starting, because they can't find a dbus socket under /run/dbus:

Code:

Mar 30 13:44:37 janeway systemd[1]: Reached target Basic System.
Mar 30 13:44:37 janeway systemd[1]: System is tainted: var-run-bad
Mar 30 13:44:37 janeway systemd[1]: Started D-Bus System Message Bus.
Mar 30 13:44:37 janeway systemd[1]: Failed to connect to API bus: No such file or directory
Mar 30 13:44:37 janeway systemd[1]: Failed to connect to system bus: No such file or directory
Mar 30 13:44:37 janeway systemd[1]: Failed to connect to API bus: No such file or directory
Mar 30 13:44:37 janeway systemd[1]: Failed to connect to system bus: No such file or directory
Mar 30 13:44:37 janeway systemd[1]: Failed to connect to API bus: No such file or directory
Mar 30 13:44:37 janeway systemd[1]: Failed to connect to system bus: No such file or directory
Mar 30 13:44:37 janeway systemd[1]: Failed to connect to API bus: No such file or directory
Mar 30 13:44:37 janeway systemd[1]: Failed to connect to system bus: No such file or directory
Mar 30 13:44:37 janeway systemd[1]: Starting Profile-sync-daemon...
Mar 30 13:44:37 janeway systemd[1]: Failed to connect to API bus: No such file or directory
Mar 30 13:44:37 janeway systemd[1]: Failed to connect to system bus: No such file or directory
Mar 30 13:44:37 janeway systemd[1]: Starting Network Manager...
Mar 30 13:44:37 janeway systemd[1]: Failed to connect to API bus: No such file or directory
Mar 30 13:44:37 janeway systemd[1]: Failed to connect to system bus: No such file or directory
Mar 30 13:44:37 janeway systemd[1]: Starting Run SSD related scripts...
Mar 30 13:44:37 janeway systemd[1]: Failed to connect to API bus: No such file or directory
Mar 30 13:44:37 janeway systemd[1]: Failed to connect to system bus: No such file or directory
Mar 30 13:44:37 janeway systemd[1]: Starting Login Service...
Mar 30 13:44:37 janeway systemd[1]: Reached target Timers.
Mar 30 13:44:37 janeway systemd[1]: Failed to connect to API bus: No such file or directory
Mar 30 13:44:37 janeway systemd[1]: Failed to connect to system bus: No such file or directory
Mar 30 13:44:37 janeway systemd-logind[709]: Failed to connect to system bus: No such file or directory
Mar 30 13:44:37 janeway systemd-logind[709]: Failed to fully start up daemon: No such file or directory
Mar 30 13:44:37 janeway systemd[1]: systemd-logind.service: Main process exited, code=exited, status=1/FAILURE
Mar 30 13:44:37 janeway systemd[1]: systemd-logind.service: Failed with result 'exit-code'.
Mar 30 13:44:37 janeway systemd[1]: Failed to start Login Service.


Looking at my system, the dbus socket is correctly created under /var/run/dbus - just not symlinked (or whatever) to /run/dbus. As soon as I create the symlink myself (i.e., "link -s /var/run/dbus /run/dbus"), everything starts and works.

I think this might be related to the "System is tainted: var-run-bad" message in the log above, but I really can't figure out what that means or how to fix it. This bug ( https://github.com/systemd/systemd/issues/7683 ) suggests it is caused by something being mounted to /var, but that is not the case on my system:

Code:

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,noexec,size=5983480k,nr_inodes=1495870,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,noexec)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,mode=755)
/dev/mapper/luks-cb679acf-8ae1-4fca-a1e1-9e5f940ee459 on / type ext4 (rw,noatime,data=ordered)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=12058)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
tmpfs on /tmp type tmpfs (rw,relatime)
tmpfs on /var/tmp type tmpfs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/mapper/data-crypt on /mnt/data type ext4 (rw,noatime,stripe=32748,data=ordered)
/dev/mapper/data-crypt on /mnt/daten type ext4 (rw,noatime,stripe=32748,data=ordered)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1198044k,mode=700,uid=1000,gid=1000)


Does anybody see the problem?

In case that it's useful…
* here is a full journalctl -b output: https://privatebin.net/?f72e4ea8100ca156#pvhykzoW4Vw5nJdjMAcUF78l5kqPnUMoU7+7KhrZsgQ=
* here is a full dmesg output: https://privatebin.net/?bff5503ec099c7f3#oiZ5erAqyMQeJ1Ae9wMEJ9uEHGNtUchzF3JjghVZZ+U=

Thanks for any help!
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 6717
Location: almost Mile High in the USA

PostPosted: Fri Mar 30, 2018 4:27 pm    Post subject: Reply with quote

How do you have /var/run set up?

/run should be tmpfs set up by systemd startup scripts (which looks to be the case).

/var/run should be a symlink to /run -- at least it's this way on my working box.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
tinloaf
n00b
n00b


Joined: 08 Dec 2005
Posts: 12

PostPosted: Thu Apr 05, 2018 8:33 pm    Post subject: Reply with quote

Thanks, making /var/run a symlink to /run worked like a charm!

I wonder how this got messed up, though. Which portage package should create this symlink? baselayout? I wonder if there are other directories that are not set up correctly…
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5135

PostPosted: Fri Apr 06, 2018 7:25 am    Post subject: Reply with quote

OpenRC has had code to automatically solve this situation for a while - the news item isn't in `eselect news list` any more, so I'd guess since about 10 years ago. Systemd is defective if it doesn't do the same.
Back to top
View user's profile Send private message
BuzzAlderaan
n00b
n00b


Joined: 05 Jun 2018
Posts: 1

PostPosted: Tue Jun 05, 2018 4:24 pm    Post subject: Reply with quote

tinloaf wrote:

I wonder how this got messed up, though. Which portage package should create this symlink? baselayout? I wonder if there are other directories that are not set up correctly…


Were you ever able to figure this out? I am experiencing the same issue and creating the symlink worked, but I'm afraid that will only be temporary until the next time I have to reboot.
Back to top
View user's profile Send private message
cjmayo
n00b
n00b


Joined: 05 Nov 2004
Posts: 27

PostPosted: Wed Jun 13, 2018 6:56 pm    Post subject: Reply with quote

It won't be temporary.

On the systemd point, if no /var/run exists systemd can also create it as a result of /usr/lib/tmpfiles.d/var.conf.
Back to top
View user's profile Send private message
Yamakuzure
Advocate
Advocate


Joined: 21 Jun 2006
Posts: 2208
Location: Bardowick, Germany

PostPosted: Thu Jun 14, 2018 7:32 am    Post subject: Reply with quote

If somewhere in the past you (or something you did) caused an 'mkdir /var/run', then nothing but yourself can fix that for you.

In other words: Neither systemd, openrc nor opentmpfiles can create a symlink where a directory already exists. ;-)

(I would be very mad at any dev who released a software that goes 'rm -rf' on my directories!)
_________________
Yeah, If you're going through hell
Keep on moving, Face that fire
Walk right through it, You might get out
Before the devil even knows you're there


Last edited by Yamakuzure on Fri Jun 15, 2018 9:19 am; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12610

PostPosted: Fri Jun 15, 2018 2:01 am    Post subject: Reply with quote

Long ago, /var/run was a directory on which a tmpfs was mounted during early boot to provide writable storage. At some point, someone decided it was inconvenient requiring that /var be mounted before this could be done, so they created /run and began using that. A compatibility symlink was supposed to be created so that programs not adapted to the new standard would still play along.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum