Uploaded image for project: 'VCL'
  1. VCL
  2. VCL-992

ext_sshd service occasionally fails to restart under systemd

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • 2.5
    • None
    • None

    Description

      I have seen the ext_sshd service fail to start/restart when controlled by systemd on Ubuntu 16. When this occurs, the status of the service shows:

      root@<hostname>:/etc/ssh# service ext_sshd status
      * ext_sshd.service - OpenBSD Secure Shell server
         Loaded: loaded (/lib/systemd/system/ext_sshd.service; enabled; vendor preset: enabled)
         Active: inactive (dead) since Wed 2016-09-21 16:37:56 EDT; 17h ago
        Process: 5515 ExecStart=/usr/sbin/sshd -D -f /etc/ssh/external_sshd_config (code=exited, status=0/SUCCESS)
       Main PID: 5515 (code=exited, status=0/SUCCESS)
      
      Sep 21 16:37:56 <hostname> systemd[1]: Starting OpenBSD Secure Shell server...
      Sep 21 16:37:56 <hostname> sshd[5515]: Server listening on <IP address> port 22.
      Sep 21 16:37:56 <hostname> systemd[1]: Started OpenBSD Secure Shell server.
      Sep 21 16:37:56 <hostname> systemd[1]: Stopping OpenBSD Secure Shell server...
      Sep 21 16:37:56 <hostname> systemd[1]: Stopped OpenBSD Secure Shell server.
      Sep 21 16:37:56 <hostname> systemd[1]: ext_sshd.service: Start request repeated too quickly.
      Sep 21 16:37:56 <hostname> systemd[1]: Failed to start OpenBSD Secure Shell server.
      Sep 21 16:37:56 <hostname> systemd[1]: Stopped OpenBSD Secure Shell server.
      Sep 21 16:37:56 <hostname> systemd[1]: ext_sshd.service: Start request repeated too quickly.
      Sep 21 16:37:56 <hostname> systemd[1]: Failed to start OpenBSD Secure Shell server.
      

      Users cannot connect:

      ssh: connect to host <IP address> port 22: Connection refused

      Adding these lines under the [Service] section in /lib/systemd/system/ext_sshd.service may prevent this from occurring:

      Restart=on-failure
      RestartSec=3s
      

      I don't know for sure if this alone will fix the problem. There may be additional options that could be added to the file. (man systemd.service)

      Attachments

        Issue Links

          Activity

            People

              arkurth Andrew Kurth
              arkurth Andrew Kurth
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: