vivid - failed to connect to upstart: connection refused
Solution 1
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.
Solution 2
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
Solution 3
Here the solution. It's all about the recent VirtualBox update.
Run in terminal (Ctrl+Alt+F1 if you are acceding from recovery mode):
sudo apt-get purge virtualbox-guest-x11
Related videos on Youtube
matty87a
Updated on September 18, 2022Comments
-
matty87a over 1 year
Just updated via do-release-upgrade and now certain upstart jobs such as fail2ban and plexmediaserver will not start (have tried reinstalling)
$ sudo service fail2ban start Job for fail2ban.service failed. See "systemctl status fail2ban.service" and "journalctl -xe" for details. $ systemctl status fail2ban.service fail2ban.service - Fail2Ban Service Loaded: loaded (/lib/systemd/system/fail2ban.service; enabled; vendor preset: enabled) Active: failed (Result: start-limit) since Mon 2015-04-27 19:47:27 BST; 26s ago Docs: man:fail2ban(1) Process: 14423 ExecStart=/usr/bin/fail2ban-client -x start (code=exited, status=255) $ sudo service plexmediaserver start Failed to start plexmediaserver.service: Unit plexmediaserver.service failed to load: No such file or directory. $ sudo dpkg -i plexmediaserver_0.9.11.16.958-80f1748_amd64.deb (Reading database ... 88738 files and directories currently installed.) Preparing to unpack plexmediaserver_0.9.11.16.958-80f1748_amd64.deb ... stop: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
Any ideas with where to start on this?
-
TheSchwa about 9 yearsCan you add the contents of
/lib/systemd/system/fail2ban.service
to your post? Thefailed (Result: start-limit)
indicates that the service is constantly failing and trying to restart, andsystemd
is limiting how many times it starts in a given time period. Also wondering if this bug report is relevant. -
LF00 over 6 yearsstatus: Unable to connect to Upstart: may helps
-
-
TheSchwa about 9 yearsTaking a closer look at the output you posted, the job is apparently trying to start using
systemd
and notupstart
. Notice thatsystemctl
is mentioned several times, which is the command line interface tosystemd
. In addition, theFailed to connect to socket
error suggests thatupstart
is not running at all. It looks likefail2ban
is trying to usesystemd
but the script has an error, andplexmediaserver
is trying to useupstart
which no longer exists. -
TheSchwa about 9 yearsSee also askubuntu.com/questions/600026/… regarding
plexmediaserver
on 15.04 -
Ashley almost 9 yearsI got this also. I guess the example configs between versions was non-compatible.
-
BobTuckerman over 7 years@Kape Yes, it's being replaced by systemd. I do believe however that almost all of the upstart jobs will be backwards compatible to minimize the impact to end users during the transition process.
-
JqueryToAddNumbers over 7 yearsthe quick fix screwed up my ubuntu install (16.04) had to boot into recovery mode, with root prompt and type:
apt-get remove upstart-sysv
andupdate-initramfs -u
to get everything working again -
TheSchwa over 7 years@ExceptionSlayer srry to hear that :( I added a note in the answer about versions, since from the wiki "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."
-
Robin Zimmermann over 7 yearsThat happened to me, too, @ExceptionSlayer. Thank you for the instructions.
-
Greg G about 7 yearsThank you @ExceptionSlayer for your comment and saving my system. This quick fix screwed up my ubuntu install (16.04) as well.