Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to connect to bus: No such file or directory #1022

Closed
rvrignaud opened this issue Apr 14, 2016 · 6 comments · Fixed by #1055
Closed

Failed to connect to bus: No such file or directory #1022

rvrignaud opened this issue Apr 14, 2016 · 6 comments · Fixed by #1055

Comments

@rvrignaud
Copy link

Hello,

It seems that package behavior changed for 0.12.
I'm not able to install telegraf debian package 0.12.0-1 inside a docker container anymore (on image ubuntu:1604).

Following is not working:

FROM ubuntu:16.04
RUN apt-get update
RUN apt-get install -y wget
RUN wget http://get.influxdb.org/telegraf/telegraf_0.12.0-1_amd64.deb
RUN dpkg -i telegraf_0.12.0-1_amd64.deb
Step 5 : RUN dpkg -i telegraf_0.12.0-1_amd64.deb
 ---> Running in 32380922ea7a
Selecting previously unselected package telegraf.
(Reading database ... 7528 files and directories currently installed.)
Preparing to unpack telegraf_0.12.0-1_amd64.deb ...
Unpacking telegraf (0.12.0-1) ...
Setting up telegraf (0.12.0-1) ...
Created symlink /etc/systemd/system/telegraf.service, pointing to /lib/systemd/system/telegraf.service.
Created symlink /etc/systemd/system/multi-user.target.wants/telegraf.service, pointing to /lib/systemd/system/telegraf.service.
Failed to connect to bus: No such file or directory
Failed to connect to bus: No such file or directory
dpkg: error processing package telegraf (--install):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 telegraf
The command '/bin/sh -c dpkg -i telegraf_0.12.0-1_amd64.deb' returned a non-zero code: 1

Whereas telegraf 0.11 is working:

FROM ubuntu:16.04
RUN apt-get update
RUN apt-get install -y wget
RUN wget http://get.influxdb.org/telegraf/telegraf_0.11.0-1_amd64.deb
RUN dpkg -i telegraf_0.11.0-1_amd64.deb
@sparrc
Copy link
Contributor

sparrc commented Apr 14, 2016

this is the same issue as #1016, it appears that your system's systemd is broken

@sparrc sparrc closed this as completed Apr 14, 2016
@rvrignaud
Copy link
Author

Hi @sparrc,

My systemd is not broken, it's only not running as I'm in a container build.
It's a perfectly legitimate situation so IMHO there is a problem with the post-install script that require systemd to be running (which is not the case in a docker container). Again the behaviour changed between 0.11 and 0.12.

I think this issue should be reopenned.

@sparrc
Copy link
Contributor

sparrc commented Apr 16, 2016

why don't you use the tarballs then? how would you expect to install a debian service without a service manager running?

@rvrignaud
Copy link
Author

In case of telegraf, I could indeed use a tarbal, but it's less convenient.
I'm not sure how is managed the service installation but I install a lot of daemon inside a container with debian packages (nginx, bind, postfix, etc ) none of them are failing because systemd is not running.

@sparrc
Copy link
Contributor

sparrc commented Apr 17, 2016

@rvrignaud And how do you control those services? do you use a service manager?

@sparrc sparrc reopened this Apr 17, 2016
@rvrignaud
Copy link
Author

This services could be started directly by command / entry point or using a small init system like supervisord.
Any way at docker build time, the init manager will not be running.
Maybe the solution is just not to fail and not exit != 0 in post-install script if systemd is not running ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants