So on CentOS 9 im trying to set up a relay, but whenever i try to start/restart tor it results in an error. I tried to find solutions online, but couldn’t find any. Here’s the logs from journalctl -xeu tor.service
The unit tor.service has entered the ‘failed’ state with result ‘exit-code’. Apr 14 19:46:40 ip-172-26-6-114.ap-northeast-1.compute.internal systemd[1]: Failed to start Anonymizing overlay network for TCP. Subject: A start job for unit tor.service has failed Defined-By: systemd Support: Red Hat Customer Experience & Engagement - Red Hat Customer Portal
A start job for unit tor.service has finished with a failure. The job identifier is 1734 and the job result is failed. Apr 14 19:46:41 ip-172-26-6-114.ap-northeast-1.compute.internal systemd[1]: tor.service: Scheduled restart job, restart counter is at 5. Subject: Automatic restarting of a unit has been scheduled Defined-By: systemd Support: Red Hat Customer Experience & Engagement - Red Hat Customer Portal
Automatic restarting of the unit tor.service has been scheduled, as the result for the configured Restart= setting for the unit. Apr 14 19:46:41 ip-172-26-6-114.ap-northeast-1.compute.internal systemd[1]: Stopped Anonymizing overlay network for TCP. Subject: A stop job for unit tor.service has finished Defined-By: systemd Support: Red Hat Customer Experience & Engagement - Red Hat Customer Portal
A stop job for unit tor.service has finished. The job identifier is 1797 and the job result is done. Apr 14 19:46:41 ip-172-26-6-114.ap-northeast-1.compute.internal systemd[1]: tor.service: Start request repeated too quickly. Apr 14 19:46:41 ip-172-26-6-114.ap-northeast-1.compute.internal systemd[1]: tor.service: Failed with result ‘exit-code’. Subject: Unit failed Defined-By: systemd Support: Red Hat Customer Experience & Engagement - Red Hat Customer Portal
The unit tor.service has entered the ‘failed’ state with result ‘exit-code’. Apr 14 19:46:41 ip-172-26-6-114.ap-northeast-1.compute.internal systemd[1]: Failed to start Anonymizing overlay network for TCP. Subject: A start job for unit tor.service has failed Defined-By: systemd Support: Red Hat Customer Experience & Engagement - Red Hat Customer Portal
A start job for unit tor.service has finished with a failure. The job identifier is 1797 and the job result is failed.
Whenever I got this problem in the past (doesn’t matter the OS) it had to do with the torrc config file. If I had to bet on it, I’d say it is some bad config or typo.
Kindly share your configuration here (censor any information you may consider relevant for you).
If torrc is fine, the next thing I’d check are directory and files permissions.
Whenever I got this problem in the past (doesn’t matter the OS) it had to do with the torrc config file. If I had to bet on it, I’d say it is some bad config or typo.
Kindly share your configuration here (censor any information you may consider relevant for you).
If torrc is fine, the next thing I’d check are directory and files permissions.
Whenever I got this problem in the past (doesn’t matter the OS) it had to do with the torrc config file. If I had to bet on it, I’d say it is some bad config or typo.
Kindly share your configuration here (censor any information you may consider relevant for you).
If torrc is fine, the next thing I’d check are directory and files permissions.
It may be that the ORPort is not open. Check if you have a firewall blocking the ORPort. Additionally, if you will post the contents of the following: cat /var/log/syslog | grep ‘Tor’
It may be that the ORPort is not open. Check if you have a firewall blocking the ORPort. Additionally, if you will post the contents of the following: cat /var/log/syslog | grep ‘Tor’
Make sure the user tor exists by checking your /etc/passwd file. If it doesn’t create a new one by: sudo useradd -d /var/lib/tor -s /bin/false -g tor
Then make sure tor has ownership of /var/lib/tor by: sudo ls -la /var/lib/tor
if not do: sudo chown -R tor:tor /var/lib/tor
Now finally add the following lines to /etc/tor/torrc:
User tor
Log notice syslog
DataDirectory /var/lib/tor
CookieAuthentication 1
Finally, let’s cleanly restart the systemd service:
sudo systemctl enable tor
sudo systemctl start tor
If everything works you should be able to check your relay by installing nyx, if it’s not already installed, and typing: nyx -i 127.0.0.1:[your_control_port]
If it doesn’t work now you should get a reading from: sudo cat /var/log/syslog | grep 'Tor'
Make sure the user tor exists by checking your /etc/passwd file. If it doesn’t create a new one by: sudo useradd -d /var/lib/tor -s /usr/sbin/nologin -g tor
Then make sure tor has ownership of /var/lib/tor by: sudo ls -la /var/lib/tor
if not do: sudo chown -R tor:tor /var/lib/tor
Now finally add the following lines to /etc/tor/torrc:
User tor
Log notice syslog
DataDirectory /var/lib/tor
CookieAuthentication 1
Finally, let’s cleanly restart the systemd service:
sudo systemctl enable tor
sudo systemctl start tor
If everything works you should be able to check your relay by installing nyx, if it’s not already installed, and typing: nyx -i 127.0.0.1:[your_control_port]
If it doesn’t work now you should get a reading from: sudo cat /var/log/syslog | grep 'Tor'