[lxc-users] a simple apt-get update fails with: Upstart: Failed to connect to socket

Ivan Ogai lxc-users at ogai.name
Thu Mar 31 13:31:30 UTC 2016


Hi Serge, hi Andrey,

* Serge Hallyn <serge.hallyn at ubuntu.com> [2016-03-21 21:40]:
> What does the full container configuration look like?
> What distro/release/init-system are running in the container?

* Andrey Repin <anrdaemon at yandex.ru> [2016-03-22 01:35]:
> And what is the host and guest OS ?…

Host and guest are both Ubuntu 14.04.
The config of the guest is:

# Distribution configuration
lxc.include = /usr/share/lxc/config/ubuntu.common.conf
lxc.include = /usr/share/lxc/config/ubuntu.userns.conf
lxc.arch = x86_64

# Container specific configuration
lxc.mount.auto = cgroup
lxc.aa_profile = lxc-container-default-with-nesting
lxc.id_map = u 0 100000 65536
lxc.id_map = g 0 100000 65536
lxc.rootfs = /home/stefanos/.local/share/lxc/grical/rootfs
lxc.utsname = grical

# Network configuration
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = lxcbr0
lxc.network.hwaddr = 00:16:3e:77:77:77


> > We have an unprivilaged container (created by a shell script) containing
> > a whole development environment. I.e. we use a LXC unprivilaged
> > container and a shell script as a convenient replacement for Vagrant for
> > us.
> 
> > A developer just tried to upgrade a package in the container named
> > 'grical', and it fails as shown below.
> 
> > We wonder why and how to fix it.
> 
> >     stefanos at bazooka:~/grical/provisionize$ lxc-attach -n grical
> >     root at grical:~/grical/provisionize# apt-get upgrade
> >     Reading package lists... Done
> >     Building dependency tree
> >     Reading state information... Done
> >     Calculating upgrade... Done
> >     The following packages will be upgraded:
> >     rabbitmq-server
> >     1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> >     Need to get 5,042 kB of archives.
> >     After this operation, 881 kB of additional disk space will be used.
> >     Do you want to continue? [Y/n] y
> >     Get:1 http://www.rabbitmq.com/debian/ testing/main rabbitmq-server all 3.6.1-1 [5,042 kB]
> >     Fetched 5,042 kB in 10s (497 kB/s)
> >     (Reading database ... 38702 files and directories currently installed.)
> >     Preparing to unpack .../rabbitmq-server_3.6.1-1_all.deb ...
> >     initctl: Unable to connect to Upstart: Failed to connect to socket
> > /com/ubuntu/upstart-session/1000/2641: Connection refused
> >     * Stopping message broker rabbitmq-server                              
> > initctl: Unable to connect to Upstart: Failed to connect to socket
> > /com/ubuntu/upstart-session/1000/2641: Connection refused
> >     invoke-rc.d: initscript rabbitmq-server, action "stop" failed.
> >     dpkg: warning: subprocess old pre-removal script returned error exit status 1
> >     dpkg: trying script from the new package instead ...
> >     initctl: Unable to connect to Upstart: Failed to connect to socket
> > /com/ubuntu/upstart-session/1000/2641: Connection refused
> >     * Stopping message broker rabbitmq-server                               * message broker already stopped
> >                                                                             [ OK ]
> >     dpkg: ... it looks like that went OK
> >     Unpacking rabbitmq-server (3.6.1-1) over (3.2.4-1) ...
> >     Processing triggers for ureadahead (0.100.0-16) ...
> >     Setting up rabbitmq-server (3.6.1-1) ...
> >     Installing new version of config file /etc/init.d/rabbitmq-server ...
> >     initctl: Unable to connect to Upstart: Failed to connect to socket
> > /com/ubuntu/upstart-session/1000/2641: Connection refused
> >     * Starting message broker rabbitmq-server                              
> > initctl: Unable to connect to Upstart: Failed to connect to socket
> > /com/ubuntu/upstart-session/1000/2641: Connection refused
> >     invoke-rc.d: initscript rabbitmq-server, action "start" failed.
> >     dpkg: error processing package rabbitmq-server (--configure):
> >     subprocess installed post-installation script returned error exit status 1
> >     Processing triggers for ureadahead (0.100.0-16) ...
> >     Errors were encountered while processing:
> >     rabbitmq-server
> >     E: Sub-process /usr/bin/dpkg returned an error code (1)


More information about the lxc-users mailing list