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

apt-get upgrade fails - problems with udev #143

Closed
nshanny opened this Issue Apr 12, 2016 · 33 comments

Comments

Projects
None yet
@nshanny
Copy link

nshanny commented Apr 12, 2016

I have completely uninstalled and reinstalled and continue to receive the following errors:

root@localhost:/var# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
libfreetype6 os-prober
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Can not write log (Is /dev/pts mounted?) - openpty (2: No such file or directory)
Setting up udev (204-5ubuntu20.19) ...
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: No such file or directory
runlevel:/var/run/utmp: No such file or directory

  • udev requires devtmpfs support, not started
    ...fail!
    invoke-rc.d: initscript udev, action "restart" failed.
    dpkg: error processing package udev (--configure):
    subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of systemd-services:
    systemd-services depends on udev (>= 175-0ubuntu23); however:
    Package udev is not configured yet.

dpkg: error processing package systemd-services (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libpam-systemd:amd64:
No apport report written because the error message indicates its a followup error from a previous failure. libpam-systemd:amd64 depends on systemd-services (= 204-5ubuntu20.19); however:

Package systemd-services is not configured yet.

dpkg: error processing package libpam-systemd:amd64 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of initramfs-tools:
No apport report written because the error message indicates its a followup error from a previous failure. initramfs-tools depends on udev (>= 147~-5); however:

Package udev is not configured yet.

dpkg: error processing package initramfs-tools (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
udev
systemd-services
libpam-systemd:amd64
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

@mindleak

This comment has been minimized.

Copy link

mindleak commented Apr 12, 2016

I am having this identical issue.

@plessbd

This comment has been minimized.

Copy link

plessbd commented Apr 12, 2016

thought the crash log I got might be useful, also note that I didnt install bash on windows until 2016-04-11 so I am not sure what the 2016-03-23 commands are from

root@localhost:/var/crash# cat /var/crash/udev.0.crash
ProblemType: Package
Architecture: amd64
Date: Mon Apr 11 15:09:17 2016
Package: udev 204-5ubuntu20.19
SourcePackage: systemd
ErrorMessage:
 subprocess installed post-installation script returned error exit status 1
DpkgTerminalLog:

 Log started: 2016-03-23  20:54:26
 Log ended: 2016-03-23  20:54:50

 Log started: 2016-04-11  15:03:36
 Log ended: 2016-04-11  15:03:42

 Log started: 2016-04-11  15:08:57

DpkgHistoryLog:

 Start-Date: 2016-03-23  20:54:26
 Commandline: apt-get --purge remove --assume-yes grub-common grub-gfxpayload-lists grub-legacy-ec2 grub-pc grub-pc-bin linux-headers-3.13.0-83 linux-headers-3.13.0-83-generic linux-headers-generic linux-headers-virtual linux-image-3.13.0-83-generic linux-image-virtual linux-virtual
 Purge: grub-gfxpayload-lists:amd64 (0.6), linux-headers-generic:amd64 (3.13.0.83.89), linux-image-3.13.0-83-generic:amd64 (3.13.0-83.127), linux-headers-3.13.0-83-generic:amd64 (3.13.0-83.127), linux-image-virtual:amd64 (3.13.0.83.89), grub-common:amd64 (2.02~beta2-9ubuntu1.7), linux-virtual:amd64 (3.13.0.83.89), linux-headers-virtual:amd64 (3.13.0.83.89), grub2-common:amd64 (2.02~beta2-9ubuntu1.7), grub-legacy-ec2:amd64 (0.7.5-0ubuntu1.17), linux-headers-3.13.0-83:amd64 (3.13.0-83.127), grub-pc-bin:amd64 (2.02~beta2-9ubuntu1.7), grub-pc:amd64 (2.02~beta2-9ubuntu1.7)
 End-Date: 2016-03-23  20:54:50

 Start-Date: 2016-04-11  15:03:36
 Commandline: apt-get install git
 Install: liberror-perl:amd64 (0.17-1.1, automatic), git-man:amd64 (1.9.1-1ubuntu0.3, automatic), git:amd64 (1.9.1-1ubuntu0.3)
 End-Date: 2016-04-11  15:03:42

 Start-Date: 2016-04-11  15:08:57
 Commandline: apt-get upgrade
 Upgrade: apt:amd64 (1.0.1ubuntu2.11, 1.0.1ubuntu2.12), initramfs-tools-bin:amd64 (0.103ubuntu4.2, 0.103ubuntu4.3), libsystemd-login0:amd64 (204-5ubuntu20.18, 204-5ubuntu20.19), systemd-services:amd64 (204-5ubuntu20.18, 204-5ubuntu20.19), apt-transport-https:amd64 (1.0.1ubuntu2.11, 1.0.1ubuntu2.12), apt-utils:amd64 (1.0.1ubuntu2.11, 1.0.1ubuntu2.12), libsystemd-daemon0:amd64 (204-5ubuntu20.18, 204-5ubuntu20.19), libpam-systemd:amd64 (204-5ubuntu20.18, 204-5ubuntu20.19), libapt-inst1.5:amd64 (1.0.1ubuntu2.11, 1.0.1ubuntu2.12), udev:amd64 (204-5ubuntu20.18, 204-5ubuntu20.19), initramfs-tools:amd64 (0.103ubuntu4.2, 0.103ubuntu4.3), libudev1:amd64 (204-5ubuntu20.18, 204-5ubuntu20.19), libapt-pkg4.12:amd64 (1.0.1ubuntu2.11, 1.0.1ubuntu2.12), tzdata:amd64 (2016b-0ubuntu0.14.04, 2016c-0ubuntu0.14.04), cloud-init:amd64 (0.7.5-0ubuntu1.17, 0.7.5-0ubuntu1.18), libpcre3:amd64 (8.31-2ubuntu2.1, 8.31-2ubuntu2.2)
AptOrdering:
 libapt-pkg4.12: Install
 libapt-pkg4.12: Configure
 apt: Install
 apt: Configure
 libpcre3: Install
 libpcre3: Configure
 libapt-inst1.5: Install
 udev: Install
 libudev1: Install
 libpam-systemd: Install
 systemd-services: Install
 libsystemd-daemon0: Install
 libsystemd-login0: Install
 tzdata: Install
 tzdata: Configure
 apt-utils: Install
 initramfs-tools: Install
 initramfs-tools-bin: Install
 apt-transport-https: Install
 cloud-init: Install
 libapt-inst1.5: Configure
 libudev1: Configure
 udev: Configure
 libsystemd-daemon0: Configure
 systemd-services: Configure
 libpam-systemd: Configure
 libsystemd-login0: Configure
 apt-utils: Configure
 initramfs-tools-bin: Configure
 initramfs-tools: Configure
 apt-transport-https: Configure
 cloud-init: Configure
Dmesg:
Df:
root@localhost:/var/crash#
@nuclearmistake

This comment has been minimized.

Copy link

nuclearmistake commented Apr 12, 2016

If they're not explicit dependencies of something you need, remove systemd/upstart and autoremove --purge? at best, they would only no-op. udev seems likely to be irrelevant as well.

@plessbd

This comment has been minimized.

Copy link

plessbd commented Apr 12, 2016

I actually got this after trying to an apt-get autoremove

If I try to remove upstart apt wants to install anacron, as well as remove a lot of things.

root@localhost:/mnt/c/WINDOWS/system32# apt-get remove upstart
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  anacron
Suggested packages:
  default-mta mail-transport-agent
The following packages will be REMOVED:
  accountsservice cron cryptsetup dbus friendly-recovery
  language-selector-common libpam-systemd mountall overlayroot plymouth
  plymouth-theme-ubuntu-text policykit-1 systemd-services ubuntu-minimal
  ubuntu-standard upstart ureadahead
The following NEW packages will be installed:
  anacron
0 upgraded, 1 newly installed, 17 to remove and 0 not upgraded.
4 not fully installed or removed.
Need to get 26.2 kB of archives.
After this operation, 8,788 kB disk space will be freed.
Abort. want to continue? [Y/n]
@nuclearmistake

This comment has been minimized.

Copy link

nuclearmistake commented Apr 12, 2016

dpkg --get-selections | grep -E '^upstart|^udev'
udev                                            deinstall
upstart                                         deinstall

unless you're using one of them, they're not necessary. Plymouth is the little ubuntu splash screen that shows during boot of a ubuntu system (or the text [OK] messages)... the other ones are similarly unapplicable to the bash shell.

maybe some day microsoft will wrap upstart in startup tasks, but until then, none of its jobs ever happen.

If it is a dependency of something you actually need to have, you might have to package your own deb with neutered upstart support and without the dependency, or source install, that is, if you care about apt-get upgrading :-P

@plessbd

This comment has been minimized.

Copy link

plessbd commented Apr 12, 2016

I am on the preview fast track, if there is ANYTHING that I NEED, I am doing something extremely wrong. :)

I am only reporting because of how easy this was to get to without doing really "anything" crazy.

my entire history was

apt-get install git
apt-get update
apt-get upgrade

and then I got the message that i could do the autoremove
I tried the auto remove and these were the error messages I got.

So this really doesnt seem like something I did that would be out of the ordinary for anyone to have happen.

My machine is completely for testing, so it is a very base system. I installed the browsers and atom. Other than that I dont have anything on this machine.

@nuclearmistake

This comment has been minimized.

Copy link

nuclearmistake commented Apr 12, 2016

much of the linux-y stuff's broken out of the box because the ubuntu-standard metapackage (which is installed by the bash for windows installer) has dependencies that break apt-get upgrade... but that aren't strictly necessary for a vast majority of the things that DO work

@russalex

This comment has been minimized.

Copy link
Contributor

russalex commented Apr 12, 2016

This is an issue that everyone will start seeing. We need to add something on this in our official docs.

As @nuclearmistake points out, udev is something that breaks in apt-get but the errors should not cause any issues in WSL. We have reached out to Canonical on this one asking for the best solution and they recommend the following changes:

Write the following to /usr/sbin/policy-rc.d

#!/bin/sh
exit 101

chmod +x /usr/sbin/policy-rc.d
dpkg-divert --local --rename --add /sbin/initctl
ln -s /bin/true /sbin/initctl

I have tried this one myself and it looks to work quite well.

@nuclearmistake

This comment has been minimized.

Copy link

nuclearmistake commented Apr 12, 2016

copy+pasta-able version of canonical's fix via @russalex

cat > /usr/sbin/policy-rc.d <<EOF
#!/bin/sh
exit 101
EOF
chmod +x /usr/sbin/policy-rc.d
dpkg-divert --local --rename --add /sbin/initctl
ln -s /bin/true /sbin/initctl

Confirmed to allow apt-get upgrade with the ubuntu-standard metapackage installed.
Thanks for the hookup, m8

@maarten256

This comment has been minimized.

Copy link

maarten256 commented Apr 13, 2016

@nuclearmistake suggestion works for me.

@nshanny

This comment has been minimized.

Copy link

nshanny commented Apr 13, 2016

The suggestion works. Thanks. A fun project to hack on. It would be really, really cool if you somehow open sourced this project so the community could commit fixes/solutions. Just saying...

@benhillis

This comment has been minimized.

Copy link
Member

benhillis commented Apr 13, 2016

Thanks for hacking away! We are humbled by the excitement the development community has shown thus far. Open sourcing the project is something we are investigating but nothing to share at this time. Stay tuned!

@Tornevall

This comment has been minimized.

Copy link

Tornevall commented Apr 14, 2016

I have a few installation scripts that normally is started from "real" Ubuntu servers and they are dependent on the upgrading part. Running that script in a "Windows Bash" may give quite big problems with broken dependencies, so I've built a very simple script that tries to find out if the instance is actually running from Windows (since I need to find out if it does). Since the version for Windows don't act the same way, I've found a way, but it would be interesting with getting some feedback on this, since there may be even better methods to find out if running from Windows.

The implementation makes the script completely ignore upgrade steps, where they are normally automated.

Feel free to comment at http://tornevalls.se/blog/2016/04/13/methods-to-find-out-if-we-are-running-bash-in-windows-subsystem-for-linux/

@benhillis

This comment has been minimized.

Copy link
Member

benhillis commented Apr 15, 2016

A fix for the udev apt update issues is on it's way to the flighting branch. When the fix reaches the branch new subsystem installs will no longer have this issue.

The workaround provided above will continue to work for people who do not want to blow away their Ubuntu file system.

@ylluminate

This comment has been minimized.

Copy link

ylluminate commented Apr 15, 2016

@benhillis that's great to hear. Can you also explain the flighting branch more or point us to the documentation regarding this? Is this a set of sources that we need to change over to in the apt source list, etc?

Also, to what are you referring on the remark of "blow away their Ubuntu file system?" I was not aware that there was anyone ever concerned about losing the Ubuntu installation (I'm assuming you're referring to the hierarchical installation of Ubuntu files since it lives on the Windows' file system vs its own isolated fs).

@benhillis

This comment has been minimized.

Copy link
Member

benhillis commented Apr 16, 2016

By flighting branch I mean the Windows branch that Insider Preview builds come out of. Our changes slowly make their way to that branch and that is validated and then released publicly. I'm sorry if I'm being a bit vague, I'm not sure how much detail I'm allowed to go into regarding our branch structure and flight release cadence. The latter I don't even know myself :)

For updates you won't have to worry about making any changes to apt. Think of it this way, when you get a new Windows Insider build install, it's effectively a kernel update. The usermode Ubuntu binaries are not touched.

By Ubuntu file system I mean the user mode pieces that are downloaded and installed the first time you launch bash.exe. The only time we will delete these files is if the user runs "lxrun.exe /uninstall". It's possible to get yourself into a bad state (for example deleting glibc) and "lxrun.exe /uninstall" is meant to get you back to a pristine state so you can reinstall.

Does that make things more clear?

@imxieke

This comment has been minimized.

Copy link

imxieke commented Apr 17, 2016

I also met, just only remove upstart and udev ,
apt remove upstart udev

@Tornevall

This comment has been minimized.

Copy link

Tornevall commented Apr 17, 2016

@imxieke Well, if you have done the upgrade wrong, you will have a load of damaged packages that won't let itself get removed again :)

@Fleker

This comment has been minimized.

Copy link

Fleker commented Apr 20, 2016

I fixed it using this: http://superuser.com/questions/1064801/i-broke-the-windows-linux-subsystem-bash-on-ubuntu-on-windows-10-linux-help#

apt-get remove upstart
apt-get remove udev
apt-get autoremove

Although I'm still running into some odd pip issues

@lurdan

This comment has been minimized.

Copy link

lurdan commented Apr 28, 2016

Though being fixed (maybe with patching dpkg-divert way locally?) ...

I'm trying to use WSL userland replacing from ubuntu 14 to debian sid.
And its newer version of udev itself avoid this problem, detecting WSL as chroot environment (and stop udev processing).

So, updating default ubuntu userland (16.04 or so) will also fix this without ad-hoc patch.

@benhillis

This comment has been minimized.

Copy link
Member

benhillis commented May 27, 2016

I've verified this is fixed in build 14352 for fresh installs. If you continue to see this issue please use the workaround mentioned above or reinstall and install WSL by doing:

lxrun.exe /uninstall /full
lxrun.exe /install
@gdh1995

This comment has been minimized.

Copy link

gdh1995 commented Jul 24, 2016

On bash newly installed on Win10 education (build 14390), the bug indeed exists.

And my sshd can not be connected by any means. Any ideas?

@lorthirk

This comment has been minimized.

Copy link

lorthirk commented Aug 3, 2016

It seems that this issue is still here in Official Windows 10 Anniversary Update, just instlaled. Never had any Windows Insider build on this machine. Here's my log installing node (sorry it's in Italian, but I think it's pretty understandable anyway -- "Impossibile connettersi a Upstart" means "Unable to connect to Upstart", and "Connessione Rifiutata" means "Connection Refused"):

lorthirk@KSELP008:/mnt/c/Users/cmezzasalma$ sudo apt-get install node                                                   
[sudo] password for lorthirk:                                                                                           
Lettura elenco dei pacchetti... Fatto                                                                                   
Generazione albero delle dipendenze                                                                                     
Lettura informazioni sullo stato... Fatto                                                                               
I seguenti pacchetti sono stati installati automaticamente e non sono più richiesti:                                    
  libfreetype6 os-prober                                                                                                
Usare "apt-get autoremove" per rimuoverli.                                                                              
I seguenti pacchetti saranno inoltre installati:                                                                        
  ax25-node libax25 libfile-copy-recursive-perl openbsd-inetd update-inetd                                              
I seguenti pacchetti NUOVI saranno installati:                                                                          
  ax25-node libax25 libfile-copy-recursive-perl node openbsd-inetd                                                      
  update-inetd                                                                                                          
0 aggiornati, 6 installati, 0 da rimuovere e 48 non aggiornati.                                                         
È necessario scaricare 149 kB di archivi.                                                                               
Dopo quest'operazione, verranno occupati 658 kB di spazio su disco.                                                     
Continuare? [S/n] s                                                                                                     
Scaricamento di:1 http://archive.ubuntu.com/ubuntu/ trusty/universe libax25 amd64 0.0.12-rc2+cvs20120204-2ubuntu2 [22,7 kB]
Scaricamento di:2 http://archive.ubuntu.com/ubuntu/ trusty/main libfile-copy-recursive-perl all 0.38-1 [20,6 kB]        
Scaricamento di:3 http://archive.ubuntu.com/ubuntu/ trusty/main update-inetd all 4.43 [19,2 kB]                         
Scaricamento di:4 http://archive.ubuntu.com/ubuntu/ trusty/main openbsd-inetd amd64 0.20091229-2ubuntu3 [30,8 kB]       
Scaricamento di:5 http://archive.ubuntu.com/ubuntu/ trusty/universe ax25-node amd64 0.3.2-7.4 [54,8 kB]                 
Scaricamento di:6 http://archive.ubuntu.com/ubuntu/ trusty/universe node all 0.3.2-7.4 [1.284 B]                        
Recuperati 149 kB in 0s (307 kB/s)                                                                                      
Preconfigurazione dei pacchetti in corso                                                                                
Selezionato il pacchetto libax25 non precedentemente selezionato.                                                       
(Lettura del database... 25231 file e directory attualmente installati.)                                                
Preparativi per estrarre .../libax25_0.0.12-rc2+cvs20120204-2ubuntu2_amd64.deb...                                       
Estrazione di libax25 (0.0.12-rc2+cvs20120204-2ubuntu2)...                                                              
Selezionato il pacchetto libfile-copy-recursive-perl non precedentemente selezionato.                                   
Preparativi per estrarre .../libfile-copy-recursive-perl_0.38-1_all.deb...                                              
Estrazione di libfile-copy-recursive-perl (0.38-1)...                                                                   
Selezionato il pacchetto update-inetd non precedentemente selezionato.                                                  
Preparativi per estrarre .../update-inetd_4.43_all.deb...                                                               
Estrazione di update-inetd (4.43)...                                                                                    
Selezionato il pacchetto openbsd-inetd non precedentemente selezionato.                                                 
Preparativi per estrarre .../openbsd-inetd_0.20091229-2ubuntu3_amd64.deb...                                             
Estrazione di openbsd-inetd (0.20091229-2ubuntu3)...                                                                    
Selezionato il pacchetto ax25-node non precedentemente selezionato.                                                     
Preparativi per estrarre .../ax25-node_0.3.2-7.4_amd64.deb...                                                           
Estrazione di ax25-node (0.3.2-7.4)...                                                                                  
Selezionato il pacchetto node non precedentemente selezionato.                                                          
Preparativi per estrarre .../node_0.3.2-7.4_all.deb...                                                                  
Estrazione di node (0.3.2-7.4)...                                                                                       
Elaborazione dei trigger per man-db (2.6.7.1-1ubuntu1)...                                                               
Elaborazione dei trigger per ureadahead (0.100.0-16)...                                                                 
Configurazione di libax25 (0.0.12-rc2+cvs20120204-2ubuntu2)...                                                          
Configurazione di libfile-copy-recursive-perl (0.38-1)...                                                               
Configurazione di update-inetd (4.43)...                                                                                
Configurazione di openbsd-inetd (0.20091229-2ubuntu3)...                                                                
initctl: Impossibile connettersi a Upstart: Failed to connect to socket /com/ubuntu/upstart: Connessione rifiutata      
runlevel:/var/run/utmp: File o directory non esistente                                                                  
invoke-rc.d: policy-rc.d denied execution of stop.                                                                      
initctl: Impossibile connettersi a Upstart: Failed to connect to socket /com/ubuntu/upstart: Connessione rifiutata      
runlevel:/var/run/utmp: File o directory non esistente                                                                  
invoke-rc.d: policy-rc.d denied execution of start.                                                                     
Elaborazione dei trigger per ureadahead (0.100.0-16)...                                                                 
Configurazione di ax25-node (0.3.2-7.4)...                                                                              
initctl: Impossibile connettersi a Upstart: Failed to connect to socket /com/ubuntu/upstart: Connessione rifiutata      
runlevel:/var/run/utmp: File o directory non esistente                                                                  
invoke-rc.d: policy-rc.d denied execution of start.                                                                     
initctl: Impossibile connettersi a Upstart: Failed to connect to socket /com/ubuntu/upstart: Connessione rifiutata      
runlevel:/var/run/utmp: File o directory non esistente                                                                  
invoke-rc.d: policy-rc.d denied execution of force-reload.                                                              
Configurazione di node (0.3.2-7.4)...                                                                                   
Elaborazione dei trigger per libc-bin (2.19-0ubuntu6.7)...                                                              
@Skysplit

This comment has been minimized.

Copy link

Skysplit commented Aug 3, 2016

+1 for this issue as this error appears in anniversary update version.

Trying to start nginx/docker (didn't test other things) results in Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: No such file or directory.

@Craigeous

This comment has been minimized.

Copy link

Craigeous commented Aug 4, 2016

I performed the lxrun.exe /uninstall /full and lxrun.exe /install just to start fresh as I was on the fast ring, but the apt-get remove udev upstart and auto-remove did the trick for me.

After the fresh install, I did the remove and auto-remove, then update and upgrade. after that was all done i no longer saw upstart errors and was able to run openssh-server.

@lorthirk

This comment has been minimized.

Copy link

lorthirk commented Aug 4, 2016

Well... this will remove upstart, but I'm wondering whether it's safe to do so.

@Craigeous

This comment has been minimized.

Copy link

Craigeous commented Aug 4, 2016

i'm still able to start and stop services just fine. i was looking at installing systemd as that is what has replaced upstart anyway to see if there are any issues there.

@nandotech

This comment has been minimized.

Copy link

nandotech commented Aug 7, 2016

Just had a completely fresh upgrade to Anniversary Edition and can confirm I am still seeing this issue.

In my particular case, I was/am simply trying to install redis-server (and run it) on my Bash Ubuntu on Windows.

After reading through this thread I tried the first few suggested solutions, after no luck I went ahead and ran lxrun.exe /uninstall /full followed by lxrun.exe /install. Before even installing anyting else at this point, I attempted sudo apt-get install redis-server

Here is the output (starting where it went funky):

Setting up redis-server (2:2.8.4-2) ...
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
runlevel:/var/run/utmp: No such file or directory
invoke-rc.d: policy-rc.d denied execution of start.
Processing triggers for libc-bin (2.19-0ubuntu6.7) ...
Processing triggers for ureadahead (0.100.0-16) ...

The files and server appear to be installed, but I can not run the server. If I attempt redis-cli, I get Could not connect to Redis at 127.0.0.1:6379: Connection refused

Not sure where to go from here..

@rodrymbo

This comment has been minimized.

Copy link

rodrymbo commented Aug 16, 2016

I believe that the error about connecting to upstart has to do with the install wanting to register with upstart so the new program gets started automatically or something. But since upstart isn't running in WSL (and there's no promise for when it will be), the connection to the socket is refused. Usually this means that the rest of the install worked just fine, except for the part about having upstart start it automatically. So you will need to start it yourself manually, which frequently works pretty well.

If there is a script in /etc/init.d/ for starting the program, you can use that, e.g. sudo /etc/init.d/ssh start, which works for many of us. (Those are old-fashioned scripts but work well. There's no upstart, so they won't start automatically. You can run service ssh start all you want, but nothing will happen until upstart starts running.) If there's a file in /etc/init instead, you'd have to look in it to get a clue about how upstart would start the program, if upstart was running, then do that yourself or put it in a script. Or you can look in man or other documentation. If you can find a way to run it in the foreground, without going into the background (e.g. sudo cron -f), it will hold the bash.exe window open, meaning it will run forever or until you force it closed.

If apt-get decides the error about not talking to upstart is fatal, so it doesn't finish installing or upgrading the new program, that's a different problem. But if the service is installed okay and is just not starting because upstart isn't running, a workaround is to start the service yourself manually.

The other complication about starting services yourself manually is that they get shut down when the last bash.exe window closes. So you have to leave at least one going, minimized or whatever. There are instructions for doing this with ssh, if you want to try to experiment. This is just a workaround, not meant to be a permanent replacement for upstart or systemd or whatever.

@unuigbee

This comment has been minimized.

Copy link

unuigbee commented Sep 25, 2016

From Ubuntu: SystemdForUpstartUsers

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.

So it's not safe to remove upstart as it will probably cause incompatibilities issues with other programs that rely on upstart

@ghost

This comment has been minimized.

Copy link

ghost commented Dec 29, 2016

I have this when doing apt-get purge openssh-server -y on a fresh install with build 14393.576

@sunilmut

This comment has been minimized.

Copy link
Member

sunilmut commented Dec 29, 2016

@Benosika - I am not sure which issue you are referring to, but if it is the udev one, then a workaround is posted above by @russalex.

@shyandsy

This comment has been minimized.

Copy link

shyandsy commented Feb 13, 2017

@russalex thank you so much
it works for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment