[tor-bugs] #24577 [Core Tor/Tor]: Systemctl tor.service invalid - Tor does not restart on systemctl start tor command

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Dec 10 20:22:53 UTC 2017


#24577: Systemctl tor.service invalid - Tor does not restart on systemctl start tor
command
------------------------------+-------------------------------------------
     Reporter:  d3m0nkingx    |      Owner:  (none)
         Type:  defect        |     Status:  new
     Priority:  High          |  Milestone:  Tor: 0.3.1.x-final
    Component:  Core Tor/Tor  |    Version:  Tor: 0.3.1.9
     Severity:  Major         |   Keywords:  systemctl systemd tor.service
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+-------------------------------------------
 Please refer to: https://askubuntu.com/questions/882527/tor-process-will-
 not-start-automatically-on-ubuntu-16-04/903341

 When I looked at tor.service I find it's nothing more than a dummy file
 that only returns true if the tor.service is running and not the actual
 tor program itself:

 ----
 # This service is actually a systemd target,

 # but we are using a service since targets cannot be reloaded.

 [Unit]

 Description=Anonymizing overlay network for TCP (multi-instance-master)

 [Service]

 Type=oneshot

 !RemainAfterExit=yes

 !ExecStart=/bin/true

 !ExecReload=/bin/true

 ----
 So regardless if the TOR process is actually running or not, tor.service
 always returns TRUE. This is Invalid. and As a result running:  sudo
 systemctl start|stop tor  does nothing as you can see here:

 ● tor.service - Anonymizing overlay network for TCP (multi-instance-
 master)

 '''   Loaded: loaded (/lib/systemd/system/tor.service; enabled; vendor
 preset: enabled)'''

   Active: active (exited) since Sun 2017-12-10 14:24:42 EST; 9min ago

   Main PID: 17641 (code=exited, status=0/SUCCESS)

   CGroup: /system.slice/tor.service

 So for the moment the temporary fix is:

 Removing or renaming offending file /lib/systemd/system/tor.service and
 reloading the scripts w/ systemctl daemon-reload. because the actual and
 correct script to start tor is in /etc/init.d/tor

 After this modifcation the resulting output of sudo systemctl status tor:

 ● tor.service - LSB: Starts The Onion Router daemon processes

 '''   Loaded: loaded (/etc/init.d/tor; bad; vendor preset: enabled)'''

   Active: active (exited) since Sun 2017-12-10 14:24:42 EST; 26min ago

   Docs: !man:systemd-sysv-generator(8)

   Main PID: 17641 (code=exited, status=0/SUCCESS)

   CGroup: /system.slice/tor.service

   I believe the tor script in /etc/init.d/tor is incorrectly attempting to
 start/stop tor through tor.service as well.

 Please correct this as soon as possible thank you !

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24577>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list