Bug 1290444 - Tor service fails to start
Tor service fails to start
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: tor (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jamie Nguyen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-10 09:32 EST by Lokesh Mandvekar
Modified: 2015-12-10 14:49 EST (History)
4 users (show)

See Also:
Fixed In Version: tor-0.2.7.5-6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-10 14:49:11 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Lokesh Mandvekar 2015-12-10 09:32:06 EST
Description of problem:
Tor fails to start

Version-Release number of selected component (if applicable):
tor-0.2.7.5-5.fc24.x86_64


How reproducible:
consistent

Steps to Reproduce:
1. systemctl (re)start tor


Actual results:
# systemctl start tor
Job for tor.service failed because the control process exited with error code. See "systemctl status tor.service" and "journalctl -xe" for details.

# systemctl status tor
● tor.service - Anonymizing overlay network for TCP
   Loaded: loaded (/usr/lib/systemd/system/tor.service; disabled; vendor preset: disabled)
   Active: activating (auto-restart) (Result: exit-code) since Thu 2015-12-10 08:30:22 CST; 654ms ago
  Process: 7208 ExecStart=/usr/bin/tor --runasdaemon 0 --defaults-torrc /usr/share/tor/defaults-torrc -f /etc/tor/torrc (code=exited, status=1/FAILURE)
  Process: 7204 ExecStartPre=/usr/bin/tor --runasdaemon 0 --defaults-torrc /usr/share/tor/defaults-torrc -f /etc/tor/torrc --verify-config (code=exited, status=0
 Main PID: 7208 (code=exited, status=1/FAILURE)

Dec 10 08:30:22 naruto systemd[1]: Failed to start Anonymizing overlay network for TCP.
Dec 10 08:30:22 naruto systemd[1]: tor.service: Unit entered failed state.
Dec 10 08:30:22 naruto systemd[1]: tor.service: Failed with result 'exit-code'.



Expected results:
Tor should start

Additional info:
Let me know if you need any.
Comment 1 Jamie Nguyen 2015-12-10 12:41:13 EST
Thanks for the bug report! I can reproduce:

# journalctl _SYSTEMD_UNIT=tor.service
...
... Couldn't open "/var/lib/tor/lock" for locking: Read-only file system.
...

In tor.service, these lines are present:
ReadOnlyDirectories=/
ReadWriteDirectories=/var/lib/tor
ReadWriteDirectories=/var/log/tor

If you remove those lines then Tor starts working again. This might actually be a bug in systemd.
Comment 2 Jamie Nguyen 2015-12-10 13:04:45 EST
It seems to work with this instead:

ReadOnlyDirectories=/var
ReadWriteDirectories=/var/lib/tor
ReadWriteDirectories=/var/log/tor

Will commit and build shortly.
Comment 3 Lokesh Mandvekar 2015-12-10 13:09:54 EST
(In reply to Jamie Nguyen from comment #2)
> It seems to work with this instead:
> 
> ReadOnlyDirectories=/var
> ReadWriteDirectories=/var/lib/tor
> ReadWriteDirectories=/var/log/tor
> 
> Will commit and build shortly.

That seems to work for me too. Thanks!
Comment 4 Jamie Nguyen 2015-12-10 13:48:02 EST
Built for rawhide: http://koji.fedoraproject.org/koji/buildinfo?buildID=704700
Comment 5 Lokesh Mandvekar 2015-12-10 14:49:11 EST
t(In reply to Jamie Nguyen from comment #4)
> Built for rawhide:
> http://koji.fedoraproject.org/koji/buildinfo?buildID=704700

works great for me, thanks again. I'm gonna CLOSED RAWHIDE.

Note You need to log in before you can comment on or make changes to this bug.