systemctl edit problem “Failed to connect to bus” The Next CEO of Stack OverflowFailed to get D-BUS connection (systemctl, pulse) after upgrade to 15.04How to reproduce “systemctl EDIT” behavior in Ubuntu LTSsystemctl, how to unmasksystemctl failed to connect to bus - docker ubuntu:16.04 containerInterpretting systemctl status outputsytemctl --user start results in “Failed to connect to bus: no such file or directory”systemctl status not showing CPU/Memory usage?systemctl failed to execute because it isnt a directoryUnable to use systemctlBoot time takes more than 5 minutes after moving partitions in Ubuntu 18.04
What does this strange code stamp on my passport mean?
Does Germany produce more waste than the US?
What difference does it make matching a word with/without a trailing whitespace?
Salesforce opportunity stages
Compensation for working overtime on Saturdays
Oldie but Goldie
What happens if you break a law in another country outside of that country?
Planeswalker Ability and Death Timing
What is the difference between 'contrib' and 'non-free' packages repositories?
Can Sri Krishna be called 'a person'?
Avoiding the "not like other girls" trope?
Is it a bad idea to plug the other end of ESD strap to wall ground?
My boss doesn't want me to have a side project
Is a distribution that is normal, but highly skewed, considered Gaussian?
How to unfasten electrical subpanel attached with ramset
Gauss' Posthumous Publications?
"Eavesdropping" vs "Listen in on"
How to compactly explain secondary and tertiary characters without resorting to stereotypes?
Why did the Drakh emissary look so blurred in S04:E11 "Lines of Communication"?
Shortening a title without changing its meaning
How do I secure a TV wall mount?
How to find if SQL server backup is encrypted with TDE without restoring the backup
How can I separate the number from the unit in argument?
Calculating discount not working
systemctl edit problem “Failed to connect to bus”
The Next CEO of Stack OverflowFailed to get D-BUS connection (systemctl, pulse) after upgrade to 15.04How to reproduce “systemctl EDIT” behavior in Ubuntu LTSsystemctl, how to unmasksystemctl failed to connect to bus - docker ubuntu:16.04 containerInterpretting systemctl status outputsytemctl --user start results in “Failed to connect to bus: no such file or directory”systemctl status not showing CPU/Memory usage?systemctl failed to execute because it isnt a directoryUnable to use systemctlBoot time takes more than 5 minutes after moving partitions in Ubuntu 18.04
When I attempt to create a new systemd unit (on Ubuntu 16.04)
$ sudo systemctl edit --user --full --force wagoOpenhabBridge.service
Failed to connect to bus: No such file or directory
Apart from this problem my systemd is running fine.
After some internet research, I checked these things:
- I'm not using docker, Ubuntu is running directly on Intel NUC x64 hardware
- systemd is running with PID=1
XDG variables in env are
XDGSESSIONID=1790
XDGDATADIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
XDGRUNTIMEDIR=/run/user/1000
Any ideas what is going wrong? What other things can I check?
systemd
bumped to the homepage by Community♦ 27 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
When I attempt to create a new systemd unit (on Ubuntu 16.04)
$ sudo systemctl edit --user --full --force wagoOpenhabBridge.service
Failed to connect to bus: No such file or directory
Apart from this problem my systemd is running fine.
After some internet research, I checked these things:
- I'm not using docker, Ubuntu is running directly on Intel NUC x64 hardware
- systemd is running with PID=1
XDG variables in env are
XDGSESSIONID=1790
XDGDATADIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
XDGRUNTIMEDIR=/run/user/1000
Any ideas what is going wrong? What other things can I check?
systemd
bumped to the homepage by Community♦ 27 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
1
Why are you usingsudo
to edit a user unit?
– muru
Feb 17 '18 at 14:17
add a comment |
When I attempt to create a new systemd unit (on Ubuntu 16.04)
$ sudo systemctl edit --user --full --force wagoOpenhabBridge.service
Failed to connect to bus: No such file or directory
Apart from this problem my systemd is running fine.
After some internet research, I checked these things:
- I'm not using docker, Ubuntu is running directly on Intel NUC x64 hardware
- systemd is running with PID=1
XDG variables in env are
XDGSESSIONID=1790
XDGDATADIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
XDGRUNTIMEDIR=/run/user/1000
Any ideas what is going wrong? What other things can I check?
systemd
When I attempt to create a new systemd unit (on Ubuntu 16.04)
$ sudo systemctl edit --user --full --force wagoOpenhabBridge.service
Failed to connect to bus: No such file or directory
Apart from this problem my systemd is running fine.
After some internet research, I checked these things:
- I'm not using docker, Ubuntu is running directly on Intel NUC x64 hardware
- systemd is running with PID=1
XDG variables in env are
XDGSESSIONID=1790
XDGDATADIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
XDGRUNTIMEDIR=/run/user/1000
Any ideas what is going wrong? What other things can I check?
systemd
systemd
edited Feb 18 '18 at 18:37
Zanna
51.2k13139242
51.2k13139242
asked Feb 17 '18 at 12:50
Stefaan VandeveldeStefaan Vandevelde
1112
1112
bumped to the homepage by Community♦ 27 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 27 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
1
Why are you usingsudo
to edit a user unit?
– muru
Feb 17 '18 at 14:17
add a comment |
1
Why are you usingsudo
to edit a user unit?
– muru
Feb 17 '18 at 14:17
1
1
Why are you using
sudo
to edit a user unit?– muru
Feb 17 '18 at 14:17
Why are you using
sudo
to edit a user unit?– muru
Feb 17 '18 at 14:17
add a comment |
2 Answers
2
active
oldest
votes
Is the dbus
package installed?
I've noticed a similar issue when running systemctl show $UNIT
as a user, with a connection attempted on /var/run/dbus/system_bus_socket
which only exists if dbus-daemon --system
is running, which itself needs the dbus
package to be installed.
You can investigate further by using strace
to check what syscalls are performed, and determine which exact issues this Failed to connect to bus: No such file or directory is about. Even if not trying to access the system bus, it's likely to be D-Bus related.
Your systemd
package might have dbus
in Recommends
(that's the case in Debian 9 at least); checking those is usually a good idea when something doesn't work as expected.
add a comment |
I just came across a similar problem, it was caused by trying to run a service as a user I was not logged in with (this user has login disable, and I was using su
and sg
to fake it).
Why sudo
?
You have probably added sudo
because the command was not working, you can safely remove it. A user systemd service is a regular file owned by the regular user.
Fixing Failed to connect to bus: No such file or directory
I found the solution on stackexchange, the DBUS_SESSION_BUS_ADDRESS
seems to be missing from your environment.
Your command can be run as this:
export XDG_RUNTIME_DIR="/run/user/$UID"
export DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus"
systemctl edit --user --full --force wagoOpenhabBridge.service
Running the command before login
If you want the service to be started before the user login, don't forget to run:
sudo loginctl enable-linger USERNAME
add a comment |
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1007055%2fsystemctl-edit-problem-failed-to-connect-to-bus%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is the dbus
package installed?
I've noticed a similar issue when running systemctl show $UNIT
as a user, with a connection attempted on /var/run/dbus/system_bus_socket
which only exists if dbus-daemon --system
is running, which itself needs the dbus
package to be installed.
You can investigate further by using strace
to check what syscalls are performed, and determine which exact issues this Failed to connect to bus: No such file or directory is about. Even if not trying to access the system bus, it's likely to be D-Bus related.
Your systemd
package might have dbus
in Recommends
(that's the case in Debian 9 at least); checking those is usually a good idea when something doesn't work as expected.
add a comment |
Is the dbus
package installed?
I've noticed a similar issue when running systemctl show $UNIT
as a user, with a connection attempted on /var/run/dbus/system_bus_socket
which only exists if dbus-daemon --system
is running, which itself needs the dbus
package to be installed.
You can investigate further by using strace
to check what syscalls are performed, and determine which exact issues this Failed to connect to bus: No such file or directory is about. Even if not trying to access the system bus, it's likely to be D-Bus related.
Your systemd
package might have dbus
in Recommends
(that's the case in Debian 9 at least); checking those is usually a good idea when something doesn't work as expected.
add a comment |
Is the dbus
package installed?
I've noticed a similar issue when running systemctl show $UNIT
as a user, with a connection attempted on /var/run/dbus/system_bus_socket
which only exists if dbus-daemon --system
is running, which itself needs the dbus
package to be installed.
You can investigate further by using strace
to check what syscalls are performed, and determine which exact issues this Failed to connect to bus: No such file or directory is about. Even if not trying to access the system bus, it's likely to be D-Bus related.
Your systemd
package might have dbus
in Recommends
(that's the case in Debian 9 at least); checking those is usually a good idea when something doesn't work as expected.
Is the dbus
package installed?
I've noticed a similar issue when running systemctl show $UNIT
as a user, with a connection attempted on /var/run/dbus/system_bus_socket
which only exists if dbus-daemon --system
is running, which itself needs the dbus
package to be installed.
You can investigate further by using strace
to check what syscalls are performed, and determine which exact issues this Failed to connect to bus: No such file or directory is about. Even if not trying to access the system bus, it's likely to be D-Bus related.
Your systemd
package might have dbus
in Recommends
(that's the case in Debian 9 at least); checking those is usually a good idea when something doesn't work as expected.
answered Jan 25 at 7:10
Cyril BruleboisCyril Brulebois
1
1
add a comment |
add a comment |
I just came across a similar problem, it was caused by trying to run a service as a user I was not logged in with (this user has login disable, and I was using su
and sg
to fake it).
Why sudo
?
You have probably added sudo
because the command was not working, you can safely remove it. A user systemd service is a regular file owned by the regular user.
Fixing Failed to connect to bus: No such file or directory
I found the solution on stackexchange, the DBUS_SESSION_BUS_ADDRESS
seems to be missing from your environment.
Your command can be run as this:
export XDG_RUNTIME_DIR="/run/user/$UID"
export DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus"
systemctl edit --user --full --force wagoOpenhabBridge.service
Running the command before login
If you want the service to be started before the user login, don't forget to run:
sudo loginctl enable-linger USERNAME
add a comment |
I just came across a similar problem, it was caused by trying to run a service as a user I was not logged in with (this user has login disable, and I was using su
and sg
to fake it).
Why sudo
?
You have probably added sudo
because the command was not working, you can safely remove it. A user systemd service is a regular file owned by the regular user.
Fixing Failed to connect to bus: No such file or directory
I found the solution on stackexchange, the DBUS_SESSION_BUS_ADDRESS
seems to be missing from your environment.
Your command can be run as this:
export XDG_RUNTIME_DIR="/run/user/$UID"
export DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus"
systemctl edit --user --full --force wagoOpenhabBridge.service
Running the command before login
If you want the service to be started before the user login, don't forget to run:
sudo loginctl enable-linger USERNAME
add a comment |
I just came across a similar problem, it was caused by trying to run a service as a user I was not logged in with (this user has login disable, and I was using su
and sg
to fake it).
Why sudo
?
You have probably added sudo
because the command was not working, you can safely remove it. A user systemd service is a regular file owned by the regular user.
Fixing Failed to connect to bus: No such file or directory
I found the solution on stackexchange, the DBUS_SESSION_BUS_ADDRESS
seems to be missing from your environment.
Your command can be run as this:
export XDG_RUNTIME_DIR="/run/user/$UID"
export DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus"
systemctl edit --user --full --force wagoOpenhabBridge.service
Running the command before login
If you want the service to be started before the user login, don't forget to run:
sudo loginctl enable-linger USERNAME
I just came across a similar problem, it was caused by trying to run a service as a user I was not logged in with (this user has login disable, and I was using su
and sg
to fake it).
Why sudo
?
You have probably added sudo
because the command was not working, you can safely remove it. A user systemd service is a regular file owned by the regular user.
Fixing Failed to connect to bus: No such file or directory
I found the solution on stackexchange, the DBUS_SESSION_BUS_ADDRESS
seems to be missing from your environment.
Your command can be run as this:
export XDG_RUNTIME_DIR="/run/user/$UID"
export DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus"
systemctl edit --user --full --force wagoOpenhabBridge.service
Running the command before login
If you want the service to be started before the user login, don't forget to run:
sudo loginctl enable-linger USERNAME
answered Feb 25 at 9:27
pimpim
1,9391925
1,9391925
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1007055%2fsystemctl-edit-problem-failed-to-connect-to-bus%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Why are you using
sudo
to edit a user unit?– muru
Feb 17 '18 at 14:17