Cant connect to connector through docker container on arch linux

I’m using arch linux distribution and trying to connect to the connector via docker container. I followed every guide on the internet, but I always get the same error:

$ docker exec twingate-connector ./connectord --version

1.59.0

$ docker --version

Docker version 24.0.5

Docker container log:

2023-09-18 12:28:23 [INFO] [connector] logging to stderr: always

2023-09-18 12:28:23 [INFO] [connector] starting crash reporting service

2023-09-18 12:28:23 [INFO] [connector] initializing sdwan

2023-09-18 12:28:23 [INFO] [connector] started server on /connector.sock

2023-09-18 12:28:23 [INFO] [connector] State: Offline

2023-09-18 12:28:23 [INFO] [connector] State: Authentication

2023-09-18 12:28:23 [WARN] [libsdwan] [controller] parse_verify_token: token verification failed: token expired

2023-09-18 12:28:23 [WARN] [libsdwan] [controller] operator(): failed to get SD: Invalid token, err code 1

2023-09-18 12:28:25 [WARN] [libsdwan] [controller] parse_verify_token: token verification failed: token expired

2023-09-18 12:28:25 [WARN] [libsdwan] [controller] operator(): failed to get SD: Invalid token, err code 1

2023-09-18 12:28:29 [WARN] [libsdwan] [controller] parse_verify_token: token verification failed: token expired

2023-09-18 12:28:29 [WARN] [libsdwan] [controller] operator(): failed to get SD: Invalid token, err code 1

2023-09-18 12:28:33 [INFO] [connector] processing “health” request

2023-09-18 12:28:33 [WARN] [libsdwan] [controller] parse_verify_token: token verification failed: token expired

2023-09-18 12:28:33 [WARN] [libsdwan] [controller] operator(): failed to get an access token: Invalid token

2023-09-18 12:28:37 [WARN] [libsdwan] [controller] parse_verify_token: token verification failed: token expired

2023-09-18 12:28:37 [WARN] [libsdwan] [controller] operator(): failed to get SD: Invalid token, err code 1

If you’re getting token expired messages like that right away, you will need to ensure that you’re running a time sync service on your machine and that your local timezone, docker timezone and machine time are set correctly, as clock drift is almost exclusively the cause of what you’re seeing.

If fixing your time sync doesn’t resolve the issue, let me know!

Thanks,

-arthur

Oh my god. I’m so stupid. That worked. thanks

Never forget the first rule of computers. We’re not stupid, they are!!!

Glad it’s sorted out.

What’s the best way to ensure time and timezone sync across an Ubuntu 22.04 host and Docker Twingate container?

In general containers should auto sync to the host, you shouldn’t have to do anything special to set the timezone or clock itself. Having the host do ntp checks against a good working server somewhere and has the correct timezone set up should suffice as far as making sure that Docker based Connectors stay synced up.

There’s some good steps you can look through for testing and enabling ntp on your Linux server here.