tailscale / golink

A private shortlink service for tailnets
BSD 3-Clause "New" or "Revised" License
1.25k stars 79 forks source link

Connection failure running under Docker #91

Closed Duckfan77 closed 1 year ago

Duckfan77 commented 1 year ago

I'm running golink through docker, and while it used to work, it started producing a 404 error, and now appears to be stuck in a connection loop. I tried removing the docker instance and the machine from tailscale, but this is still occurring with a clean install.

I provided a key using TS_AUTHKEY when creating the instance, but while the machine now exists in the tailscale machines page, it shows no connection, and the docker log seems to suggest the key is invalid. Generating a new authkey and replacing the existing one did not resolve the issue, and did not change the logs as far as I can see.

Docker log:

2023/11/14 16:55:56 control: [v1] authRoutine: state:authenticating; wantLoggedIn=true
2023/11/14 16:55:56 control: [v1] direct.TryLogin(token=false, flags=10)
2023/11/14 16:55:56 control: LoginInteractive -> regen=true
2023/11/14 16:55:56 control: doLogin(regen=true, hasUrl=false)
2023/11/14 16:55:56 control: Generating a new nodekey.
2023/11/14 16:55:56 control: RegisterReq: onode= node=[ZhdCM] fup=false nks=false
2023/11/14 16:55:56 control: RegisterReq: got response; nodeKeyExpired=false, machineAuthorized=false; authURL=false
2023/11/14 16:55:56 control: [v1] TryLogin: invalid key: unable to validate API key
2023/11/14 16:55:56 control: [v1] sendStatus: authRoutine-report: state:authenticating
2023/11/14 16:55:56 control: authRoutine: [v1] backoff: 22694 msec
2023/11/14 16:55:56 Received error: invalid key: unable to validate API key
2023/11/14 16:56:19 control: [v1] authRoutine: state:authenticating; wantLoggedIn=true
2023/11/14 16:56:19 control: [v1] direct.TryLogin(token=false, flags=10)
2023/11/14 16:56:19 control: LoginInteractive -> regen=true
2023/11/14 16:56:19 control: doLogin(regen=true, hasUrl=false)
2023/11/14 16:56:19 control: Generating a new nodekey.
2023/11/14 16:56:19 control: RegisterReq: onode= node=[Hq+DJ] fup=false nks=false
2023/11/14 16:56:19 control: RegisterReq: got response; nodeKeyExpired=false, machineAuthorized=false; authURL=false
2023/11/14 16:56:19 control: [v1] TryLogin: invalid key: unable to validate API key
2023/11/14 16:56:19 control: [v1] sendStatus: authRoutine-report: state:authenticating
2023/11/14 16:56:19 control: authRoutine: [v1] backoff: 24477 msec
2023/11/14 16:56:19 Received error: invalid key: unable to validate API key
willnorris commented 1 year ago

yep, this was a legitimate bug introduced by a commit yesterday. Fix coming soon. Thanks for pointing it out!

willnorris commented 1 year ago

One more issue I found that also has a PR out to fix it.