Subject: bug#30993: issue: ssh-daemon could not be started

From: Taegil Bae <[email-masked]>
Date: Tue, 20 Nov 2018 10:33:17 +0900

Hello,

On 11/20/18 6:22 AM, Ludovic Courtès wrote:
> Taegil Bae <[email-masked]> skribis:
>
>> I have experienced this issue on a slow machine (Thinkpad T60). By
>> placing avahi-daemon after ssh-daemon, I fixed this issue. I added
>> ssh-daemon into the requirement of avahi-shepherd-service, and
>> reconfigured the system.
> This is very surprising.  Are you sure this is fully reproducible?
> How would you explain this?

At least in my machine it seems reproducible. I just reproduced that: 
reconfigured the system without my modification of avahi-daemon, checked 
ssh-daemon not started, reconfigured the system again with the 
modification, and then checked ssh-daemon started.

I am not a professional. But I guess that avahi-daemon manipulates 
network things such as the host name, and ssh-daemon waits for that to 
be completed. Look at this failing case:

Nov 20 09:37:57 localhost avahi-daemon[344]: Found user 'avahi' (UID 
985) and group 'avahi' (GID 973).
Nov 20 09:37:59 localhost avahi-daemon[344]: Successfully dropped root 
privileges.
Nov 20 09:38:00 localhost avahi-daemon[344]: avahi-daemon 0.7 starting up.
Nov 20 09:38:18 localhost shepherd[1]: Service avahi-daemon has been 
started.
Nov 20 09:38:01 localhost avahi-daemon[344]: WARNING: No NSS support for 
mDNS detected, consider installing nss-mdns!
Nov 20 09:38:05 localhost avahi-daemon[344]: Successfully called chroot().
Nov 20 09:38:12 localhost avahi-daemon[344]: Successfully dropped 
remaining capabilities.
Nov 20 09:38:32 localhost shepherd[1]: Service ssh-daemon could not be 
started.
Nov 20 09:38:15 localhost avahi-daemon[344]: Loading service file 
/services/sftp-ssh.service.
Nov 20 09:38:17 localhost avahi-daemon[344]: Loading service file 
/services/ssh.service.
Nov 20 09:38:19 localhost avahi-daemon[344]: Network interface 
enumeration completed.
Nov 20 09:38:22 localhost avahi-daemon[344]: Server startup complete. 
Host name is gravity.local. Local service cookie is 4157419020.
Nov 20 09:38:29 localhost avahi-daemon[344]: Service "gravity" 
(/services/ssh.service) successfully established.
Nov 20 09:38:32 localhost avahi-daemon[344]: Service "gravity" 
(/services/sftp-ssh.service) successfully established.
Nov 20 09:38:36 localhost avahi-daemon[344]: write() failed while 
writing return value to pipe: Broken pipe
Nov 20 09:39:12 localhost avahi-daemon[344]: Joining mDNS multicast 
group on interface wls3.IPv6 with address fe80::4c7d:9233:7845:eb88.
Nov 20 09:39:12 localhost avahi-daemon[344]: New relevant interface 
wls3.IPv6 for mDNS.
Nov 20 09:39:12 localhost avahi-daemon[344]: Registering new address 
record for fe80::4c7d:9233:7845:eb88 on wls3.*.
Nov 20 09:39:12 localhost avahi-daemon[344]: Joining mDNS multicast 
group on interface wls3.IPv4 with address 192.168.42.242.
Nov 20 09:39:12 localhost avahi-daemon[344]: New relevant interface 
wls3.IPv4 for mDNS.
Nov 20 09:39:12 localhost avahi-daemon[344]: Registering new address 
record for 192.168.42.242 on wls3.IPv4.

Regards,

Taegil