Solve with SaltStack: initctl: `Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused`

24,007

Vivid now uses systemd instead of upstart.

You can try: "sudo systemctl start " instead.

I will post some of the contents of: https://wiki.ubuntu.com/SystemdForUpstartUsers. I ran into this problem with Ceph and used the above method to get around it.

Introduction

This document compares Upstart and systemd with a view to aiding in the transition to the latter.

Support status

First, it is important to note that systemd is only fully supported in Ubuntu 15.04 and later releases. While systemd is available in prior releases through the Ubuntu repositories, there is a deemphasis of support for these releases as noted here. Hence, it is advised to use the default upstart on prior releases.

System Init Daemon

This has changed as part of the Ubuntu 15.04 devel cycle.

Ubuntu 15.04 (using Systemd by default):

Systemd runs with PID 1 as /sbin/init.

Upstart runs with PID 1 as /sbin/upstart. 

Prior versions (using Upstart by default):

Upstart runs with PID 1 as /sbin/init.

Systemd runs with PID 1 as /lib/systemd/systemd. 

Switching init systems

If you are running Ubuntu vivid (15.04), you can easily switch between upstart and systemd at will since both packages are installed at present. As of March 9 2015, vivid was changed to use systemd by default, before that upstart was the default.

Switch to upstart for a single boot

In grub, select "Advanced options for Ubuntu", where you will find an "Ubuntu, with Linux ... (upstart)" entry. This will boot with init=/sbin/upstart.

If you have upstart-sysv installed and thus boot with upstart by default, there will be an "Ubuntu, with Linux ... (systemd)" entry, which will boot with init=/lib/systemd/systemd.

Permanent switch back to upstart

Install the upstart-sysv package, which will remove ubuntu-standard and systemd-sysv (but should not remove anything else -- if it does, yell!), and run sudo update-initramfs -u. After that, grub's "Advanced options" menu will have a corresponding "Ubuntu, with Linux ... (systemd)" entry where you can do an one-time boot with systemd.

If you want to switch back to systemd, install the systemd-sysv and ubuntu-standard packages.

Currently you can switch to upstart, notify the developers of the package in question of the need to support systemd.

Share:
24,007
Nathan Basanese
Author by

Nathan Basanese

“It's not so important to be serious as it is to be serious about the important things. The monkey has an expression of seriousness that would do credit to any great scholar. But the monkey is serious because he itches.” After I dropped out of public school in second grade, I home-schooled myself through high school, and attended four colleges on his way to earning his official degree. I'm a self taught high-rent IT monkey and privacy enthusiast. I've worked at Bitcoin startups, at Tesla, WebEx, and as a security advisor to RiskBazaar. On top of that, I've won a hackathon, worked as a Systems Engineer/Architect for Cisco WebEx, and advised a Bitcoin startup. My most recent role was implementation of security systems, but I have worked my way up to a position as a sort of hands-on architect at DigitalOnUs, working with various clients among the Fortune 2000.

Updated on October 31, 2020

Comments

  • Nathan Basanese
    Nathan Basanese over 3 years

    I got the following error when I attempted "vagrant up" on the standard ubuntu/vivid64 with virtualbox: initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused

    The full error stream is here: https://pastee.org/hnh8x Be sure to say hello to our old friend stdin: is not a tty.

    Please find the relevant Vagrantfile here: https://pastee.org/sfyb7, created with vagrant init --force ubuntu/vivid64 https://cloud-images.ubuntu.com/vagrant/vivid/current/vivid-server-cloudimg-amd64-vagrant-disk1.box.

    Can I fix this error with Saltstack provisioning? If so, how?

    The closest bit of Saltstack documentation I found related to Upstart follows: http://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.upstart.html

    The Ubuntu documentation on the subject, here, https://wiki.ubuntu.com/SystemdForUpstartUsers, recommends the installation of the upstart-sysv package. Is that all that's required to change back using Saltstack?

    The following does not seem to resolve the boot issues:

    upstart-sysv:
      pkg.installed
    

    Is there anything I can add to this to help solve the problem?