Newt Pangolin connection failure through Rest API #274

Closed
opened 2025-11-13 11:55:13 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @rahulr56 on GitHub (Apr 26, 2025).

I finished setting up Pangolin server using the automated installer. No errors are found in Pangolin, trraefik and gerbil (crowdsec skipped). All configurations are default. I have the dashboard working and I was able to setup multiple organizations. However, when I tried to add sites with NEWT using docker compose, the following errors are seen:

ERROR: 2025/04/26 00:02:50 Failed to connect: failed to get token: failed to request new token: Post "https://pangolin.<domain>/api/v1/auth/newt/get-token": dial tcp <Server IP>:443: i/o timeout. Retrying in 10s...

Upon further checking the Rest API sites:

  • https://pangolin./api/v1/auth/newt/get-token
    • {"data":null,"success":false,"error":true,"message":"The requests url is not found - /api/v1/auth/newt/get-token","status":404,"stack":null}
  • https://pangolin./api/v1/
    • {"message":"Healthy"}
  • https://pangolin./api/v1/users
    • {"data":{"users":[],"pagination":{"total":1,"limit":1000,"offset":0}},"success":true,"error":false,"message":"Users retrieved successfully","status":200}
  • https://pangolin./api/v1/auth
    • {"data":null,"success":false,"error":true,"message":"The requests url is not found - /api/v1/auth","status":404,"stack":null}

Even the /user returns the correct authenticated user along with email address.

I'm not sure how the /auth Rest APIs are not working. Can someone help me get this working?

Distro : Arch Linux
Ports exposed: 80, 443, 51820
Arch : x86_64

Versions:

  • Pangolin: 1.2.0
  • Traefik : 3.3.3
  • Gerbil : 1.0.0
  • Newt : 1.1.3 (latest from fosrl/newt)
Originally created by @rahulr56 on GitHub (Apr 26, 2025). I finished setting up Pangolin server using the automated installer. No errors are found in Pangolin, trraefik and gerbil (crowdsec skipped). All configurations are default. I have the dashboard working and I was able to setup multiple organizations. However, when I tried to add sites with NEWT using docker compose, the following errors are seen: ``` ERROR: 2025/04/26 00:02:50 Failed to connect: failed to get token: failed to request new token: Post "https://pangolin.<domain>/api/v1/auth/newt/get-token": dial tcp <Server IP>:443: i/o timeout. Retrying in 10s... ``` Upon further checking the Rest API sites: * https://pangolin.<DOMAIN>/api/v1/auth/newt/get-token * `{"data":null,"success":false,"error":true,"message":"The requests url is not found - /api/v1/auth/newt/get-token","status":404,"stack":null}` * https://pangolin.<DOMAIN>/api/v1/ * `{"message":"Healthy"}` * https://pangolin.<DOMAIN>/api/v1/users * `{"data":{"users":[],"pagination":{"total":1,"limit":1000,"offset":0}},"success":true,"error":false,"message":"Users retrieved successfully","status":200}` * https://pangolin.<DOMAIN>/api/v1/auth * `{"data":null,"success":false,"error":true,"message":"The requests url is not found - /api/v1/auth","status":404,"stack":null}` Even the /user returns the correct authenticated user along with email address. I'm not sure how the /auth Rest APIs are not working. Can someone help me get this working? Distro : Arch Linux Ports exposed: 80, 443, 51820 Arch : x86_64 Versions: * Pangolin: 1.2.0 * Traefik : 3.3.3 * Gerbil : 1.0.0 * Newt : 1.1.3 (latest from fosrl/newt)
Author
Owner

@oschwartz10612 commented on GitHub (Apr 30, 2025):

This feels like the instance running newt can not reach the cloud VPS. Did you perform those API tests from the machine running newt? I would check using dig or nslookup to make sure the DNS resolves and then maybe try a curl to see if it is reachable. If it is we can dive deeper into why newt cant reach it.

@oschwartz10612 commented on GitHub (Apr 30, 2025): This feels like the instance running newt can not reach the cloud VPS. Did you perform those API tests from the machine running newt? I would check using dig or nslookup to make sure the DNS resolves and then maybe try a curl to see if it is reachable. If it is we can dive deeper into why newt cant reach it.
Author
Owner

@github-actions[bot] commented on GitHub (May 15, 2025):

This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.

@github-actions[bot] commented on GitHub (May 15, 2025): This issue has been automatically marked as stale due to 14 days of inactivity. It will be closed in 14 days if no further activity occurs.
Author
Owner

@enricoroselino commented on GitHub (May 26, 2025):

i also facing similar case but

tls: failed to verify certificate
@enricoroselino commented on GitHub (May 26, 2025): i also facing similar case but ``` tls: failed to verify certificate ```
Author
Owner

@oschwartz10612 commented on GitHub (May 27, 2025):

@enricoroselino if this is coming from newt it is usually because the cert on the Pangolin VPS is not verified. If you are using http ssl generation with Lets Encrypt (the default) then make sure port 80 is open and accessible on the VPS so that Traefik can get a cert. You will be able to tell because the HTTPS cert should be good when you visit pangolin in the brower.

If it is still not working please post full Traefik and Newt logs.

@oschwartz10612 commented on GitHub (May 27, 2025): @enricoroselino if this is coming from newt it is usually because the cert on the Pangolin VPS is not verified. If you are using http ssl generation with Lets Encrypt (the default) then make sure port 80 is open and accessible on the VPS so that Traefik can get a cert. You will be able to tell because the HTTPS cert should be good when you visit pangolin in the brower. If it is still not working please post full Traefik and Newt logs.
Author
Owner

@enricoroselino commented on GitHub (Jun 2, 2025):

@oschwartz10612 its working after docker compose down docker compose up -d at pangolin folder, seems like you said traefik "somehow" fail generating SSL cert. thank you

@enricoroselino commented on GitHub (Jun 2, 2025): @oschwartz10612 its working after docker compose down docker compose up -d at pangolin folder, seems like you said traefik "somehow" fail generating SSL cert. thank you
Author
Owner

@oschwartz10612 commented on GitHub (Jun 2, 2025):

Yeah traefik somtimes needs a restart if it cant find that initial cert. Glad its working and you tried that!

@oschwartz10612 commented on GitHub (Jun 2, 2025): Yeah traefik somtimes needs a restart if it cant find that initial cert. Glad its working and you tried that!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#274