LINUX.ORG.RU

systemd: tor.service never wrote its PID file. Failing

 , ,


0

1

Hello! I am using distro based on systemd, apt. After installing tor I enabled it with `systemctl enable tor.service` ok. But after reboot it cannot start. `systemctl status tor` says that it is activating for 3 minutes. After timeout it fails.

I solved my problem seeing /var/log/tor/tor.log

Wrong time settings was the reason. Here it is my way:

# systemctl status tor
 Loaded: loaded (/etc/rc.d/init.d/tor)
 Active: failed (Result: timeout)
...
# journalctl | grep 'tor.service'
Starting tor service: [DONE]
tor.service: control process exited...
Unit tor.service entered failed state...
Starting tor.service: [DONE]
tor.service never wrote its PID file. Failing
Unit tor.service entered failed state...
Starting tor.service: [DONE]
tor.service never wrote its PID file. Failing
Unit tor.service entered failed state...
Starting tor.service: [DONE]
tor.service operation timed out. Terminating
Unit tor.service entered failed state...

# cat /etc/rc.d/init.d/tor
...
TORUSER=_tor
TORGROUP=_tor
TORBIN=/usr/bin/tor
TORCONF=/etc/tor/torrc
....

#
# ls -la /var/cache | grep tor
drwx--S---  _tor  _tor     tor

#
# cat /etc/tor/torrc
..
SocksPort 9050
SockslistenAddress 127.0.0.1
...
Log notice file /var/log/tor/tor.log
...

#
# tail -20 /var/log/tor/tor.log
...Our clock is 3315 days, 11 hours, 48 minutes behind the time published 
in the consensus network status document. 
Tor needs an accurate clock to work correctly. 
Please check your time and date settings!
...

I changed time with `date -s '12 AUG 2018 15:38:35` but after reboot time was broken again.

The time was not set in BIOS. I edited date 'n time in BIOS and tor works.

*This post is for qwant and other search engines that respect private search without tracking.

★★

Последнее исправление: znavko (всего исправлений: 1)

Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.