sytemctl --user start results in “Failed to connect to bus: no such file or directory”
I'm on an Ubuntu server (16.04, via SSH), trying to set up a service to check mail, and following these instructions: https:/
When I enter:
systemctl --user start checkmail.timer
I get:
Failed to connect to bus: No such file or directory
I'm lost as to why. I followed the exact same instructions on a desktop 16.04 and had no issues.
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Ubuntu systemd Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Revision history for this message
|
#1 |
Revision history for this message
|
#2 |
Assuming you followes the guide to the letter, did you try:
systemctl --user start /home/$
You don't need to change the command, it uses BASH variables. Very handy
Revision history for this message
|
#3 |
Thanks -- but I'm getting the same result: "Failed to connect to bus: No
such file or directory".
On 2016-12-16 08:49, actionparsnip wrote:
> Your question #406793 on systemd in Ubuntu changed:
> https:/
>
> Status: Open => Answered
>
> actionparsnip proposed the following answer:
> Assuming you followes the guide to the letter, did you try:
>
> systemctl --user start /home/$
>
> You don't need to change the command, it uses BASH variables. Very handy
Revision history for this message
|
#4 |
This question was expired because it remained in the 'Open' state without activity for the last 15 days.
Revision history for this message
|
#5 |
I've still not been able to resolve this issue.
Revision history for this message
|
#6 |
This question was expired because it remained in the 'Open' state without activity for the last 15 days.
Revision history for this message
|
#7 |
I've still not been able to resolve this issue.
Revision history for this message
|
#8 |
What is the output of the command
ps -p1 | grep systemd && echo systemd || echo upstart
(just to conform whether you are running system and not upstart)
Revision history for this message
|
#9 |
Thanks, Manfred. Ran it and can confirm systemd.
Revision history for this message
|
#10 |
Try
XDG_RUNTIME_
(from https:/
Revision history for this message
|
#11 |
I get:
Failed to connect to bus: No such file or directory
I think the prior issue is incorrectly marked as solved. One of the comments mentions that they are also having the same issue. : \
Revision history for this message
|
#12 |
export XDG_RUNTIME_
export DBUS_SESSION_
What is the output on your system for the commands
echo $XDG_RUNTIME_DIR
echo $DBUS_SESSION_
ls -l /run/user/$UID
ls -l /run/user/$UID/bus
Revision history for this message
|
#13 |
Thanks again for all your help, Manfred.
Output:
user@user-
user@user-
user@user-
ls: cannot access '/run/user/1000': No such file or directory
user@user-
ls: cannot access '/run/user/
user@user-
user@user-
user@user-
/run/user/1000
user@user-
unix:path=
user@user-
ls: cannot access '/run/user/1000': No such file or directory
user@user-
ls: cannot access '/run/user/
user@user-
Failed to connect to bus: No such file or directory
Revision history for this message
|
#14 |
Just to clarify -- the original echo outputs ($XDG_RUNTIME_DIR, $DBUS_SESSION_
Revision history for this message
|
#15 |
are you sure that DBUS is correctly configured and running on your system?
Revision history for this message
|
#16 |
I'm not sure, sorry. Everything should be stock, though. I haven't tried to configure systemd. The only thing this sever has running is syncthing and these minor email clients (isync, msmtp, notmuch).
Revision history for this message
|
#17 |
This question was expired because it remained in the 'Open' state without activity for the last 15 days.
Revision history for this message
|
#18 |
Issue is still not resolved.
Revision history for this message
|
#19 |
This question was expired because it remained in the 'Open' state without activity for the last 15 days.
Revision history for this message
|
#20 |
Issue is still not resolved. Especially as this is on a server, I really would like to be able find some way to run scripts on it.
Revision history for this message
|
#21 |
Have you tried contacting the author of the document that you try to follow?
Revision history for this message
|
#22 |
Hi Manfred, I have not, because I have the issue with all systemd services I have tried to create.
I don't know much about systemd, but if I had to guess there seems to be something wrong with the default dbus setup.
Revision history for this message
|
#23 |
This question was expired because it remained in the 'Open' state without activity for the last 15 days.
Revision history for this message
|
#24 |
Still getting:
Failed to connect to bus: No such file or directory
System is up to date.
: (
Revision history for this message
|
#25 |
How did you install this server? Did you install Ubuntu 16.04, or did you start with an older Ubuntu release and upgrade to 16.04?
Do you see the possibility to do a new installation?
Revision history for this message
|
#26 |
I installed 16.04, sever edition -- no upgrade.
I'm not going to be able to do a fresh install any time soon, unfortunately.
It looks like others still have this issue: https:/
I can confirm the same output:
If I run "execute dbus-monitor", I get:
Failed to open connection to session bus: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_
Is there a way to set the address?
Revision history for this message
|
#27 |
Sure, its an environment variable. What is the output of:
env | grep DBUS
Thanks
Revision history for this message
|
#29 |
What is the output of
ps ax | grep -i dbus
Revision history for this message
|
#30 |
1111 ? Ss 0:00 /usr/bin/
9881 pts/1 S+ 0:00 grep --color=auto -i dbus
Revision history for this message
|
#31 |
This question was expired because it remained in the 'Open' state without activity for the last 15 days.
Revision history for this message
|
#32 |
Still facing this issue, unfortunately. System is up to date.
Revision history for this message
|
#33 |
This question was expired because it remained in the 'Open' state without activity for the last 15 days.
Revision history for this message
|
#34 |
Still have this issue.
Not sure if it's helpful, but I get the following with dbus-monitor.
Failed to open connection to session bus: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Is this the correct behavior for a server setup?
Revision history for this message
|
#35 |
This question was expired because it remained in the 'Open' state without activity for the last 15 days.