You are not logged in.

#1 2014-07-18 23:59:02

MichaelRpdx
Member
From: Portland, Oregon
Registered: 2013-06-24
Posts: 16

tor not starting from systemctl [solved]

I've seen the previous message on the same topic, my symptoms don't match his.

I can start tor fine from the command line.  Attempting to start it with `systemctl start tor` does not work.  Non-coment lines from /etc/tor/torrc:

grep -v ^# torrc | grep -v ^$
User tor
SocksPort 0
Log notice file /var/log/tor/notices.log
Log debug file /var/log/tor/debug.log
RunAsDaemon 1
DataDirectory /var/lib/tor
ORPort 9001
Nickname SaunterNest
RelayBandwidthRate 100 KB  # Throttle traffic to 100KB/s (800Kbps)
RelayBandwidthBurst 200 KB # But allow bursts up to 200KB/s (1600Kbps)
ContactInfo Michael Tor <real@email.tld>
ExitPolicy reject *:* # no exits allowed
BridgeRelay 1

My tor.service file:

[Unit]
Description=Anonymizing Overlay Network
After=network.target

[Service]
User=root
Group=root
Type=simple
ExecStart=/usr/bin/tor -f /etc/tor/torrc
ExecReload=/usr/bin/kill -HUP $MAINPID
KillSignal=SIGINT
LimitNOFILE=65535
PrivateDevices=yes

[Install]
WantedBy=multi-user.target

After a start notices.log shows:

Jul 18 16:49:11.000 [notice] Tor 0.2.4.22 (git-2ee56e4c2c841a45) opening new log file.
Jul 18 16:49:11.000 [warn] Unrecognized format in mtbf history file. Skipping.
Jul 18 16:49:11.000 [notice] Parsing GEOIP IPv4 file /usr/share/tor/geoip.

And debug.log shows:

Jul 18 16:49:11.000 [notice] Tor 0.2.4.22 (git-2ee56e4c2c841a45) opening new log file.
Jul 18 16:49:11.000 [debug] tor_disable_debugger_attach(): Attemping to disable debugger attachment to Tor for unprivileged users.
Jul 18 16:49:11.000 [debug] tor_disable_debugger_attach(): Debugger attachment disabled for unprivileged users.
Jul 18 16:49:11.000 [info] tor_lockfile_lock(): Locking "/var/lib/tor/lock"
Jul 18 16:49:11.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 128.31.0.39:9131 (9695)
[snip of several similar lines]
Jul 18 16:49:11.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 154.35.32.5:80 (CF6D)
Jul 18 16:49:11.000 [info] entry_guards_parse_state(): Read 8.000000/8.000000 path bias for node REdacted
Jul 18 16:49:11.000 [info] entry_guards_parse_state(): Read 14.000000/14.000000 path bias for node REdacted
Jul 18 16:49:11.000 [info] entry_guards_parse_state(): Read 2.000000/2.000000 path use bias for node REdacted
Jul 18 16:49:11.000 [info] entry_guards_parse_state(): Read 4.000000/4.000000 path bias for node REdacted
Jul 18 16:49:11.000 [info] entry_guards_parse_state(): Read 1.000000/1.000000 path use bias for node REdacted
Jul 18 16:49:11.000 [info] entry_guards_parse_state(): Read 3.000000/4.000000 path bias for node REdacted
Jul 18 16:49:11.000 [info] or_state_load(): Loaded state from "/var/lib/tor/state"
Jul 18 16:49:11.000 [info] entry_guards_parse_state(): Read 8.000000/8.000000 path bias for node REdacted
Jul 18 16:49:11.000 [info] entry_guards_parse_state(): Read 14.000000/14.000000 path bias for node REdacted
Jul 18 16:49:11.000 [info] entry_guards_parse_state(): Read 2.000000/2.000000 path use bias for node REdacted
Jul 18 16:49:11.000 [info] entry_guards_parse_state(): Read 4.000000/4.000000 path bias for node REdacted
Jul 18 16:49:11.000 [info] entry_guards_parse_state(): Read 1.000000/1.000000 path use bias for node REdacted
Jul 18 16:49:11.000 [info] entry_guards_parse_state(): Read 3.000000/4.000000 path bias for node REdacted
Jul 18 16:49:11.000 [debug] circuit_build_times_disabled(): CircuitBuildTime learning is not disabled. Consensus=0, Config=0, AuthDir=0, StateFile=0
Jul 18 16:49:11.000 [debug] circuit_build_times_disabled(): CircuitBuildTime learning is not disabled. Consensus=0, Config=0, AuthDir=0, StateFile=0 
Jul 18 16:49:11.000 [info] circuit_build_times_parse_state(): Adding 0 timeouts. 
Jul 18 16:49:11.000 [debug] circuit_build_times_add_time(): Adding circuit build time 575 
[snip of several similar lines]
Jul 18 16:49:11.000 [debug] circuit_build_times_add_time(): Adding circuit build time 1275 
Jul 18 16:49:11.000 [info] circuit_build_times_parse_state(): Loaded 41/41 values from 20 lines in circuit time histogram 
Jul 18 16:49:11.000 [debug] circuit_build_times_disabled(): CircuitBuildTime learning is not disabled. Consensus=0, Config=0, AuthDir=0, StateFile=0 
Jul 18 16:49:11.000 [info] circuit_build_times_filter_timeouts(): We had 0 timeouts out of 41 build times, and filtered 0 above the max of 60000 
Jul 18 16:49:11.000 [warn] Unrecognized format in mtbf history file. Skipping. 
Jul 18 16:49:11.000 [info] cell_ewma_set_scale_factor(): Disabled cell_ewma algorithm because of value in Default value 
Jul 18 16:49:11.000 [notice] Parsing GEOIP IPv4 file /usr/share/tor/geoip.

It's as if tor is not daemonizing, but exiting without logging.
As stated, if I run from command line (root: /usr/bin/tor -f /etc/tor/torrc) no problem. 

Suggestions?

Last edited by MichaelRpdx (2014-07-19 07:28:08)


Be Appropriate && Follow Your Curiosity

Offline

#2 2014-07-19 06:54:48

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,716

Re: tor not starting from systemctl [solved]

Remove RunAsDaemon from your torrc, since systemd does the daemonizing for it. It's also in the Tor wiki page.


This silver ladybug at line 28...

Offline

#3 2014-07-19 07:14:08

MichaelRpdx
Member
From: Portland, Oregon
Registered: 2013-06-24
Posts: 16

Re: tor not starting from systemctl [solved]

lolilolicon wrote:

Remove RunAsDaemon from your torrc, since systemd does the daemonizing for it. It's also in the Tor wiki page.

Correct. I thought I'd toggled that in my testing.  Your reply and a restart shows I was wrong.

This is the solution.


Be Appropriate && Follow Your Curiosity

Offline

#4 2014-07-19 07:19:38

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,716

Re: tor not starting from systemctl [solved]

Alright, please remember to mark the thread as solved in the title.


This silver ladybug at line 28...

Offline

#5 2014-07-19 07:29:19

MichaelRpdx
Member
From: Portland, Oregon
Registered: 2013-06-24
Posts: 16

Re: tor not starting from systemctl [solved]

Thanks for the solved reminder.  I've also updated the wiki Troubleshooting section with a sub section emphasizing the two points of confict.


Be Appropriate && Follow Your Curiosity

Offline

Board footer

Powered by FluxBB