tailscale-dev/deck-tailscale

Failed to start Tailscale node agent.

Trevo525 opened this issue · 10 comments

I tried to run sudo bash tailscale.sh but I got an error when it tries to start the tailscaled service. The error in systemctl didn't help me much either.

(3)(deck@TrevDeck deck-tailscale)$ sudo bash tailscale.sh
[sudo] password for deck:
Getting version...got 1.66.3.
Downloading:
tailscale.tgz                                   100%[=====================================================================================================>]  26.06M  23.7MB/s    in 1.1s
Removing Legacy Installations...done.
Installing...

Warning: An existing Tailscaled systemd override file was detected. It must be replaced.
A backup of the existing file is being placed at /etc/systemd/system/tailscaled.service.d/override.conf.bak

done.
Starting required services...Install complete.
Starting tailscaled...ERROR: Could not start tailscaled service
done.
Installation Complete.
(deck@TrevDeck deck-tailscale)$ systemctl status tailscaled.service
× tailscaled.service - Tailscale node agent
     Loaded: loaded (/etc/systemd/system/tailscaled.service; enabled; preset: disabled)
    Drop-In: /etc/systemd/system/tailscaled.service.d
             └─override.conf
     Active: failed (Result: exit-code) since Mon 2024-05-20 12:13:02 EDT; 26s ago
       Docs: https://tailscale.com/kb/
    Process: 14986 ExecStartPre=/opt/tailscale/tailscaled --cleanup (code=exited, status=0/SUCCESS)
    Process: 15016 ExecStart=/opt/tailscale/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/run/tailscale/tailscaled.sock --port=${PORT} $FLAGS (code=exited, status=2)
    Process: 15021 ExecStopPost=/opt/tailscale/tailscaled --cleanup (code=exited, status=0/SUCCESS)
   Main PID: 15016 (code=exited, status=2)
        CPU: 186ms

May 20 12:13:02 TrevDeck systemd[1]: tailscaled.service: Scheduled restart job, restart counter is at 5.
May 20 12:13:02 TrevDeck systemd[1]: Stopped Tailscale node agent.
May 20 12:13:02 TrevDeck systemd[1]: tailscaled.service: Start request repeated too quickly.
May 20 12:13:02 TrevDeck systemd[1]: tailscaled.service: Failed with result 'exit-code'.
May 20 12:13:02 TrevDeck systemd[1]: Failed to start Tailscale node agent.

Maybe there are logs in journalctl? I think it should be something like:

journalctl -u tailscaled.service

Could also stop the service and try running the following manually to see why it is failing:

/opt/tailscale/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/run/tailscale/tailscaled.sock --port=41641

I actually just ran into this after updating. After checking journalctl for logs I got:

Aug 03 22:45:44 steamdeck systemd[1]: tailscaled.service: Failed to load environment files: No such file or directory
Aug 03 22:45:44 steamdeck systemd[1]: tailscaled.service: Failed to run 'start-pre' task: No such file or directory
Aug 03 22:45:44 steamdeck systemd[1]: tailscaled.service: Failed with result 'resources'.
Aug 03 22:45:44 steamdeck systemd[1]: Failed to start Tailscale node agent.

Looks like /etc/default/tailscaled got removed...

$ ls /etc/default/tailscaled
ls: cannot access '/etc/default/tailscaled': No such file or directory

I downloaded ts again and ran the following:

$ cp tailscale_1.70.0_amd64/systemd/tailscaled.defaults /etc/default/tailscaled

And it is working! I'll start thinking of a workaround...

I assume this is related but without the logs from @Trevo525 there's no way to confirm. I believe my findings confirm that this installation method does not persist through updates anymore though.