Bug 1290444

Summary: Tor service fails to start
Product: [Fedora] Fedora Reporter: Lokesh Mandvekar <lsm5>
Component: torAssignee: Marcel Haerry <mh>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: hmiranda, lmacken, pwouters, s
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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 19:49:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lokesh Mandvekar 2015-12-10 14:32:06 UTC
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 17:41:13 UTC
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 18:04:45 UTC
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 18:09:54 UTC
(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 18:48:02 UTC
Built for rawhide: http://koji.fedoraproject.org/koji/buildinfo?buildID=704700

Comment 5 Lokesh Mandvekar 2015-12-10 19:49:11 UTC
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.

Comment 6 Herberson Miranda 2020-05-17 19:27:44 UTC
i'm create directory /var/log/tor and worked for me!