Token Expired When installing

i installed twingate on docker with the follow command

docker run -d --sysctl net.ipv4.ping_group_range="0 2147483647" --env TWINGATE_NETWORK="pixelaxolotl" --env TWINGATE_ACCESS_TOKEN="" --env TWINGATE_REFRESH_TOKEN=""  --env TWINGATE_LABEL_HOSTNAME="`hostname`" --name "twingate" --env TWINGATE_LOG_LEVEL=7 --restart=unless-stopped --pull=always twingate/connector:1

and i cant get it to authentencate
everytime i get the error

[DEBUG] [libsdwan] submit_request: sending HTTP request 13296101902772363643
[DEBUG] [libsdwan] http::request::send_request: POST "https://pixelaxolotl.twingate.com/api/v5/connector/refresh" application/json
[DEBUG] [libsdwan] http::response::from: certificate 8fe918ea2a51116d3fd2cfd0e5327c1ef49b6f1f4604ccc2b02f447a269ce707, issuer: C=US, O=Let's Encrypt, CN=R3, subject: CN=*.twingate.com
[DEBUG] [libsdwan] http::request::handle_response: POST "https://pixelaxolotl.twingate.com/api/v5/connector/refresh" 200 OK (duration 1 sec)
[DEBUG] [libsdwan] operator(): got HTTP request 13296101902772363643 successful response
[DEBUG] [libsdwan] [controller] verify_token: {"alg":"ES256","kid":"H8nEzNTEsBc-FN4A0I3PsCCIIC7zNReuNSBow9NNxLk","typ":"DAT"} {"nt":"AN","aid":"221864","did":"1201423","jti":"60ffd1d7-b8f2-451e-8943-c9df116f68a7","iss":"twingate","aud":"pixelaxolotl","exp":1706268624,"iat":1706265024,"ver":"4","tid":"23519","rnw":1706265305,"rnetid":"30429"}
[WARN] [libsdwan] [controller] parse_verify_token: token verification failed: token expired
[WARN] [libsdwan] [controller] operator(): failed to get SD: Invalid token, code 0
[DEBUG] [libsdwan] [controller] get_sd: getting SD
[DEBUG] [libsdwan] [controller] require_access_token: dat.expired
[DEBUG] [libsdwan] submit_request: sending HTTP request 13296101902772363643
[DEBUG] [libsdwan] http::request::send_request: POST "https://pixelaxolotl.twingate.com/api/v5/connector/refresh" application/json
[DEBUG] [libsdwan] http::response::from: certificate 8fe918ea2a51116d3fd2cfd0e5327c1ef49b6f1f4604ccc2b02f447a269ce707, issuer: C=US, O=Let's Encrypt, CN=R3, subject: CN=*.twingate.com
[DEBUG] [libsdwan] http::request::handle_response: POST "https://pixelaxolotl.twingate.com/api/v5/connector/refresh" 200 OK (duration 1 sec)
[DEBUG] [libsdwan] operator(): got HTTP request 13296101902772363643 successful response
[DEBUG] [libsdwan] [controller] verify_token: {"alg":"ES256","kid":"H8nEzNTEsBc-FN4A0I3PsCCIIC7zNReuNSBow9NNxLk","typ":"DAT"} {"nt":"AN","aid":"221864","did":"1201423","jti":"b61b2655-fb62-4901-b4a0-62816d4acb87","iss":"twingate","aud":"pixelaxolotl","exp":1706268628,"iat":1706265028,"ver":"4","tid":"23519","rnw":1706265314,"rnetid":"30429"}
[WARN] [libsdwan] [controller] parse_verify_token: token verification failed: token expired
[WARN] [libsdwan] [controller] operator(): failed to get SD: Invalid token, code 0

I have tried updating the token and reinstalling but the same issue persist

Docker: 25.0.0, build e758fe5
Debain 12
Twingate latest

Hey, hope you are doing well!

The logs seem similar to what I’ve seen in the past with clock drift on the machine running the connector in question. Twingate have a knowledge base article on the issue → https://help.twingate.com/hc/en-us/articles/5933234470045. That’s where I would start!

Thank you very much
it seem that clock drift caused all this
its working as intended for now :slight_smile:

1 Like