Specific type of DOCKER_HOSTNAME seems to crash the Docker Stats integration

I need help determining if this is a real bug, or just a user config error. If this is a real bug, then I'll add a bug report to the github. I have 3 x docker hosts, each with docker socket proxies that feed into Homarr. The Docker Stats integration in Homarr shows me what's going on with my containers. So far, so good. My socket proxies all have hostnames that end with .internal, eg. hostname: socket-proxy-pve.internal In my Homarr compose, I have
environment:
- DOCKER_HOSTNAMES=socket-proxy-pve,socket-proxy-truenas,socket-proxy2-pve
- DOCKER_PORTS=2375,2375,2375
environment:
- DOCKER_HOSTNAMES=socket-proxy-pve,socket-proxy-truenas,socket-proxy2-pve
- DOCKER_PORTS=2375,2375,2375
and it works well BUT, if I change any one of the hostnames to their true hostname with .internal then all of the hostnames will fail to be read by Docker Stats eg. This will stop Docker Stats from showing anything: DOCKER_HOSTNAMES=socket-proxy-pve**.internal**,socket-proxy-truenas,socket-proxy2-pve So will this: DOCKER_HOSTNAMES=socket-proxy-pve.**internal**,socket-proxy-truenas.**internal**,socket-proxy2-pve.**internal** I can use .internal on other containers that I proxy the docker socket to. Just not Homarr (or at least not the Docker Stats integration). If I was to guess, I'd say that this is a simple parsing error, but I'm no programmer. Does this happen to you too? Or do I likely have something misconfigured that's causing this?
Solution:
I had to --force-recreate to get it to clear the bad DNS entry and use the correct hostname
Jump to solution
19 Replies
Cakey Bot
Cakey Bot2w ago
Thank you for submitting a support request. Depending on the volume of requests, our team should get in contact with you shortly.
⚠️ Please include the following details in your post or we may reject your request without further comment: - Log (See https://homarr.dev/docs/community/faq#how-do-i-open-the-console--log) - Operating system (Unraid, TrueNAS, Ubuntu, ...) - Exact Homarr version (eg. 0.15.0, not latest) - Configuration (eg. docker-compose, screenshot or similar. Use ``your-text`` to format) - Other relevant information (eg. your devices, your browser, ...)
Frequently Asked Questions | Homarr documentation
Can I install Homarr on a Raspberry Pi?
yaktone
yaktoneOP2w ago
PrivateBin
Encrypted note on PrivateBin
Visit this link to see the note. Giving the URL to anyone allows them to access the note, too.
yaktone
yaktoneOP2w ago
One DOCKER_HOSTNAME with .internal appended in Homarr's compose
No description
yaktone
yaktoneOP2w ago
The Docker Stats errored out. None of the 3 x docker hosts show anything.
No description
yaktone
yaktoneOP2w ago
My socket proxy compose with its normal hostname
No description
Meierschlumpf
Meierschlumpf2w ago
ENOTFOUND means it can not find the dns entry for it. Do you have any dns caching enabled? (default is disabled)
yaktone
yaktoneOP2w ago
Homarr Version 1.41.0 No, I don't have any caching enabled
Meierschlumpf
Meierschlumpf2w ago
Hm okay, I guess the proxies are in the same network, right?
yaktone
yaktoneOP2w ago
Yes, same subnet 192.168.x.1/24 same switch. no vlans or the like the 3 x docker hosts are all in a swarm ( 2 x LXC on proxmox, and 1 x baremetal docker engine) @Meierschlumpf Thanks, you can stop looking. This is user error, not a bug.
Meierschlumpf
Meierschlumpf2w ago
Okay, based on my research hostname is only an internal thing to the container itself
yaktone
yaktoneOP2w ago
So, I haven't fixed this yet, or figured out what's wrong, but the error only happens when my first hostname is .internal, if I try it with the other two hostnames, then it works fine.
Meierschlumpf
Meierschlumpf2w ago
Okay yes that is actually possible, because there is also something like host.docker.internal which is used to interact with things in the same network on different ports. So this would make sense
yaktone
yaktoneOP2w ago
eg. This is okay DOCKER_HOSTNAMES=socket-proxy-pve,socket-proxy-truenas.**internal**,socket-proxy2-pve
Meierschlumpf
Meierschlumpf2w ago
Hm okay weird
yaktone
yaktoneOP2w ago
I'll try a few other things, shuffle the order, see what happens Wait, no. I better reboot these docker engines first. Solved. The problem was with socket-proxy-pve I used to have a spelling error in the hostname, and although I'd corrected it, it remained as part of the container, despite restarting the container and the host LXC multiple times
Meierschlumpf
Meierschlumpf2w ago
Oh I see, makes sense 👍🏽
yaktone
yaktoneOP2w ago
I discovered the residual error after inspecting the container
Solution
yaktone
yaktone2w ago
I had to --force-recreate to get it to clear the bad DNS entry and use the correct hostname
yaktone
yaktoneOP2w ago
Actually, it was your query about dns that made me look harder at the right part of the inspection
"DNSNames": [
"socket-proxy-pve",
"ba39b09df83f",
"socker-proxy-pve.internal"
"DNSNames": [
"socket-proxy-pve",
"ba39b09df83f",
"socker-proxy-pve.internal"
That annoying socker instead of socket from weeks ago. 😂

Did you find this page helpful?