Skip to content
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

Tailscale authentication is lost by updating the NanoKVM application #149

Open
Bengt opened this issue Nov 12, 2024 · 13 comments
Open

Tailscale authentication is lost by updating the NanoKVM application #149

Bengt opened this issue Nov 12, 2024 · 13 comments

Comments

@Bengt
Copy link

Bengt commented Nov 12, 2024

When I have Tailscale connected and update the NanoKVM application via the web interface, Tailscale is no longer connected:

# tailscale status
failed to connect to local tailscaled; it doesn't appear to be running

When I reauthenticate using the wizard in the web interface (settings / Tailscale), Tailscale works again.

@nwgat
Copy link

nwgat commented Nov 12, 2024

i also ran into this issue

@jasonafriedman
Copy link

jasonafriedman commented Nov 13, 2024

I am running into the issue where authentication is being lost without updating after a couple hours. I am using nanokvm 2.1.1. Looking at dmesg it looks like there is an out of memory error.
[98979.301911] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),task=tailscaled,pid=3684,uid=0 [98979.301964] Out of memory: Killed process 3684 (tailscaled) total-vm:1314096kB, anon-rss:62728kB, file-rss:92kB, shmem-rss:0kB, UID:0 pgtables:336kB oom_score_adj:0

@alexoughton
Copy link

I'm having the same issues with both the authentication and the oom-kill. It looks like it's important to keep tailscale at version 1.70.0 and not update it to 1.76.6 in order to avoid this issue. I was also able to downgrade back to 1.70.0 on a KVM experiencing this problem and it went away.

@mindstorms6
Copy link

@alexoughton how did you force Tailscale back down to 1.70.0?

@alexoughton
Copy link

alexoughton commented Nov 13, 2024

edit for anyone newly coming to this: I instead recommend following @jasonafriedman 's simpler solution below, as this is more steps than were necessary.

Original response:

@mindstorms6 Some of these steps may not have been necessary, but this is what I had done while investigating the problem:

  1. I moved /etc/init.d/S98tailscaled away to ~ to disable it, and rebooted the KVM.
  2. I moved /usr/bin/tailscale to /usr/bin/tailscale-old, and moved /usr/sbin/tailscaled to /usr/sbin/tailscaled-old.
  3. I went to the tailscale option in the web interface. It told me it wasn't installed, so I hit the "install" button. This shows an error but...
  4. ...the correct versions of /usr/bin/tailscale and /usr/sbin/tailscaled were now in place. I moved /etc/init.d/S98tailscaled back into place and ran /etc/init.d/S98tailscaled restart.
  5. Back in the web interface, I was now able to re-register to tailscale, and the admin interface for that showed I was back at 1.70.0.

As I said, this may have been more steps than actually needed, but stumbling through this as above got me into the right place.

@mindstorms6
Copy link

@alexoughton you're the best - that also worked for me - thank you!

@jasonafriedman
Copy link

For me removing the old packages and reinstalling through webui worked.
rm /usr/bin/tailscale and rm /usr/sbin/tailscaled

@crustovsky
Copy link

This worked @alexoughton thanks, there seems to be mistake in step 2 though, i think it should state to "and moved /usr/sbin/tailscaled to /usr/sbin/tailscaled-old"

@alexoughton
Copy link

Thanks @crustovsky,

Yes, that's right there's a mistake there which I've now updated. In any case though, following @jasonafriedman 's simpler solution is recommended here. I'll edit my comment for that.

@alexoughton
Copy link

Note that you will also need to run tailscale set --auto-update=false to prevent auto-updates from occurring again until this is fixed.

@ironicbadger
Copy link

@alexoughton where does the fix need to come from? sipeed side? or Tailscale?

@alexoughton
Copy link

@ironicbadger I haven't at all investigated why tailscale is getting oom-killed, only found this workaround. I'd say sipeed need to do that initial investigation, and then feed back to tailscale if it's just a memory leak on their side.

@ironicbadger
Copy link

Lmk as I am a Tailscale employee

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

7 participants