Skip to content

Conversation

@chrisportela
Copy link

@chrisportela chrisportela commented Aug 11, 2023

This was in the original script for running tailscale and, I am not sure why, without this I couldn't get the tailscale service to startup.

I see from the history/gist it never seemed to be in this version, but it helped make things work.

@legowerewolf
Copy link
Contributor

legowerewolf commented Aug 11, 2023

The install process got tweaked a little bit moving from the gist to the repo; that might've caused some issues. Mind sharing what your /etc/systemd/system/tailscaled.service and /etc/default/tailscaled look like?

@legowerewolf
Copy link
Contributor

@chrisportela were you able to get it to work? If you didn't have any custom config, try deleting the two files I mentioned above and re-running.

@chrisportela
Copy link
Author

My /etc/default/tailscaled file was empty and this is my tailscaled.service file

[Unit]
Description=Tailscale node agent
Documentation=https://tailscale.com/kb/
Wants=network-pre.target
After=network-pre.target NetworkManager.service systemd-resolved.service

[Service]
EnvironmentFile=/etc/default/tailscaled
ExecStartPre=/usr/sbin/tailscaled --cleanup
ExecStart=/usr/sbin/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/run/tailscale/tailscaled.sock 
ExecStopPost=/usr/sbin/tailscaled --cleanup

Restart=on-failure

RuntimeDirectory=tailscale
RuntimeDirectoryMode=0755
StateDirectory=tailscale
StateDirectoryMode=0700
CacheDirectory=tailscale
CacheDirectoryMode=0750
Type=notify

[Install]
WantedBy=multi-user.target

I will try now and do a reinstall and see what happens.

@chrisportela
Copy link
Author

chrisportela commented Aug 18, 2023

I just redid the install:

deck on steamdeck in deck-tailscale on  main [$] 
❯ sudo bash tailscale.sh 
Getting version...got 1.46.1.
Downloading...done.
Installing...done.
Starting services...
systemd-sysext is already enabled and active
Job for tailscaled.service failed because the control pdeck on steamdeck in deck-tailscale on  main [$] 
❯ sudo bash tailscale.sh 
Getting version...got 1.46.1.
Downloading...done.
Installing...done.
Starting services...
systemd-sysext is already enabled and active
Job for tailscaled.service failed because the control process exited with error code.
See "systemctl status tailscaled.service" and "journalctl -xeu tailscaled.service" for details.
rocess exited with error code.
See "systemctl status tailscaled.service" and "journalctl -xeu tailscaled.service" for details.

And I get this set of errors pretty consistently without my change.

░░ 
░░ The process' exit code is 'exited' and its exit status is 2.
Aug 18 12:40:06 steamdeck tailscaled[101560]: logtail started
Aug 18 12:40:06 steamdeck tailscaled[101560]: Program starting: v1.46.1-te42e60103-g4cea91365, Go 1.21rc3: []string{"/usr/s>
Aug 18 12:40:06 steamdeck tailscaled[101560]: LogID: 68c1b0aae3028298e4a173ad245c1de85c3202bed02c06ad46c38c0442bb781e
Aug 18 12:40:06 steamdeck tailscaled[101560]: logpolicy: using $STATE_DIRECTORY, "/var/lib/tailscale"
Aug 18 12:40:06 steamdeck tailscaled[101560]: dns: [resolved-ping=yes rc=nm nm-resolved=yes nm-safe=no resolv-conf-mode=for>
Aug 18 12:40:06 steamdeck tailscaled[101560]: dns: using "systemd-resolved" mode
Aug 18 12:40:06 steamdeck tailscaled[101560]: creating dns cleanup: route ip+net: no such network interface
Aug 18 12:40:06 steamdeck tailscaled[101560]: deleting [-j ts-input] in filter/INPUT: running [/usr/bin/iptables -t filter >
Aug 18 12:40:06 steamdeck tailscaled[101560]: Try `iptables -h' or 'iptables --help' for more information.
Aug 18 12:40:06 steamdeck tailscaled[101560]: deleting [-j ts-forward] in filter/FORWARD: running [/usr/bin/iptables -t fil>
Aug 18 12:40:06 steamdeck tailscaled[101560]: Try `iptables -h' or 'iptables --help' for more information.
Aug 18 12:40:06 steamdeck tailscaled[101560]: deleting [-j ts-postrouting] in nat/POSTROUTING: running [/usr/bin/iptables ->
Aug 18 12:40:06 steamdeck tailscaled[101560]: Try `iptables -h' or 'iptables --help' for more information.
Aug 18 12:40:06 steamdeck tailscaled[101560]: deleting [-j ts-input] in filter/INPUT: running [/usr/bin/ip6tables -t filter>
Aug 18 12:40:06 steamdeck tailscaled[101560]: Try `ip6tables -h' or 'ip6tables --help' for more information.
Aug 18 12:40:06 steamdeck tailscaled[101560]: deleting [-j ts-forward] in filter/FORWARD: running [/usr/bin/ip6tables -t fi>
Aug 18 12:40:06 steamdeck tailscaled[101560]: Try `ip6tables -h' or 'ip6tables --help' for more information.
Aug 18 12:40:06 steamdeck tailscaled[101560]: [RATELIMIT] format("deleting %v in %s/%s: %v")
Aug 18 12:40:06 steamdeck tailscaled[101560]: flushing log.
Aug 18 12:40:06 steamdeck tailscaled[101560]: logger closing down
Aug 18 12:40:07 steamdeck systemd[1]: tailscaled.service: Failed with result 'exit-code'.

@chrisportela
Copy link
Author

Actually, I found part of the logs that say something which may be relevant.

Aug 18 12:40:06 steamdeck tailscaled[101525]: [RATELIMIT] format("deleting %v in %s/%s: %v")
Aug 18 12:40:06 steamdeck tailscaled[101525]: flushing log.
Aug 18 12:40:06 steamdeck tailscaled[101525]: logger closing down
Aug 18 12:40:06 steamdeck tailscaled[101555]: invalid value "" for flag -port: can't be the empty string
Aug 18 12:40:06 steamdeck tailscaled[101555]: Usage of /usr/sbin/tailscaled:
Aug 18 12:40:06 steamdeck tailscaled[101555]:   -bird-socket string
Aug 18 12:40:06 steamdeck tailscaled[101555]:             path of the bird unix socket
Aug 18 12:40:06 steamdeck tailscaled[101555]:   -cleanup
Aug 18 12:40:06 steamdeck tailscaled[101555]:             clean up system state and exit
Aug 18 12:40:06 steamdeck tailscaled[101555]:   -debug string
Aug 18 12:40:06 steamdeck tailscaled[101555]:             listen address ([ip]:port) of optional debug server
Aug 18 12:40:06 steamdeck tailscaled[101555]:   -no-logs-no-support
Aug 18 12:40:06 steamdeck tailscaled[101555]:             disable log uploads; this also disables any technical support
Aug 18 12:40:06 steamdeck tailscaled[101555]:   -outbound-http-proxy-listen string
Aug 18 12:40:06 steamdeck tailscaled[101555]:             optional [ip]:port to run an outbound HTTP proxy (e.g. "localhost>
Aug 18 12:40:06 steamdeck tailscaled[101555]:   -port value
Aug 18 12:40:06 steamdeck tailscaled[101555]:             UDP port to listen on for WireGuard and peer-to-peer traffic; 0 m>
Aug 18 12:40:06 steamdeck tailscaled[101555]:   -socket string
Aug 18 12:40:06 steamdeck tailscaled[101555]:             path of the service unix socket (default "/var/run/tailscale/tail>Aug 18 12:40:06 steamdeck tailscaled[101525]: [RATELIMIT] format("deleting %v in %s/%s: %v")
Aug 18 12:40:06 steamdeck tailscaled[101525]: flushing log.
Aug 18 12:40:06 steamdeck tailscaled[101525]: logger closing down
Aug 18 12:40:06 steamdeck tailscaled[101555]: invalid value "" for flag -port: can't be the empty string
Aug 18 12:40:06 steamdeck tailscaled[101555]: Usage of /usr/sbin/tailscaled:
Aug 18 12:40:06 steamdeck tailscaled[101555]:   -bird-socket string
Aug 18 12:40:06 steamdeck tailscaled[101555]:             path of the bird unix socket
Aug 18 12:40:06 steamdeck tailscaled[101555]:   -cleanup
Aug 18 12:40:06 steamdeck tailscaled[101555]:             clean up system state and exit
Aug 18 12:40:06 steamdeck tailscaled[101555]:   -debug string
Aug 18 12:40:06 steamdeck tailscaled[101555]:             listen address ([ip]:port) of optional debug server
Aug 18 12:40:06 steamdeck tailscaled[101555]:   -no-logs-no-support
Aug 18 12:40:06 steamdeck tailscaled[101555]:             disable log uploads; this also disables any technical support
Aug 18 12:40:06 steamdeck tailscaled[101555]:   -outbound-http-proxy-listen string
Aug 18 12:40:06 steamdeck tailscaled[101555]:             optional [ip]:port to run an outbound HTTP proxy (e.g. "localhost>
Aug 18 12:40:06 steamdeck tailscaled[101555]:   -port value
Aug 18 12:40:06 steamdeck tailscaled[101555]:             UDP port to listen on for WireGuard and peer-to-peer traffic; 0 m>
Aug 18 12:40:06 steamdeck tailscaled[101555]:   -socket string
Aug 18 12:40:06 steamdeck tailscaled[101555]:             path of the service unix socket (default "/var/run/tailscale/tail>
Aug 18 12:40:06 steamdeck tailscaled[101555]:   -socks5-server string
Aug 18 12:40:06 steamdeck tailscaled[101555]:   -socks5-server string

@legowerewolf
Copy link
Contributor

Very weird. Right now, you should have these files:

  • /etc/systemd/system/tailscaled.service - the service definition pulled directly from the tailscale download (includes an EnvironmentFile entry, which is the next item here)
  • /etc/default/tailscaled - some configuration, again pulled directly from the download (this is where the port should be set)
  • /etc/systemd/system/tailscaled.service.d/override.conf - our overrides, sourced from this repo

and of course the extension dir at /var/lib/extensions/tailscale.

If all those are in place, I don't know what the problem is.

So far you're the only person I've heard of having issues with this, which may just be because you had an older install and then updated. Not sure.

If it seems like this is going to be a recurring thing, I would propose that you update your override file instead of patching the script. It should have the same effect. Try using systemctl edit tailscaled and removing the --port parameter there.

@legowerewolf
Copy link
Contributor

There's been no response in awhile, so I'm going to assume things are working for you and close this. If that's not the case, we can re-open this.

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

Successfully merging this pull request may close these issues.

2 participants