Skip to content

HTTP error! status: undefined #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jackrosenberg opened this issue May 7, 2025 · 4 comments
Open

HTTP error! status: undefined #37

jackrosenberg opened this issue May 7, 2025 · 4 comments

Comments

@jackrosenberg
Copy link

jackrosenberg commented 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>

INFO: 2025/05/07 20:53:10 Sent registration message

root@vps# journalctl -eu fossorial:

Starting Fossorial Service...
node[93818]: Running migrations...
node[93818]: Migrations completed successfully.
systemd[1]: Started Fossorial Service.
node[93830]: 2025-05-07T18:51:55.874Z [warn]: Email SMTP configuration is missing. Emails will not be sent.
node[93830]: 2025-05-07T18:51:56.032Z [info]: Server admin created
node[93830]: 2025-05-07T18:51:57.049Z [info]: API server is running on http://localhost:3000
node[93830]: 2025-05-07T18:51:57.050Z [info]: Internal server is running on http://localhost:3001
node[93830]: 2025-05-07T18:51:58.647Z [info]: Next.js server is running on http://localhost:3002
node[93830]: 2025-05-07T18:52:01.212Z [info]: Created new exit node Exit Node zAmAytTq with address 100.89.128.1/24 and port 51820
node[93830]: 2025-05-07T18:53:10.790Z [info]: Establishing websocket connection
node[93830]: 2025-05-07T18:53:10.790Z [info]: Client added to tracking - Newt ID: ddmmqvgjehmnxwg, Total connections: 1
node[93830]: 2025-05-07T18:53:10.790Z [info]: WebSocket connection established - Newt ID: ddmmqvgjehmnxwg
node[93830]: 2025-05-07T18:53:10.802Z [info]: Handling register message!
node[93830]: 2025-05-07T18:53:10.829Z [error]: Message handling error: HTTP error! status: undefined
node[93830]: Stack: Error: HTTP error! status: undefined
node[93830]:     at addPeer (file:///nix/store/4sa8kqr8vzjv73b08r7f4nxpidh8pff0-pangolin-frontend-1.2.0/dist/server.mjs:2370:13)
node[93830]:     at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
node[93830]:     at async handleRegisterMessage (file:///nix/store/4sa8kqr8vzjv73b08r7f4nxpidh8pff0-pangolin-frontend-1.2.0/dist/server.mjs:2722:3)
node[93830]:     at async WebSocket.<anonymous> (file:///nix/store/4sa8kqr8vzjv73b08r7f4nxpidh8pff0-pangolin-frontend-1.2.0/dist/server.mjs:2884:25)

What am i doing wrong here?

@justincmoy
Copy link

This seems to be a similar issue to #32. Comment from that thread:

This usually occurs when Pangolin can not address the Gerbil container. Do you see any logs from Gerbil when this happens indicating for some reason that it did not start properly? How are you restarting the stack on the cloud?

@jackrosenberg
Copy link
Author

jackrosenberg commented May 14, 2025

Saw that but I think connectivity is alright:

gerbil[139495]: INFO: 2025/05/10 20:52:56 Fetching remote config from http://localhost:3001/api/v1/gerbil/get-config
gerbil[139495]: ERROR: 2025/05/10 20:52:56 Error fetching remote config http://localhost:3001/api/v1/gerbil/get-config: Post "http://loca>
gerbil[139495]: ERROR: 2025/05/10 20:52:56 Failed to load configuration: Post "http://localhost:3001/api/v1/gerbil/get-config": dial tcp >
gerbil[139495]: INFO: 2025/05/10 20:53:01 Fetching remote config from http://localhost:3001/api/v1/gerbil/get-config

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
Copy link
Author

Although I am getting some potentially weird behavior here:

[root@vps:~]# curl localhost:3001/api/v1 
{"message":"Healthy"}

[root@vps:~]# curl localhost:3001/api/v1/gerbil/get-config
{"data":null,"success":false,"error":true,"message":"The requests url is not found - /api/v1/gerbil/get-config","status":404,"stack":null}

@TyDooo
Copy link

TyDooo commented 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 --reachableAt argument passed to Gerbil. I also had to manually update the exitNodes table in the database with the correct host name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants