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

Failed to start Tailscale node agent. #24

Open
Trevo525 opened this issue May 20, 2024 · 10 comments
Open

Failed to start Tailscale node agent. #24

Trevo525 opened this issue May 20, 2024 · 10 comments

Comments

@Trevo525
Copy link

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.
@legowerewolf
Copy link
Contributor

cc @diericx

@diericx
Copy link
Contributor

diericx commented May 21, 2024

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

@diericx
Copy link
Contributor

diericx commented Aug 4, 2024

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...

@diericx
Copy link
Contributor

diericx commented Aug 4, 2024

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.

@coxde
Copy link

coxde commented Sep 14, 2024

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.

I can confirm that /etc/default/tailscaled doesn't exit anymore (also tailscaled.service exit with error) after upgrading to SteamOS 3.6.13

@DriftingShadows
Copy link

The error I get is related to port not being provided

Sep 26 12:08:35 steamdeck systemd[1]: Starting Tailscale node agent...
Sep 26 12:08:35 steamdeck tailscaled[8055]: logtail started
Sep 26 12:08:35 steamdeck tailscaled[8055]: Program starting: v1.74.1-tccd6bf2f4-g8fce4ce11, Go 1.23.1: []string{"/opt/tailscale/ta>
Sep 26 12:08:35 steamdeck tailscaled[8055]: LogID: c40187b331dd88e975d1b86b96b9773d173cd699d717c1261b13f9e4889a13a2
Sep 26 12:08:35 steamdeck tailscaled[8055]: logpolicy: using $STATE_DIRECTORY, "/var/lib/tailscale"
Sep 26 12:08:35 steamdeck tailscaled[8055]: dns: [resolved-ping=yes rc=nm resolved=nss nm-resolved=yes nm-safe=no resolv-conf-mode=>
Sep 26 12:08:35 steamdeck tailscaled[8055]: dns: using "systemd-resolved" mode
Sep 26 12:08:35 steamdeck tailscaled[8055]: creating dns cleanup: route ip+net: no such network interface
Sep 26 12:08:35 steamdeck tailscaled[8055]: flushing log.
Sep 26 12:08:35 steamdeck tailscaled[8055]: logger closing down
Sep 26 12:08:35 steamdeck (ilscaled)[8086]: tailscaled.service: Referenced but unset environment variable evaluates to an empty str>
Sep 26 12:08:35 steamdeck tailscaled[8086]: invalid value "" for flag -port: can't be the empty string
Sep 26 12:08:35 steamdeck tailscaled[8086]: Usage of /opt/tailscale/tailscaled:
Sep 26 12:08:35 steamdeck tailscaled[8086]:   -bird-socket string
Sep 26 12:08:35 steamdeck tailscaled[8086]:             path of the bird unix socket
Sep 26 12:08:35 steamdeck tailscaled[8086]:   -cleanup
Sep 26 12:08:35 steamdeck tailscaled[8086]:             clean up system state and exit
Sep 26 12:08:35 steamdeck tailscaled[8086]:   -config string
Sep 26 12:08:35 steamdeck tailscaled[8086]:             path to config file, or 'vm:user-data' to use the VM's user-data (EC2)
Sep 26 12:08:35 steamdeck tailscaled[8086]:   -debug string
Sep 26 12:08:35 steamdeck tailscaled[8086]:             listen address ([ip]:port) of optional debug server
Sep 26 12:08:35 steamdeck tailscaled[8086]:   -no-logs-no-support
Sep 26 12:08:35 steamdeck tailscaled[8086]:             disable log uploads; this also disables any technical support
Sep 26 12:08:35 steamdeck tailscaled[8086]:   -outbound-http-proxy-listen string

So providing port via

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

works. Unfortunately im not technical enough to be able to fix the root problem.

@diericx
Copy link
Contributor

diericx commented Sep 26, 2024

@DriftingShadows did you try the workaround posted above?

@diericx
Copy link
Contributor

diericx commented Sep 26, 2024

Try something like this:

cat <<EOF > /etc/default/tailscaled
PORT="41641"
FLAGS=""
EOF

@DriftingShadows
Copy link

Try something like this:

cat <<EOF > /etc/default/tailscaled
PORT="41641"
FLAGS=""
EOF

That seems to have worked, thank you for the quick response. Do you know how i might be able to use the --accept-dns=false flag since we arent using tailscale up

@diericx
Copy link
Contributor

diericx commented Sep 26, 2024

The install script in this repo installs tailscaled, the daemon that the tailscale cli interacts with. You should still have to run tailscale up after running the install script. Assuming you already had tailscale running before, run tailscale down then tailscale up again with any desired flags and that should work.

By the way, did you encounter these issues on first install or after an update?

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

5 participants