You are not logged in.
I am trying to use the --user mode of systemctl but I get errors when refreshing it. I have a headless machine so something is probably missing but I do not know what.
systemctl --user daemon-reload
Failed to get D-Bus connection: No such file or directory
Last edited by maggie (2015-10-13 20:51:29)
Offline
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I followed the three steps on the wiki but I experience a different error:
% systemd-run --user /bin/sleep 3600
Failed to start transient service unit: Process org.freedesktop.systemd1 exited with status 1
Created:
/etc/systemd/user/dbus.socket
/etc/systemd/user/dbus.service
/etc/systemd/system/user@.service.d/dbus.conf
Enabled:
# systemctl status dbus.socket
? dbus.socket - D-Bus System Message Bus Socket
Loaded: loaded (/usr/lib/systemd/system/dbus.socket; static; vendor preset: disabled)
Active: active (running) since Fri 2015-09-18 17:29:29 EDT; 10h ago
Listen: /run/dbus/system_bus_socket (Stream)
Sep 18 17:29:29 pepper systemd[1]: Listening on D-Bus System Message Bus Socket.
Last edited by maggie (2015-09-19 07:57:33)
Offline
Failed to get D-Bus connection: No such file or directory
is what systemd tells me for any `--user` cmd when logged in via ssh. Same command runs without issue when typed straight on that same box. There might be some missing point in the wiki, but cannot add it since I dunno myself what it is atm.
Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery ) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9
Offline
@maggie - I have found this to be the case too if I login remotely and use that command. Does that make 3 of us?
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Online
Weird, it works fine here using ssh... what is the output of the following commands if you run them in the ssh shell:
$ echo $XDG_RUNTIME_DIR
$ echo $DBUS_SESSION_BUS_ADDRESS
$ systemctl status dbus.service
Also, as stated in the wiki posted by Trilby, try removing any dbus.socket and dbus.service located under /etc/systemd/user/ or ~/.config/systemd/user/.
Last edited by mauritiusdadd (2015-10-11 09:24:22)
Offline
Login remotelly there's no $XDG* or $DBUS*
$ systemctl status dbus.service (issued localy) gives 10 of the following for yesterday
oct. 12 20:42:03 gwenael dbus[419]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.NetworkManager.service': Uni...rectory.
, of which none for my last attempts via ssh.
Note I have just moved ../systemd/user/dbus.{service,socket} then `systemctl daemon-reload` (nothing else).
Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery ) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9
Offline
I did a reinstall and everything works as expected.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Online
Login remotelly there's no $XDG* or $DBUS*
That could be a problem, XDG_RUNTIME_DIR should be set by systemd-logind at login through the module pam_systemd and DBUS_SESSION_BUS_ADDRESS relies on XDG_RUNTIME_DIR. If you are sure that there is a working dbus session for your user then, for testing purpose, you can try to set these environment variables manually
export XDG_RUNTIME_DIR="/run/user/$UID"
export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
and then check if systemctl --user works. However you should find out why those variable are not set.
Last edited by mauritiusdadd (2015-10-13 14:32:53)
Offline
Yes, in my case, the system build as from 2010 and likely contained config files I modified over the years. Upon the reinstall, everything just worked™ including systemd --user operations without the need to do any of that the steps on this wiki page.
Last edited by graysky (2015-10-13 14:16:50)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Online
Thank you for that. After I reinstalled user mode works.
Offline
@grayski and@maggie you reinstalled the whole OS to get a workin systemd, do I understand well?
On the machine --Original Arch install from June2010-- defaults are:
$ echo $DBUS_SESSION_BUS_ADDRESS
unix:abstract=/tmp/dbus-PTwPdTrPLa,guid=9af3a9d155aeb5652041db7c5624aec5 «-- does not exist
┌(kozaki@gwenael)─(0)─(01:05 jeu. oct. 22)
$ echo $XDG_RUNTIME_DIR
/run/user/1000
Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery ) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9
Offline
@kozaki: Your should find out why DBUS_SESSION_BUS_ADDRESS is wrong... in particular use
$ pacman -Qikk systemd
to check if the module pam_systemd is not corrupted. Also check if there is any pacnew that has not been merged yet.
There is a similar thread here: https://bbs.archlinux.org/viewtopic.php?id=176528
And this could be related too: https://bugs.archlinux.org/task/46369
Offline
Thank you for your time mauritius
$ pacman -Qikk systemd
Nom : systemd
Version : 226-3
<SNIP>
[Shows WARNINGs for a few missing localization files, nothing else]
Also boot always starts with a message like "version 224" (it's been a while I should have investigated this to understand what it refers to). But journal says
oct. 18 00:23:38 llewellyn systemd[1]: systemd 226 running in system mode. (+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS + <SNIP>
Seeded last month: Arch 50 gig, derivatives 1 gig
Desktop @3.3GHz 8 gig RAM, linux-ck
laptop #1 Atom 2 gig RAM, Arch linux stock i686 (6H w/ 6yrs old battery ) #2: ARM Tegra K1, 4 gig RAM, ChrOS
Atom Z520 2 gig RAM, OMV (Debian 7) kernel 3.16 bpo on SDHC | PGP Key: 0xFF0157D9
Offline
If pacman says there are altered/missing files then there is something wrong in your system... and first of all you should do a full system update because the latest version of systemd is 227-1. After the update, check again if there are still missing/altered files. The variable should be set by dbus.socket, so please post also the full output of the following commands
$ ls -la /etc/systemd/user
$ ls -la /etc/systemd/system
$ systemctl status --all dbus.socket
$ cat /usr/lib/systemd/user/dbus.socket
Offline