vivid - failed to connect to upstart: connection refused

Ubuntu switched to systemd as its service framework starting in 15.04 for all flavors, including Desktop and Server. The recommended practice is to change your upstart jobs to systemd jobs (see the wiki article for more info). You can also switch back to upstart if you want, which is certainly the quicker fix. I recommend you read the first few sections of the wiki article to weight the pros and cons.

Recommended Fix

Refer to the wiki article to transition your upstart scripts to systemd.

Discussion and coding guide: Systemd For Upstart Users

Quick Fix (for 15.04 only)

To permanently switch back to upstart just run:

sudo apt-get install upstart-sysv
sudo update-initramfs -u
sudo reboot

EDIT: The wiki article only recommends this for 15.04, but some users have found it helpful on 16.04 too.


I found the problem for fail2ban was an error in the configuration file: /etc/fail2ban/jail.local

In the pam section, the port variable is listed twice

[pam-generic]

...

port     = all
banaction = iptables-allports
port     = anyport

Even though this section is disabled (enabled = false) in my configuration, this causes an error. I simply commented out this second definition

# port     = anyport

I found this by running fail2ban manually:

sudo fail2ban-client start