I’m trying to run a relay on my Arch server, and for some reason when running it as a systemd service it gets killed by watchdog very quickly. This doesn’t happen to any of my other systemd services so I have no idea what’s going on.
Your Tor logs look good. Your Tor is starting, bootstrapping, checking its reachability, and everything looks as expected.
It appears that systemd is expecting some sort of “it worked” response from Tor, and it waits 1 minute and doesn’t get it so it assumes the Tor launch has failed and tries to kill it.
So my first thought is that there is a bug somewhere in the arch package, where it is expecting the wrong thing or otherwise not recognizing that Tor did successfully start.
But googling around for your messages like “tor.service: Watchdog timeout (limit 1min)!” doesn’t show anybody else with this issue. If it’s a bug with the arch package in general I would expect many more people to be reporting it.
So: is there anything unusual or unique or nonstandard about your Arch set-up?
Hm. When you build Tor from source, do you then run it under the same systemd init script? That systemd file is part of the Tor package, and it seems to be the comonent that is causing the problem.
This is all default except for the user and group, which doesn’t seem to be a problem since it’s with or without it. And yes, I ran it under the same systemd file when from source.
# relatively conservative, hardened Tor service. You may need to
# edit it if you are making changes to your Tor configuration that it
# does not allow. Package maintainers: this should be a starting point
# for your tor.service; it is not the last point.
[Unit]
Description=Anonymizing overlay network for TCP
After=syslog.target network.target nss-lookup.target
[Service]
User=toruser
Group=tor
Type=notify
NotifyAccess=all
ExecStartPre=/usr/bin/tor -f /etc/tor/torrc --verify-config
ExecStart=/usr/bin/tor -f /etc/tor/torrc
ExecReload=/bin/kill -HUP ${MAINPID}
KillSignal=SIGINT
TimeoutSec=60
Restart=on-failure
WatchdogSec=1m
LimitNOFILE=32768
# Hardening
PrivateTmp=yes
PrivateDevices=yes
ProtectHome=yes
ProtectSystem=full
ReadOnlyDirectories=/
ReadWriteDirectories=-/var/lib/tor
ReadWriteDirectories=-/var/log/tor
NoNewPrivileges=yes
CapabilityBoundingSet=CAP_SETUID CAP_SETGID CAP_NET_BIND_SERVICE CAP_DAC_READ_SEARCH
[Install]
WantedBy=multi-user.target
I would suggest also asking this question in the Arch community, since the most likely explanation is that it is something wrong with either the Arch package or with how you are using it.
(Maybe there are some Arch users here who can jump in and help too.)
Necrobumping…I got the same issue with an “regular” Arch ARM on Raspberry Pi 3.
Did you find any solution?
Jul 25 12:18:33 alarmpi systemd[1]: tor.service: Supervising process 1391 which is not our child. We'll most likely not notice when it exits.
Jul 25 12:19:15 alarmpi Tor[1391]: Signaled readiness to systemd
Jul 25 12:19:15 alarmpi systemd[1]: Started Anonymizing overlay network for TCP.
Jul 25 12:20:15 alarmpi systemd[1]: tor.service: Watchdog timeout (limit 1min)!
Jul 25 12:20:15 alarmpi systemd[1]: tor.service: Killing process 1391 (tor) with signal SIGABRT.
Jul 25 12:20:15 alarmpi systemd[1]: tor.service: Killing process 1391 (tor) with signal SIGKILL.
Jul 25 12:20:15 alarmpi systemd[1]: tor.service: Killing process 1393 (tor) with signal SIGKILL.
Jul 25 12:20:15 alarmpi systemd[1]: tor.service: Killing process 1394 (tor) with signal SIGKILL.
Jul 25 12:20:15 alarmpi systemd[1]: tor.service: Killing process 1395 (tor) with signal SIGKILL.
Jul 25 12:20:15 alarmpi systemd[1]: tor.service: Killing process 1396 (n/a) with signal SIGKILL.
Jul 25 12:20:15 alarmpi systemd[1]: tor.service: Main process exited, code=killed, status=9/KILL
Jul 25 12:20:15 alarmpi systemd[1]: tor.service: Failed with result 'watchdog'.