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

Bug #1745027 reported by robith
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
openssh (Ubuntu)
Expired
Medium
Unassigned

Bug Description

Started installing upgrade new kernels.
But yesterday i did not finish seting up vlan.
So in sshd config remained a address for vlan.
in net conf was set up automatic vlan conf

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: openssh-server 1:7.2p2-4ubuntu2.4
ProcVersionSignature: Ubuntu 4.4.0-109.132-generic 4.4.98
Uname: Linux 4.4.0-109-generic i686
ApportVersion: 2.20.1-0ubuntu2.15
Architecture: i386
Date: Tue Jan 23 21:47:25 2018
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2015-11-12 (803 days ago)
InstallationMedia: Ubuntu 14.04.3 LTS "Trusty Tahr" - Beta i386 (20150805)
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.3
 apt 1.2.24
SourcePackage: openssh
Title: package openssh-server 1:7.2p2-4ubuntu2.4 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
robith (robith) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Joshua Powers (powersj) wrote :

Thanks for taking the time to file a bug!

It appears that the post-install failed to start the SSH server. The latest version of SSH came only with 4 security fixes so it is not obvious what would be causing this:
http://changelogs.ubuntu.com/changelogs/pool/main/o/openssh/openssh_7.2p2-4ubuntu2.4/changelog

Can you verify your sshd config is valid by running `sudo /usr/sbin/sshd -t && echo PASS || echo FAIL` can you also try manually starting the ssh server via `sudo systemctl restart ssh.service` and see if any error message appear in `sudo systemctl status ssh.service`?

Changed in openssh (Ubuntu):
status: New → Incomplete
importance: Undecided → Medium
Revision history for this message
robith (robith) wrote : Re: [Bug 1745027] Re: package openssh-server 1:7.2p2-4ubuntu2.4 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Changed vlan ip back to lan and it started

Dňa 24. 1. 2018 18:05 používateľ "Joshua Powers" <email address hidden>
napísal:

> Thanks for taking the time to file a bug!
>
>
> It appears that the post-install failed to start the SSH server. The
> latest version of SSH came only with 4 security fixes so it is not obvious
> what would be causing this:
> http://changelogs.ubuntu.com/changelogs/pool/main/o/openssh/openssh_7.2p2-
> 4ubuntu2.4/changelog
>
> Can you verify your sshd config is valid by running `sudo /usr/sbin/sshd
> -t && echo PASS || echo FAIL` can you also try manually starting the ssh
> server via `sudo systemctl restart ssh.service` and see if any error
> message appear in `sudo systemctl status ssh.service`?
>
>
>
> ** Changed in: openssh (Ubuntu)
> Status: New => Incomplete
>
> ** Changed in: openssh (Ubuntu)
> Importance: Undecided => Medium
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1745027
>
> Title:
> package openssh-server 1:7.2p2-4ubuntu2.4 failed to install/upgrade:
> subprocess installed post-installation script returned error exit
> status 1
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/
> 1745027/+subscriptions
>

Revision history for this message
gl (stuff-de-schorsch) wrote :

Hi, Solution from dna did not work for me.
I did the recoomended steps from robin this way:

1. sudo /usr/sbin/sshd -t && echo PASS || echo FAIL

Result: PASS

2. sudo systemctl restart ssh.service

Results:
Job for ssh.service failed because the control process exited with error code. See "systemctl status ssh.service" and "journalctl -xe" for details.

3. sudo systemctl status ssh.service

ssh.service - OpenBSD Secure Shell server
   Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since So 2018-02-11 14:57:02 CET; 39s ago
  Process: 12337 ExecStart=/usr/sbin/sshd -D $SSHD_OPTS (code=exited, status=255)
 Main PID: 12337 (code=exited, status=255)

Feb 11 14:57:02 d........e systemd[1]: Starting OpenBSD Secure Shell server...
Feb 11 14:57:02 d........e sshd[12337]: error: Bind to port XXXXX on 0.0.0.0 failed: Address already in
Feb 11 14:57:02 d........e sshd[12337]: error: Bind to port XXXXX on :: failed: Address already in use.
Feb 11 14:57:02 d........e sshd[12337]: fatal: Cannot bind any address.
Feb 11 14:57:02 d........e systemd[1]: ssh.service: Main process exited, code=exited, status=255/n/a
Feb 11 14:57:02 d........e systemd[1]: Failed to start OpenBSD Secure Shell server.
Feb 11 14:57:02 d........e systemd[1]: ssh.service: Unit entered failed state.
Feb 11 14:57:02 d........e systemd[1]: ssh.service: Failed with result 'exit-code'.

Any Idea?

Thanks

Revision history for this message
Joshua Powers (powersj) wrote :

From your log:

Feb 11 14:57:02 d........e sshd[12337]: error: Bind to port XXXXX on 0.0.0.0 failed: Address already in
Feb 11 14:57:02 d........e sshd[12337]: error: Bind to port XXXXX on :: failed: Address already in use.

The port you are trying to use already has something running on it.

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
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.