Wrong port in log message

Developers, I registered here only to report that this issue has something to do with pi-hole itself. Like others I started to get these warning after I upgraded from v5 to v6 and now I am on the latest versions of everything, 6.0.5, 6.0.4, 6.0.2. And I use unbound. The warnings started to appear about a month after the upgrade.

The reason I think the issue is with pi-hole itself is I never used port 5353 for unbound. I set it to 53535 and the Custom DNS server is set to 127.0.0.1#53535 in pi-hole. Yet, the warning in pi-hole is like everybody else's: WARNING Connection error (127.0.0.1#5353): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server).

According to sudo pihole -d nothing listens on TCP port 5353. How come I get this warning in pi-hole when port 5353 is not even in use. Something is not right somewhere.

If you are using one port and the error message is showing a different one, you have a completely different issue.

Please open a new topic. Don't forget to include a debug log.

A post was merged into an existing topic: Connection error (127.0.0.1#5335): TCP connection failed while receiving payload length from upstream (Connection prematurely closed by remote server)

This seems like a (harmless) bug in Pi-hole's log output, and is probably a duplicate of Pihole v6 with Unbound - Connection error - Incorrect port in error message.

1 Like

Thanks. It is indeed. In my case it looked like pi-hole was referencing the default port. I didn't even think it dropped the last digit.

And my post above your your actually belonged to that thread as it had nothing to do with my particular mislabeled port.

I have moved that second post back to its original topic.

That thread is closed now. I hope that minor bug is in the pipeline to be fixed so it won't confuse other people, escpecially those who just added another digit to the preset port.

By the way, port 5353 is used for mDNS by default. That's why I changed it for pi-hole because I had avahi daemon on the same RPi. Maybe it's a good idea to update the tutorial for setting up pi-hole with unbound, so it suggest another unreserved port.

If you'd refer to Pi-hole's unbound guide:
That guide is using port 5335 ever since 2020.

1 Like

You are correct indeed! I can't believe I set up my pi-holes more than 5 years ago. It was v4 I think. And as a sanity check for myself I found a post confirming that the official guide used to use port 5353: https://www.reddit.com/r/pihole/comments/gq7jwp/ubound_port_changed_from_5353_to_5335_in_docs/

I remember adding a digit to it to avoid conflicts with mDNS. But I never noticed that the port number in the guide was changed. Moreover, I didn't even notice the different port in the original thread here. 5353 and 5335 look surprisingly similar to me at first glance. But that's my problem. Thanks for clearing everything up.

It is.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.