I have a raspberry pi (hostname: raspberrypi) running docker, with about 10 containers. All of them were running without any issue.
Last night there was a power outage that caused my router to die. I had to replace it. However, when I connected my Raspberry Pi to the new router, I discovered that the containers were experiencing problems.
Looking through the logs, it seems they cannot resolve “raspeberrypi”. Here is some example errors from different containers –
ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp: lookup raspberrypi on 127.0.0.11:53: no such host" connIndex=2 dest=[censored] event=0 ip=[censored] type=http
error: z2m: MQTT error: getaddrinfo ENOTFOUND raspberrypi
[info] [server:Home Assistant] Connecting to http://raspberrypi:8123
[info] [mqtt-broker:a3f6230e34bba526] Connection failed to broker: mqtt://raspberrypi:1883
To summarize, anything that tries to use the hostname of the Raspberry Pi to connect to anything, it simply fails. Keep in mind this was working yesterday, and I’ve changed nothing on the RPi, only swapped the router.
I would really appreciate any and all help in fixing this.
I have tried restarting the RPi, restarting docker, restarting the containers, rebuilding the containers, adding “8.8.8.8” to /etc/resolv.conf, among other things (apologies but at this point I’ve lost track of everything).