package openssh-server 1:7.2p2-4ubuntu2.2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #1713435 reported by Avishek Goyal
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
openssh (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

invoke-rc.d: initscript ssh, action "start" failed.
● ssh.service - OpenBSD Secure Shell server
   Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2017-08-28 14:36:40 IST; 9ms ago
  Process: 21687 ExecStart=/usr/sbin/sshd -D $SSHD_OPTS (code=exited, status=255)
 Main PID: 21687 (code=exited, status=255)

Aug 28 14:36:40 LinuxMachine systemd[1]: Starting OpenBSD Secure Shell server...
Aug 28 14:36:40 LinuxMachine systemd[1]: ssh.service: Main process exited, c...a
Aug 28 14:36:40 LinuxMachine systemd[1]: Failed to start OpenBSD Secure Shel....
Aug 28 14:36:40 LinuxMachine systemd[1]: ssh.service: Unit entered failed state.
Aug 28 14:36:40 LinuxMachine systemd[1]: ssh.service: Failed with result 'ex....

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: openssh-server 1:7.2p2-4ubuntu2.2
ProcVersionSignature: Ubuntu 4.4.0-92.115-generic 4.4.76
Uname: Linux 4.4.0-92-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.10
Architecture: amd64
Date: Mon Aug 28 14:36:40 2017
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2016-12-12 (258 days ago)
InstallationMedia: Ubuntu-GNOME 16.04.1 LTS "Xenial Xerus" - Release amd64 (20160720)
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.2
 apt 1.2.24
SourcePackage: openssh
Title: package openssh-server 1:7.2p2-4ubuntu2.2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Avishek Goyal (wacky9197) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks for filing this bug in Ubuntu.

The provided logs unfortunately do not have enough information to properly diagnose the problem.

Could you please attach the output of the command below to this bug?

sudo systemctl status ssh.service

Thanks

Changed in openssh (Ubuntu):
status: New → Incomplete
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Oh, my mistake. The journal log was attached and had this bit of info:
Aug 28 14:36:40 hostname sshd[21687]: error: Bind to port 22 on 0.0.0.0 failed: Address already in use.
Aug 28 14:36:40 hostname sshd[21687]: error: Bind to port 22 on :: failed: Address already in use.
Aug 28 14:36:40 hostname sshd[21687]: fatal: Cannot bind any address.
Aug 28 14:36:40 hostname systemd[1]: Failed to start OpenBSD Secure Shell server.
Aug 28 14:36:40 hostname systemd[1]: ssh.service: Failed with result 'exit-code'.

Looks like something else was already listening on ssh's port.

In addition to the status command from my previous command, please also attach the output of the following ones:
- ps fauxw
- sudo netstat -anp

Thanks!

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for openssh (Ubuntu) because there has been no activity for 60 days.]

Changed in openssh (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Michael Terranova (mterra) wrote :

Sorry I'm a noob. Don't know much about this other than I'd bet that if it happened to me during this recent update maybe others are affected as well
I see someone was asked earlier for this:

~$ sudo systemctl status ssh.service

● ssh.service - OpenBSD Secure Shell server
   Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enab
   Active: failed (Result: start-limit-hit) since Fri 2019-02-08 16:25:20 EST; 2
  Process: 21889 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=255)

Feb 08 16:25:20 ayumu systemd[1]: ssh.service: Unit entered failed state.
Feb 08 16:25:20 ayumu systemd[1]: ssh.service: Failed with result 'exit-code'.
Feb 08 16:25:20 ayumu systemd[1]: ssh.service: Service hold-off time over, sched
Feb 08 16:25:20 ayumu systemd[1]: Stopped OpenBSD Secure Shell server.
Feb 08 16:25:20 ayumu systemd[1]: ssh.service: Start request repeated too quickl
Feb 08 16:25:20 ayumu systemd[1]: Failed to start OpenBSD Secure Shell server.
Feb 08 16:25:20 ayumu systemd[1]: ssh.service: Unit entered failed state.
Feb 08 16:25:20 ayumu systemd[1]: ssh.service: Failed with result 'start-limit-h
lines 1-13/13 (END)

I will try to attach the other two previously-requested things

Revision history for this message
Michael Terranova (mterra) wrote :

and here's the output of ps fauxw

Revision history for this message
Seth Arnold (seth-arnold) wrote :

Hi Michael, probably "new bug report" would have been the better choice.

See if this will show you more details:
journalctl -eu ssh

Thanks

Revision history for this message
Michael Terranova (mterra) wrote : Re: [Bug 1713435] Re: package openssh-server 1:7.2p2-4ubuntu2.2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
Download full text (3.5 KiB)

Dear Mr Arnold,
Forgive my late response. Yesterday I returned to googling this error
message. Before I had been daunted but this time I found information that
solved my problem, the final suggestion on this discussion:
https://askubuntu.com/questions/1109934/ssh-server-stops-working-after-reboot-caused-by-missing-var-run-sshd/1110843#1110843

Briefly, ssh-server on my system was failing to create a necessary
temporary folder /var/run/sshd, because somehow I had changed ownership of
the root folder, '/', from root:root to a local-user & group. Changing it
back root:root fixed my system. I know exactly how this happened. I had
created a script to change ownership on contents in a shared folder after
root users (puppy linux) added items to it. I probably accidentally ran
this from a terminal in the wrong location / instead of
/mnt/somesharedfolder

Returning to this bug link, it looks like it had expired even before I
commented on it. I appreciate that you responded to it anyway. Is there
anything I should do now, to close something I had opened, or maybe to
leave a final comment explaining how it was resolved in my case?
Thanks
Michael

On Fri, Feb 8, 2019 at 5:25 PM Seth Arnold <email address hidden>
wrote:

> Hi Michael, probably "new bug report" would have been the better choice.
>
> See if this will show you more details:
> journalctl -eu ssh
>
> Thanks
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1713435
>
> Title:
> package openssh-server 1:7.2p2-4ubuntu2.2 failed to install/upgrade:
> subprocess installed post-installation script returned error exit
> status 1
>
> Status in openssh package in Ubuntu:
> Expired
>
> Bug description:
> invoke-rc.d: initscript ssh, action "start" failed.
> ● ssh.service - OpenBSD Secure Shell server
> Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor
> preset: enabled)
> Active: failed (Result: exit-code) since Mon 2017-08-28 14:36:40 IST;
> 9ms ago
> Process: 21687 ExecStart=/usr/sbin/sshd -D $SSHD_OPTS (code=exited,
> status=255)
> Main PID: 21687 (code=exited, status=255)
>
> Aug 28 14:36:40 LinuxMachine systemd[1]: Starting OpenBSD Secure Shell
> server...
> Aug 28 14:36:40 LinuxMachine systemd[1]: ssh.service: Main process
> exited, c...a
> Aug 28 14:36:40 LinuxMachine systemd[1]: Failed to start OpenBSD Secure
> Shel....
> Aug 28 14:36:40 LinuxMachine systemd[1]: ssh.service: Unit entered
> failed state.
> Aug 28 14:36:40 LinuxMachine systemd[1]: ssh.service: Failed with result
> 'ex....
>
> ProblemType: Package
> DistroRelease: Ubuntu 16.04
> Package: openssh-server 1:7.2p2-4ubuntu2.2
> ProcVersionSignature: Ubuntu 4.4.0-92.115-generic 4.4.76
> Uname: Linux 4.4.0-92-generic x86_64
> ApportVersion: 2.20.1-0ubuntu2.10
> Architecture: amd64
> Date: Mon Aug 28 14:36:40 2017
> ErrorMessage: subprocess installed post-installation script returned
> error exit status 1
> InstallationDate: Installed on 2016-12-12 (258 days ago)
> InstallationMedia: Ubuntu-GNOME 16.04.1 LTS "Xenial Xerus" - Release
> amd64 (20160720)
> RelatedPackageVersi...

Read more...

Revision history for this message
Michael Terranova (mterra) wrote :
Download full text (3.9 KiB)

PS. My apologies again for not following up on your helpful suggestion a
few months ago. Thanks again for taking time to help!
Michael

On Fri, May 24, 2019 at 9:17 PM mIT <email address hidden> wrote:

> Dear Mr Arnold,
> Forgive my late response. Yesterday I returned to googling this error
> message. Before I had been daunted but this time I found information that
> solved my problem, the final suggestion on this discussion:
>
> https://askubuntu.com/questions/1109934/ssh-server-stops-working-after-reboot-caused-by-missing-var-run-sshd/1110843#1110843
>
> Briefly, ssh-server on my system was failing to create a necessary
> temporary folder /var/run/sshd, because somehow I had changed ownership of
> the root folder, '/', from root:root to a local-user & group. Changing it
> back root:root fixed my system. I know exactly how this happened. I had
> created a script to change ownership on contents in a shared folder after
> root users (puppy linux) added items to it. I probably accidentally ran
> this from a terminal in the wrong location / instead of
> /mnt/somesharedfolder
>
> Returning to this bug link, it looks like it had expired even before I
> commented on it. I appreciate that you responded to it anyway. Is there
> anything I should do now, to close something I had opened, or maybe to
> leave a final comment explaining how it was resolved in my case?
> Thanks
> Michael
>
>
> On Fri, Feb 8, 2019 at 5:25 PM Seth Arnold <email address hidden>
> wrote:
>
>> Hi Michael, probably "new bug report" would have been the better choice.
>>
>> See if this will show you more details:
>> journalctl -eu ssh
>>
>> Thanks
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1713435
>>
>> Title:
>> package openssh-server 1:7.2p2-4ubuntu2.2 failed to install/upgrade:
>> subprocess installed post-installation script returned error exit
>> status 1
>>
>> Status in openssh package in Ubuntu:
>> Expired
>>
>> Bug description:
>> invoke-rc.d: initscript ssh, action "start" failed.
>> ● ssh.service - OpenBSD Secure Shell server
>> Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor
>> preset: enabled)
>> Active: failed (Result: exit-code) since Mon 2017-08-28 14:36:40
>> IST; 9ms ago
>> Process: 21687 ExecStart=/usr/sbin/sshd -D $SSHD_OPTS (code=exited,
>> status=255)
>> Main PID: 21687 (code=exited, status=255)
>>
>> Aug 28 14:36:40 LinuxMachine systemd[1]: Starting OpenBSD Secure Shell
>> server...
>> Aug 28 14:36:40 LinuxMachine systemd[1]: ssh.service: Main process
>> exited, c...a
>> Aug 28 14:36:40 LinuxMachine systemd[1]: Failed to start OpenBSD Secure
>> Shel....
>> Aug 28 14:36:40 LinuxMachine systemd[1]: ssh.service: Unit entered
>> failed state.
>> Aug 28 14:36:40 LinuxMachine systemd[1]: ssh.service: Failed with
>> result 'ex....
>>
>> ProblemType: Package
>> DistroRelease: Ubuntu 16.04
>> Package: openssh-server 1:7.2p2-4ubuntu2.2
>> ProcVersionSignature: Ubuntu 4.4.0-92.115-generic 4.4.76
>> Uname: Linux 4.4.0-92-generic x86_64
>> ApportVersion: 2.20.1-0ubuntu2.10
>> Architecture: amd64
>>...

Read more...

Revision history for this message
Seth Arnold (seth-arnold) wrote :

Hi Michael, thanks for reporting back the solution -- we're fine here, nothing needs doing.

Thanks

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.