[GH-ISSUE #411] Newt logs : Error connecting to target: dial tcp IP:port: connect: connection refused #1435

Closed
opened 2026-04-16 08:04:29 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @davidszerman on GitHub (Mar 26, 2025).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/411

Hello,

i created a new site connected to Pangolin via Newt

On Pangolin, I can see that the site is connected

I try to create a ressource on the distant site

When i connect via web browser to the ressource, I have this error message in the newt logs 👍
ERROR: 2025/03/26 16:49:59 Error connecting to target: dial tcp IP:PORT: connect: connection refused

Any idea ?
What IP should I write ? 127.0.0.1 ? The newt docker IP ? Any other ?

Any of them works

Did I miss something ?

Thanks

Originally created by @davidszerman on GitHub (Mar 26, 2025). Original GitHub issue: https://github.com/fosrl/pangolin/issues/411 Hello, i created a new site connected to Pangolin via Newt On Pangolin, I can see that the site is connected I try to create a ressource on the distant site When i connect via web browser to the ressource, I have this error message in the newt logs 👍 ERROR: 2025/03/26 16:49:59 Error connecting to target: dial tcp IP:PORT: connect: connection refused Any idea ? What IP should I write ? 127.0.0.1 ? The newt docker IP ? Any other ? Any of them works Did I miss something ? Thanks
Author
Owner

@miloschwartz commented on GitHub (Mar 26, 2025):

This seems like Newt is unable to address the target of the resource on the network.

Note about using localhost:

If Newt is running in a container, then 127.0.0.1 or localhost will refer to the container itself, not the container's host machine. If the resources are running in the same Docker network as Newt, you can use the container name as the hostname. Otherwise, you can use the special Docker address 172.17.0.1 which will address the bare metal host itself.

Alternatively, you can use the IP of the host on the LAN. For example, if you're running Newt on an Unraid machine with internal address 192.168.1.81, and the resources are exposed at 192.168.1.81:8080, you could use this as the target in Pangolin.

<!-- gh-comment-id:2755191085 --> @miloschwartz commented on GitHub (Mar 26, 2025): This seems like Newt is unable to address the target of the resource on the network. Note about using localhost: If Newt is running in a container, then `127.0.0.1` or `localhost` will refer to the container itself, not the container's host machine. If the resources are running in the same Docker network as Newt, you can use the container name as the hostname. Otherwise, you can use the special Docker address `172.17.0.1` which will address the bare metal host itself. Alternatively, you can use the IP of the host on the LAN. For example, if you're running Newt on an Unraid machine with internal address `192.168.1.81`, and the resources are exposed at `192.168.1.81:8080`, you could use this as the target in Pangolin.
Author
Owner

@Boerny41 commented on GitHub (Mar 27, 2025):

Pretty much what @miloschwartz said, however, not all containers seem to work when addressing them via their docker hostname.

I've got a few containers that show Error connecting to target: dial tcp 172.21.0.3:8764: connect: connection refused when entering their hostname in the pangolin web UI. For these containers, I had to enter the 192.168.0.0/24 address. Don't forget to allow the port of said services it in the firewall of your docker server.

I'm not sure what the problem is, but some containers just don't seem to like how pangolin handles the connection.

<!-- gh-comment-id:2759054781 --> @Boerny41 commented on GitHub (Mar 27, 2025): Pretty much what @miloschwartz said, however, not all containers seem to work when addressing them via their docker hostname. I've got a few containers that show `Error connecting to target: dial tcp 172.21.0.3:8764: connect: connection refused` when entering their hostname in the pangolin web UI. For these containers, I had to enter the 192.168.0.0/24 address. Don't forget to allow the port of said services it in the firewall of your docker server. I'm not sure what the problem is, but some containers just don't seem to like how pangolin handles the connection.
Author
Owner

@davidszerman commented on GitHub (Mar 28, 2025):

Hi

Thank you both !

Indeed, the 172.17.0.1 address worked !

That is great ! !

Thanks

<!-- gh-comment-id:2760789751 --> @davidszerman commented on GitHub (Mar 28, 2025): Hi Thank you both ! Indeed, the 172.17.0.1 address worked ! That is great ! ! Thanks
Author
Owner

@miloschwartz commented on GitHub (Mar 28, 2025):

@davidszerman Awesome!

<!-- gh-comment-id:2761654174 --> @miloschwartz commented on GitHub (Mar 28, 2025): @davidszerman Awesome!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#1435