mirror of
https://github.com/fosrl/newt.git
synced 2026-03-09 07:12:28 -05:00
HTTP error! status: undefined #22
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jackrosenberg on GitHub (May 7, 2025).
Hello hello,
I am having some trouble linking up newt on my edge server to the stack running on the VPS. Pangolin, Gerbil, and Traefik (with Badger) are all running (startup in that order), and the dashboard is available at
https://<dashboardUrl>. Login and site creation work just fine, but running the command suggested by site creation never receives a response, see below:root@edge_server# newt --id ddmmqvgjehmnxwg --secret <secret> --endpoint https://<dashboardUrl>root@vps# journalctl -eu fossorial:What am i doing wrong here?
@justincmoy commented on GitHub (May 14, 2025):
This seems to be a similar issue to https://github.com/fosrl/newt/issues/32. Comment from that thread:
@jackrosenberg commented on GitHub (May 14, 2025):
Saw that but I think connectivity is alright:
It fails the first couple of times when the services are still starting up, but then stops throwing errors and appears to be connected.
@jackrosenberg commented on GitHub (May 14, 2025):
Although I am getting some potentially weird behavior here:
@TyDooo commented on GitHub (May 30, 2025):
I can confirm that this issue is caused by Pangolin not being able to communicate with Gerbil.
For me, the issue was caused by an incorrect host name in the
--reachableAtargument passed to Gerbil. I also had to manually update theexitNodestable in the database with the correct host name.@jackrosenberg commented on GitHub (May 30, 2025):
Thanks a bunch! This got me an acknowledged response! What do you mean by the exitNodes table? Where is that stored?
@TyDooo commented on GitHub (May 30, 2025):
The
exitNodestable is located within an SQLite database file. It is located in thedb/directory next to your pangolin configuration file.Something like this should work to read from the database:
In the output, the last column should match the value in the
--reachableAtargument. If it matches, then you should be all good. Otherwise you need to change the value in the column to match the argument.This may have been an issue specific to my setup though. So if it all works on your end then you don't need to worry about this :p
@oschwartz10612 commented on GitHub (May 31, 2025):
^^^^ this is likely the issue. When the gerbil registers this value gets set. If you are not using docker make sure that the Pangolin api can reach the Gerbil API over this URL.
@jackrosenberg commented on GitHub (May 31, 2025):
This helps a lot, i'm onto the next issue!! It looks like newt's wg connection isn't being created properly. running
root@edge_server# ip a | grep wgon the yields nothingroot@edge_server# ~/./newt --id ... --secret <...> --endpoint https:/<dashboardurl>gerbil conf:@TyDooo commented on GitHub (May 31, 2025):
I don't think Newt creates a new network interface; only Gerbil should do that. Could you try restarting your VPS? I initially had the same issue where Newt was unable to ping the server. Rebooting the VPS and the Newt instance fixed it.
@jackrosenberg commented on GitHub (Jun 4, 2025):
Okay rebooting fixes almost everything! I still can't get the services to connect
root@edge_server# ./newt --id {if} --secret {secret} --endpoint https://{dashboardUrl}then i create a resource that points from p.{baseDomain} to localhost:2283
and when accessing p.{baseDomain}:
Internal Server Error
curl-ing from the vps proves the tunnel is working though!
root@vps # curl 100.89.128.4:55601there are no errors in the logs of pangolin, gerbil or traefik
Whats going on here?
@TyDooo commented on GitHub (Jun 4, 2025):
It looks as if Traefik isn’t receiving the expected routing rules.
Could you please verify what Pangolin is sending?
@jackrosenberg commented on GitHub (Jun 4, 2025):
root@vps# curl -s http://localhost:3001/api/v1/traefik-config | jq"apiBaseUrl": "http://pangolin:3001/api/v1"should probably be localhost:3001/api/v1, since the pangolin interface doesn't exist
@TyDooo commented on GitHub (Jun 4, 2025):
Indeed, make sure the value of
internal_hostnamein the Pangolin config is set tolocalhost.@jackrosenberg commented on GitHub (Jun 4, 2025):
Works like a charm! Thanks so much for your help!!!
@jackrosenberg commented on GitHub (Jul 6, 2025):
Any idea on what this reboot reloads btw? It would be nice to not need to reboot after install. @TyDooo @oschwartz10612
@oschwartz10612 commented on GitHub (Jul 6, 2025):
Hard to say but I think restarting newt just re initiates the connection workflow that sometimes does not recover well when it looses connection to the vps. There are some changes coming to newt that should improve its reconnect and uptime performance!
@jackrosenberg commented on GitHub (Jul 6, 2025):
Oh I mean the vps. Is there some wireguard thing that can be manually refreshed?
@oschwartz10612 commented on GitHub (Jul 6, 2025):
Yeah rebooting is kind of nuclear haha. You can just use docker and restart the gerbil container or do
docker compose downand thendocker compose up -dto restart the stack. This will restart wg.@jackrosenberg commented on GitHub (Jul 6, 2025):
Uhhh haha soo I run Pangolin and friends without docker, thru NixOs. I've tried restarting all systemd services with with Network in the name already.
@jackrosenberg commented on GitHub (Aug 10, 2025):
@oschwartz10612, any idea what service/other thing this could be ?
@oschwartz10612 commented on GitHub (Aug 16, 2025):
Ahh okay @jackrosenberg yeah its because Gerbil creates wg0 interface
that persists across restarts of the binary. The idea was it kind of
puppets and syncs the config of the wg interface if it persists accross
restarts of the binary but that might have some flaws.
To remove it you could do
ip link del wg0and then restart gerbil andit will recreate it. I bet that would work!