Satellite: No MQTT connection after hostname change?

Hi all,

I experience a very odd behaviour when changing the hostname of my satellite.

To start from the beginning:

  1. I install and configure a satellite on a Pi Zero
  2. Everything runs fine (connecting to external MQTT on
  3. On the satellite, I change the hostname by editing /etc/hostname
  4. reboot
  5. Not working anymore, in the MQTT broker log I see the client connecting, socket error, disconnected.
  6. Edit the /etc/hostname back to raspberrypi
  7. reboot
  8. Still not working again
  9. Strange thing: Now I flash an image that I took from the SD right before changing the hostname and reboot (so technically the system is in the same state as after changing back the hostname) reboot and it works again

I tried this procedure several times - whenever I changed the hostname on the satellite I had to reflash it, otherwise no MQTT connection possible.

This is so strange, how can this happen? Never had such problems with the base. Renamed that without problems.

Hmmm I checked the syslog and it says no route to host. Funny. because I can ssh that host the satellite without problems, using IP or hostname.

Nevermind, it’s solved. Had nothing to do with the hostname, strange coincidence (multiple times).