Please follow the below template, it will help us to help you!
I see the warning symbol on top of the pihole webpage. BTW the whole setup is working fine but just see this warning message repeated multiple times. The actual IP of my pi with pi-hole is 10.0.0.254 but my son recently got another raspberry pi (hostnames are different) and that IP is 10.0.0.114.
not giving name rpi.lan to the DHCP lease of 10.0.0.114 because the name exists in /etc/hosts with address 127.0.1.1
I am suddenly getting this too, immediately after updating to v5.7.
I have been running Pi-hole for some time and apart from some minor teething troubles when making it co-exist with an Apache2 webserver, it has been totally brilliant.
And then I updated to v5.7…….
I am now getting a continuous clutter of warning messages
“Warning in dnsmasq core
not giving name webserver to the DHCP lease of 192.168.1.251 because the name exists in /etc/hosts with address 127.0.1.1”
I have made no changes to the Pi setup, nor Pi-hole or the DD-WRT router set-up for months, well before the last couple of Pi-hole updates. It just quietly squirrels away in the corner doing its thing.
The warnings have always existed in /var/log/pihole.log. A change to Pi-hole made them more visible by also printing them into /var/log/pihole-FTL.log and showing them on the dashboard.
Brief documentation for these warning can be found here:
Both warnings you are seeing have the same meaning and I think the message is pretty clear. How can we improve it?
Let me explain in more words what is happening here:
You have a device that wants to be called rpi.lan (NPT has webserver) in the network. However, your Pi-hole itself already has this hostname. Hence, it declines that the other device gets this name as there can be no two devices with the same name in the network (which one would you pick if querying for this name?). Pi-hole rightfully warns you about this issue as you may expect the other device to be reachable through this hostname.
Solution: Only one of the devices should have this hostname. If your Pi-hole has a different name and the entry for 127.0.1.1 is still showing the old hostname, the solution will be to fix your Pi-hole's /etc/hosts. Otherwise, you should investigate why the other device tries to register with the hostname your Pi-hole already has.
So which device has which hostname? How do their /etc/hosts127.0.1.1 entries look like? Whatever tool you may have used might have forgotten to also update the /etc/hosts entry.
Same advise to you. Was your Pi-hole ever called "webserver" before? Is it still? You may have to fix one of the /etc/hosts entries as well.
Thanks. The raspberry with the Pi-Hole was called rpi and the other was raspberrypi. Anyway, I deleted the 127.0.1.1 from the /etc/hosts of the rpi with pi-hole and that fixed the issue for now.
Sincere thanks DL6ER for your very kind and expansive guidance.
"The warnings have always existed in /var/log/pihole.log . A change to Pi-hole made them more visible by also printing them into /var/log/pihole-FTL.log and showing them on the dashboard."
A very sensible and useful modification!
I had a dig around and the Hostnames file contained the duplicate name so this has been changed and everything is working fine. Many thanks again.