Host name of client xxx => contains (at least) one invalid character at position 0

Because:

192.168.2.141	l530-2	14:eb:b6:d2:9e:5d	in 21 minutes

I then assumed this indicated lease was renewed.

I am a clown :clown_face: I forgot to enable when I reinstalled the PI OS and Pi-hole on the new memory card.
My bad - apologise!
Enabled now!

Absolutely - will do!

You've shown us DHCPREQUEST and the following DHCPACK above, but

means: it expires in 21 minutes, nothing else.

To me, it looks like

  1. The devices gets a DHCP lease
  2. At some point it expires
  3. Now the hostname is undefined (<-- bug)
  4. The device may register a new lease at some point.

If the devices are behaving correctly and are constantly on, I'd expect renewing to happen between 1. & 2. causing 3. to never occur in the first place.

@seh2000 I did just push a possible fix to the branch you are experimenting with. Please try pihole -up and check if the issue is gone. If you start seeing Processing DHCP events in /var/log/pihole/FTL.log, this is already a very good sign.

Branch updated!
1.5 hour after the update I have so far seen two Processing DHCP events, will keep checking.

2024-05-10 11:30:39.080 [89199M] INFO: Processing DHCP events
2024-05-10 11:30:39.080 [89199M] INFO: DHCP lease 192.168.2.145 expired (Fri May 10 11:30:39 2024)
2024-05-10 11:30:39.092 [89199M] INFO: kill_name(): Freeing old hostname lease 192.168.2.145 -> (null)
2024-05-10 11:30:39.092 [89199M] INFO: kill_name(): Freeing hostname lease 192.168.2.145 -> l630-2
2024-05-10 11:30:39.092 [89199M] INFO: do_script_run(): Freeing lease 192.168.2.145 -> l630-2.wi-fi

2024-05-10 11:31:07.911 [89199M] INFO: Processing DHCP events
2024-05-10 11:31:07.911 [89199M] INFO: DHCP lease 192.168.2.23 expired (Fri May 10 11:31:07 2024)
2024-05-10 11:31:07.922 [89199M] INFO: kill_name(): Freeing old hostname lease 192.168.2.23 -> (null)
2024-05-10 11:31:07.923 [89199M] INFO: kill_name(): Freeing hostname lease 192.168.2.23 -> tv-living
2024-05-10 11:31:07.923 [89199M] INFO: do_script_run(): Freeing lease 192.168.2.23 -> tv-living.wi-fi

For the above two I don't see either of them under Currently active DHCP leases, not sure why as I assumed they would be shown.

Any news? I guess no news by now means the fix is working as expected :slight_smile:

Hi @DL6ER,
So far all appears OK.
I have changed the lease time a couple of time from short to long (12h) and back to short now 30 min.
The 3 devices with issue appears fine now.

Hi @DL6ER,
Still no occurrence since the fix.
Think we can say Fixed.
Or we wait a few more days?
Steen

Yes, I have reported this upstream but - so far - no response. If nothing happens over the weekend, we can merge this commit anyway and later rewind if Simon Kelley wants to fix it differently.

1 Like

Top
Have a great weekend

The PR has been merged

https://github.com/pi-hole/FTL/pull/1965

You can switch back to development-v6 to continue receiving future updates. Thanks for working on this with us and for confirming the fix!

1 Like

@DL6ER
I have switched back

FTL vDev (development-v6, a0781069)

Thanks to you and your patience with me. Been a good learning session :slight_smile:
Happy to be part!

Question:
I enabled advanced DHCP logging, will I remove this with the command sudo pihole-FTL --config dhcp.logging false ?

Yes! Sorry, forgot about that.

1 Like

Sorry to reopen this topic, but I have exactly the same error and this almost a year after the fix...
In my case it's Meross Smart Plug as well which causes this error.
So did the fix find a way to the main version or not yet?...

Host name of client 192.168.178.151 => "Meross Smart Plug.fritz.box" contains (at least) one invalid character (hex 4d) at position 0

More repros. Diagnosis shows errors about invalid hostnames incorrectly · Issue #6223 · pi-hole/pi-hole · GitHub

Versions

Docker Tag 2025.04.0
Core v6.0.6
FTL v6.1
Web interface v6.1

Just an update: Still waiting for replies by anyone after having enabled DHCP debug logging

I am now seeing this error:

Host name of client 192.168.10.46 => "����U" contains (at least) one invalid character (hex a0) at position 0

It was logged at 2025-07-20 00:00:00

@DL6ER Do I need to enable more logging to run this issue down?