3

I am trying to announce a ssh service from my raspberry pi running raspian a Debian squeeze variant. It is using avahi-daemon version 0.6.31. However after a certain time, I cannot find my raspberry pi anymore by its dynamic hostame raspberrypi.local.

I used the dns-sd test tool on my Mac to get a grip on the problem and found the following output:

dns-sd output of my Mac in the same LAN

#  dns-sd  -G -v4v6 raspberrypi.local
Timestamp     A/R Flags if Hostname                  Address                                      TTL
18:46:17.096  Add     2  5 raspberrypi.local.        192.168.9.5                                  120
18:48:22.938  Rmv     0  5 raspberrypi.local.        192.168.9.5                                  0

So the service is removed after 5 minutes and I do not know why. The debug output of the avahi-daemon shows nothing strange:

avahi-daemon debug output

Found user 'avahi' (UID 108) and group 'avahi' (GID 110).
Successfully dropped root privileges.
avahi-daemon 0.6.31 starting up.
Successfully called chroot().
Successfully dropped remaining capabilities.
Loading service file /services/ssh.service.
Loading service file /services/udisks.service.
Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.9.5.
New relevant interface eth0.IPv4 for mDNS.
Network interface enumeration completed.
Registering new address record for 192.168.9.5 on eth0.IPv4.
Registering HINFO record with values 'ARMV6L'/'LINUX'.
Server startup complete. Host name is raspberrypi.local. Local service cookie is 3101833441.
Service "raspberrypi" (/services/udisks.service) successfully established.
Service "raspberrypi" (/services/ssh.service) successfully established.
^CGot SIGINT, quitting.
Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.9.5.
avahi-daemon 0.6.31 exiting.

The config files are the stock files that came with the apt package. Interestingly I have a FreeBSD server in the same network running avahi-daemon 0.6.29 and it is working in the sense that it announces the address and does not remove the entry after some time.

My question

  • Why does the avahi-deamon deregister the hostname? It has a TTL of 120s but it should renew it anyhow.
1
  • Anything new ? Have the same issue with latest raspbian.
    – Cfun
    Mar 6, 2017 at 5:32

1 Answer 1

0

I had this problem, too. AFAIU, my issue was caused by the power save feature on the RPi's onboard wifi.

To disable the power save, try the following solution to see if that works: https://raspberrypi.stackexchange.com/a/119341/124219

But wait - wasn't that feature permanently disabled (that is, power save is always off)?

Yes? See comments here and commit here

However, I'm also hearing of people, myself included, that have benefited from also explicitly turning it off:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .