# Tor No Longer Starting

## necron

Anybody have any ideas what I'm doing wrong?

Starting with the minimal config file that comes with the ebuild gives these results:

```
 # /etc/init.d/tor start

 * Caching service dependencies ...                                       [ ok ]

 * Starting tor ...

 * start-stop-daemon: failed to start `/usr/bin/tor'

 * Failed to start tor                                                    [ !! ]

 * ERROR: tor failed to start

```

```
 tor

Aug 01 21:38:24.099 [notice] Tor 0.3.0.8 (git-802d30d9b71a6d54) running on Linux with Libevent 2.1.8-stable, OpenSSL 1.0.2k and Zlib 1.2.11.

Aug 01 21:38:24.100 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning

Aug 01 21:38:24.100 [notice] Read configuration file "/etc/tor/torrc".

Aug 01 21:38:24.106 [notice] Opening Socks listener on 127.0.0.1:9050
```

Using a custom config file gives me the following:

```
 * Starting tor ...

Aug 01 21:45:39.000 [warn] Can't log to stdout with RunAsDaemon set; skipping stdout

 * start-stop-daemon: failed to start `/usr/bin/tor'

 * Failed to start tor                                                    [ !! ]

 * ERROR: tor failed to start

```

```
 tor

Aug 01 21:44:44.881 [notice] Tor 0.3.0.8 (git-802d30d9b71a6d54) running on Linux with Libevent 2.1.8-stable, OpenSSL 1.0.2k and Zlib 1.2.11.

Aug 01 21:44:44.881 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning

Aug 01 21:44:44.881 [notice] Read configuration file "/etc/tor/torrc".

Aug 01 21:44:44.885 [notice] Your ContactInfo config option is not set. Please consider setting it, so we can contact you if your server is misconfigured or something else goes wrong.

Aug 01 21:44:44.885 [notice] Based on detected system memory, MaxMemInQueues is set to 2878 MB. You can override this by setting MaxMemInQueues by hand.

Aug 01 21:44:44.885 [warn] Tor is running as an exit relay. If you did not want this behavior, please set the ExitRelay option to 0. If you do want to run an exit Relay, please set the ExitRelay option to 1 to disable this warning, and for forward compatibility.

Aug 01 21:44:44.885 [notice] Opening Socks listener on 127.0.0.1:9050

Aug 01 21:44:44.885 [notice] Opening Control listener on 127.0.0.1:9051

Aug 01 21:44:44.886 [notice] Opening OR listener on 0.0.0.0:9001

Aug 01 21:44:44.886 [notice] Opening Directory listener on 0.0.0.0:9030

Aug 01 21:44:44.000 [warn] Error while parsing configuration: Excess data after quoted string

Aug 01 21:44:44.000 [err] set_options(): Bug: Acting on config options left us in a broken state. Dying. (on Tor 0.3.0.8 802d30d9b71a6d54)
```

----------

## toralf

```
Aug 01 21:44:44.000 [warn] Error while parsing configuration: Excess data after quoted string 
```

Overlooked this message ?  :Wink: 

Try this too: 

```
/etc/init.d/tor check_config
```

----------

## necron

I get the start-stop-daemon error whether or not I'm using a torrc file that generates those messages about parsing.  And checkconfig doesn't do anything.  Downgrading tor and booting into a different kernel doesn't seem to make a difference either.

----------

## freke

You could try enable debug-logging in the torrc.

Same version works fine here:

```
Aug 02 17:11:59 [Tor] Tor 0.3.0.8 (git-802d30d9b71a6d54) running on Linux with Libevent 2.1.8-stable, OpenSSL 1.0.2k and Zlib 1.2.11._

Aug 02 17:11:59 [Tor] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning_

Aug 02 17:11:59 [Tor] Read configuration file "/etc/tor/torrc"._

Aug 02 17:11:59 [Tor] Your ContactInfo config option is not set. Please consider setting it, so we can contact you if your server is misconfigured or something else goes wrong._

Aug 02 17:11:59 [Tor] Based on detected system memory, MaxMemInQueues is set to 2941 MB. You can override this by setting MaxMemInQueues by hand._

Aug 02 17:11:59 [Tor] Opening Socks listener on 127.0.0.1:9050_

Aug 02 17:11:59 [Tor] Opening Control listener on 127.0.0.1:9051_

Aug 02 17:11:59 [Tor] Opening OR listener on 0.0.0.0:2001_

Aug 02 17:11:59 [Tor] Opening Directory listener on 0.0.0.0:2030_

Aug 02 17:11:59 [Tor] Parsing GEOIP IPv4 file /usr/share/tor/geoip._

Aug 02 17:12:00 [Tor] Parsing GEOIP IPv6 file /usr/share/tor/geoip6._

Aug 02 17:12:00 [Tor] Configured to measure statistics. Look for the *-stats files that will first be written to the data directory in 24 hours from now._

Aug 02 17:12:02 [Tor] Your Tor server's identity key fingerprint is 'torvlhdk 2820B118C141F8008F857EA7597033D6DE6F83C3'_

Aug 02 17:12:02 [Tor] Bootstrapped 0%: Starting_

Aug 02 17:12:43 [Tor] Starting with guard context "default"_

Aug 02 17:12:43 [Tor] Bootstrapped 80%: Connecting to the Tor network_

Aug 02 17:12:45 [Tor] Bootstrapped 85%: Finishing handshake with first hop_

Aug 02 17:12:45 [Tor] Bootstrapped 90%: Establishing a Tor circuit_

Aug 02 17:12:45 [Tor] Tor has successfully opened a circuit. Looks like client functionality is working._

Aug 02 17:12:45 [Tor] Bootstrapped 100%: Done_

Aug 02 17:12:45 [Tor] Now checking whether ORPort 90.184.239.156:2001 and DirPort 90.184.239.156:2030 are reachable... (this may take up to 20 minutes -- look for log messages indicating success)_

Aug 02 17:12:45 [Tor] Self-testing indicates your ORPort is reachable from the outside. Excellent._

Aug 02 17:12:46 [Tor] Self-testing indicates your DirPort is reachable from the outside. Excellent. Publishing server descriptor._

Aug 02 17:12:48 [Tor] Performing bandwidth self-test...done._

Aug 02 17:14:28 [Tor] Interrupt: we have stopped accepting new connections, and will shut down in 30 seconds. Interrupt again to exit now._

Aug 02 17:14:32 [Tor] SIGINT received a second time; exiting now._
```

----------

## necron

Here is the result of the debug messages from issuing 'tor' and '/etc/init.d/tor start' in that order:

```
Aug 02 13:14:57.000 [notice] Tor 0.3.0.8 (git-802d30d9b71a6d54) opening new log file.

Aug 02 13:14:57.832 [notice] Tor 0.3.0.8 (git-802d30d9b71a6d54) running on Linux with Libevent 2.1.8-stable, OpenSSL 1.0.2k and Zlib 1.2.11.

Aug 02 13:14:57.832 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning

Aug 02 13:14:57.832 [notice] Read configuration file "/etc/tor/torrc".

Aug 02 13:14:57.836 [notice] Your ContactInfo config option is not set. Please consider setting it, so we can contact you if your server is misconfigured or something else goes wrong.

Aug 02 13:14:57.836 [notice] Based on detected system memory, MaxMemInQueues is set to 2878 MB. You can override this by setting MaxMemInQueues by hand.

Aug 02 13:14:57.837 [notice] Opening Socks listener on 127.0.0.1:9050

Aug 02 13:14:57.837 [notice] Opening Control listener on 127.0.0.1:9051

Aug 02 13:14:57.837 [notice] Opening OR listener on 0.0.0.0:9001

Aug 02 13:14:57.837 [notice] Opening Directory listener on 0.0.0.0:9030

Aug 02 13:14:57.000 [warn] Your log may contain sensitive information - you're logging more than "notice". Don't log unless it serves an important reason. Overwrite the log afterwards.

Aug 02 13:14:57.000 [info] options_act_reversible(): Recomputed OOS thresholds: ConnLimit 1000, ConnLimit_ 4064, ConnLimit_high_thresh 4000, ConnLimit_low_thresh 3048

Aug 02 13:14:57.000 [debug] tor_disable_debugger_attach(): Attemping to disable debugger attachment to Tor for unprivileged users.

Aug 02 13:14:57.000 [debug] tor_disable_debugger_attach(): Debugger attachment disabled for unprivileged users.

Aug 02 13:14:57.000 [info] tor_lockfile_lock(): Locking "/var/lib/tor/data/lock"

Aug 02 13:14:57.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 128.31.0.39:9131 (9695)

Aug 02 13:14:57.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 86.59.21.38:80 (847B)

Aug 02 13:14:57.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 194.109.206.212:80 (7EA6)

Aug 02 13:14:57.000 [debug] parse_dir_authority_line(): Trusted 16 dirserver at 37.218.247.217:80 (1D8F)

Aug 02 13:14:57.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 131.188.40.189:80 (F204)

Aug 02 13:14:57.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 193.23.244.244:80 (7BE6)

Aug 02 13:14:57.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 171.25.193.9:443 (BD6A)

Aug 02 13:14:57.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 154.35.175.225:80 (CF6D)

Aug 02 13:14:57.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 199.254.238.52:80 (74A9)

Aug 02 13:14:57.000 [debug] file_status(): stat()ing /var/lib/tor/data/state

Aug 02 13:14:57.000 [warn] Error while parsing configuration: Excess data after quoted string

Aug 02 13:14:57.000 [err] set_options(): Bug: Acting on config options left us in a broken state. Dying. (on Tor 0.3.0.8 802d30d9b71a6d54)

```

```

Aug 02 13:15:10.000 [notice] Tor 0.3.0.8 (git-802d30d9b71a6d54) opening log file.

Aug 02 13:15:10.000 [warn] Can't log to stdout with RunAsDaemon set; skipping stdout

Aug 02 13:15:10.000 [warn] Can't log to stdout with RunAsDaemon set; skipping stdout

Aug 02 13:15:10.000 [warn] Your log may contain sensitive information - you're logging more than "notice". Don't log unless it serves an important reason. Overwrite the log afterwards.

Aug 02 13:15:10.000 [info] options_act_reversible(): Recomputed OOS thresholds: ConnLimit 1000, ConnLimit_ 29968, ConnLimit_high_thresh 29904, ConnLimit_low_thresh 22476

Aug 02 13:15:10.000 [debug] tor_disable_debugger_attach(): Attemping to disable debugger attachment to Tor for unprivileged users.

Aug 02 13:15:10.000 [debug] tor_disable_debugger_attach(): Debugger attachment disabled for unprivileged users.

Aug 02 13:15:10.000 [info] tor_lockfile_lock(): Locking "/var/lib/tor/data/lock"

Aug 02 13:15:10.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 128.31.0.39:9131 (9695)

Aug 02 13:15:10.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 86.59.21.38:80 (847B)

Aug 02 13:15:10.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 194.109.206.212:80 (7EA6)

Aug 02 13:15:10.000 [debug] parse_dir_authority_line(): Trusted 16 dirserver at 37.218.247.217:80 (1D8F)

Aug 02 13:15:10.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 131.188.40.189:80 (F204)

Aug 02 13:15:10.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 193.23.244.244:80 (7BE6)

Aug 02 13:15:10.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 171.25.193.9:443 (BD6A)

Aug 02 13:15:10.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 154.35.175.225:80 (CF6D)

Aug 02 13:15:10.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 199.254.238.52:80 (74A9)

Aug 02 13:15:10.000 [debug] file_status(): stat()ing /var/lib/tor/data/state

Aug 02 13:15:10.000 [warn] Error while parsing configuration: Excess data after quoted string

Aug 02 13:15:10.000 [err] set_options(): Bug: Acting on config options left us in a broken state. Dying. (on Tor 0.3.0.8 802d30d9b71a6d54)

```

And to reiterate, I know that Tor is complaining about the torrc file being screwed up but switching it out with the minimal torrc still causes Tor to die.

----------

## necron

Here's the debug output with a minimal torrc (without the complaints about parsing the file written to stdout).  It still seems to complain about being unable to parse the torrc file, in the debug output.

```
tor
```

```
Aug 02 13:31:21.000 [notice] Tor 0.3.0.8 (git-802d30d9b71a6d54) opening log file.

Aug 02 13:31:21.280 [notice] Tor 0.3.0.8 (git-802d30d9b71a6d54) running on Linux with Libevent 2.1.8-stable, OpenSSL 1.0.2k and Zlib 1.2.11.

Aug 02 13:31:21.280 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning

Aug 02 13:31:21.280 [notice] Read configuration file "/etc/tor/torrc".

Aug 02 13:31:21.286 [notice] Opening Socks listener on 127.0.0.1:9050

Aug 02 13:31:21.000 [warn] Your log may contain sensitive information - you're logging more than "notice". Don't log unless it serves an important reason. Overwrite the log afterwards.

Aug 02 13:31:21.000 [info] options_act_reversible(): Recomputed OOS thresholds: ConnLimit 1000, ConnLimit_ 4064, ConnLimit_high_thresh 4000, ConnLimit_low_thresh 3048

Aug 02 13:31:21.000 [debug] tor_disable_debugger_attach(): Attemping to disable debugger attachment to Tor for unprivileged users.

Aug 02 13:31:21.000 [debug] tor_disable_debugger_attach(): Debugger attachment disabled for unprivileged users.

Aug 02 13:31:21.000 [info] tor_lockfile_lock(): Locking "/var/lib/tor/data/lock"

Aug 02 13:31:21.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 128.31.0.39:9131 (9695)

Aug 02 13:31:21.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 86.59.21.38:80 (847B)

Aug 02 13:31:21.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 194.109.206.212:80 (7EA6)

Aug 02 13:31:21.000 [debug] parse_dir_authority_line(): Trusted 16 dirserver at 37.218.247.217:80 (1D8F)

Aug 02 13:31:21.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 131.188.40.189:80 (F204)

Aug 02 13:31:21.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 193.23.244.244:80 (7BE6)

Aug 02 13:31:21.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 171.25.193.9:443 (BD6A)

Aug 02 13:31:21.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 154.35.175.225:80 (CF6D)

Aug 02 13:31:21.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 199.254.238.52:80 (74A9)

Aug 02 13:31:21.000 [debug] file_status(): stat()ing /var/lib/tor/data/state

Aug 02 13:31:21.000 [warn] Error while parsing configuration: Excess data after quoted string

Aug 02 13:31:21.000 [err] set_options(): Bug: Acting on config options left us in a broken state. Dying. (on Tor 0.3.0.8 802d30d9b71a6d54)
```

```
/etc/init.d/tor start
```

```
Aug 02 13:34:20.000 [notice] Tor 0.3.0.8 (git-802d30d9b71a6d54) opening log file.

Aug 02 13:34:20.000 [warn] Your log may contain sensitive information - you're logging more than "notice". Don't log unless it serves an important reason. Overwrite the log afterwards.

Aug 02 13:34:20.000 [info] options_act_reversible(): Recomputed OOS thresholds: ConnLimit 1000, ConnLimit_ 29968, ConnLimit_high_thresh 29904, ConnLimit_low_thresh 22476

Aug 02 13:34:20.000 [debug] tor_disable_debugger_attach(): Attemping to disable debugger attachment to Tor for unprivileged users.

Aug 02 13:34:20.000 [debug] tor_disable_debugger_attach(): Debugger attachment disabled for unprivileged users.

Aug 02 13:34:20.000 [info] tor_lockfile_lock(): Locking "/var/lib/tor/data/lock"

Aug 02 13:34:20.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 128.31.0.39:9131 (9695)

Aug 02 13:34:20.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 86.59.21.38:80 (847B)

Aug 02 13:34:20.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 194.109.206.212:80 (7EA6)

Aug 02 13:34:20.000 [debug] parse_dir_authority_line(): Trusted 16 dirserver at 37.218.247.217:80 (1D8F)

Aug 02 13:34:20.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 131.188.40.189:80 (F204)

Aug 02 13:34:20.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 193.23.244.244:80 (7BE6)

Aug 02 13:34:20.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 171.25.193.9:443 (BD6A)

Aug 02 13:34:20.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 154.35.175.225:80 (CF6D)

Aug 02 13:34:20.000 [debug] parse_dir_authority_line(): Trusted 100 dirserver at 199.254.238.52:80 (74A9)

Aug 02 13:34:20.000 [debug] file_status(): stat()ing /var/lib/tor/data/state

Aug 02 13:34:20.000 [warn] Error while parsing configuration: Excess data after quoted string

Aug 02 13:34:20.000 [err] set_options(): Bug: Acting on config options left us in a broken state. Dying. (on Tor 0.3.0.8 802d30d9b71a6d54)
```

torrc

```
#

# Minimal torrc so tor will work out of the box

#

User tor

PIDFile /var/run/tor/tor.pid

Log notice syslog

Log debug file /var/log/tor/debug.log

DataDirectory /var/lib/tor/data

```

----------

## freke

You've tried recreating the torrc-file(s)?

As toralf pointed out this

```
Aug 02 13:31:21.000 [warn] Error while parsing configuration: Excess data after quoted string
```

doesn't look good and might be the cause of this

```
Aug 02 13:31:21.000 [err] set_options(): Bug: Acting on config options left us in a broken state. Dying. (on Tor 0.3.0.8 802d30d9b71a6d54)
```

What happens if you use the provided torrc.sample? (maybe with Log debug set to get more output)

----------

## ct85711

One thing you should check and be careful on, is the non-shown characters that may be at the end of the lines (like spaces and tabs and others).

This can also be a factor on the editor you are using to save the file, as it may be be adding (CR and LF at end of the lines or something).  I know I tested the default/basic file and tor started up fine, even with the debug statement in it; but I used vim and not some GUI text/word editor.

----------

## necron

I don't think that I've ever used anything except for Vim to edit config files.  Vim is too damned good.

 *freke wrote:*   

> 
> 
> What happens if you use the provided torrc.sample? (maybe with Log debug set to get more output)

 

Exact same thing.

----------

## ct85711

A couple things to help narrow it down, is to first check the /etc/tor/torrc-defaults file and make sure there isn't anything strange in that file.

The other thing you could do, is when you try running tor, is try running it yourself (instead of starting it's service) and use the -f option and specify the config file.

My thinking on this is that the service is possibly reading a different config file than we are expecting. By manually specifying the config file, we force it to use a specific one.

https://www.torproject.org/docs/tor-manual.html.en

According to tor's manual online, it looks for a config file in the config for the system (i.e. /etc/tor/) and also in the user's home directory.

It also references the torrc-defaults file for option that wasn't set in the config file.

----------

## necron

The logs seem to indicate that it's reading /etc/tor/torrc.  I do not have any /etc/tor/torrc-defaults file though. 

```
ls

torrc  torrcold  torrc.sample  torsocks.conf
```

As for running tor without its service, do you mean just calling it from the command line instead of its initscript?  Because I've tried both, to the exact same effect.

----------

## necron

Sorry to bump an old thread, but the same issue has arisen again with Tor-0.3.5.8.  No idea how it got resolved last time (I think that it was solved through an update).

I've checked out the config files in vim (which is the only text editor that I really use) and there are no hidden carriage returns or weird characters lurking in the files that I can find.  I've tried starting Tor up with the torrc file that comes with the package, I've tried a minimal config and I've tried running Tor without calling it through rc-service or the init script.  Is there maybe some application or library that Tor depends on to parse the config files that's gotten screwed up?  There don't seem to be any bug reports that I can find that sound like my issue, so I'm inclined to think that it's just me misconfiguring my system somehow.  Using the checkconfig option with the init script returns nothing.

```
# /etc/init.d/tor start
```

```
Apr 26 14:04:52.000 [debug] file_status(): stat()ing /var/lib/tor/data/state

Apr 26 14:04:52.000 [warn] Error while parsing configuration: Excess data after quoted string

Apr 26 14:04:52.000 [err] set_options(): Bug: Acting on config options left us in a broken state. Dying. (on Tor 0.3.5.8 )

Apr 26 14:04:52.000 [err] Reading config failed--see warnings above.

Apr 26 14:04:52.000 [debug] channel_tls_free_all(): Shutting down TLS channels...

Apr 26 14:04:52.000 [debug] channel_tls_free_all(): Done shutting down TLS channels

Apr 26 14:04:52.000 [debug] channel_free_all(): Shutting down channels...

Apr 26 14:04:52.000 [debug] channel_free_all(): Freeing channel_identity_map

Apr 26 14:04:52.000 [debug] channel_free_all(): Freeing channel_gid_map

Apr 26 14:04:52.000 [debug] channel_free_all(): Done cleaning up after channels

Apr 26 14:04:52.000 [debug] connection_free_minimal(): closing fd 7.

Apr 26 14:04:52.000 [debug] scheduler_free_all(): Shutting down scheduler

Apr 26 14:04:52.000 [info] tor_lockfile_unlock(): Unlocking "/var/lib/tor/data/lock"

```

/etc/torrc

```
## Configuration file for a typical Tor user

## Last updated 16 July 2009 for Tor 0.2.2.1-alpha.

## (May or may not work for much older or much newer versions of Tor.)

##

## Lines that begin with "## " try to explain what's going on. Lines

## that begin with just "#" are disabled commands: you can enable them

## by removing the "#" symbol.

##

## See 'man tor', or https://www.torproject.org/tor-manual.html,

## for more options you can use in this file.

##

## Tor will look for this file in various places based on your platform:

## https://wiki.torproject.org/noreply/TheOnionRouter/TorFAQ#torrc

## Default username and group the server will run as

User tor

PIDFile /var/run/tor/tor.pid

## Replace this with "SocksPort 0" if you plan to run Tor only as a

## relay, and not make any local application connections yourself.

SocksPort 9050 # what port to open for local application connections

#SocksListenAddress 127.0.0.1 # accept connections only from localhost

#SocksListenAddress 192.168.0.1:9100 # listen on this IP:port also

## Entry policies to allow/deny SOCKS requests based on IP address.

## First entry that matches wins. If no SocksPolicy is set, we accept

## all (and only) requests from SocksListenAddress.

#SocksPolicy accept 192.168.0.0/16

#SocksPolicy reject *

## Logs go to stdout at level "notice" unless redirected by something

## else, like one of the below lines. You can have as many Log lines as

## you want.

##

## We advise using "notice" in most cases, since anything more verbose

## may provide sensitive information to an attacker who obtains the logs.

##

## Send all messages of level 'notice' or higher to /var/lib/log/tor/notices.log

#Log notice file /var/lib/log/tor/notices.log

## Send every possible message to /var/lib/log/tor/debug.log

#Log debug file /var/lib/log/tor/debug.log

## Use the system log instead of Tor's logfiles

#Log notice syslog

## To send all messages to stderr:

#Log debug stderr

#Log notice syslog

Log debug file /var/log/tor/debug.log

Log notice stdout

Log notice file /var/log/tor/tor.log

Log warn file /var/log/tor/tor.log

## Uncomment this to start the process in the background... or use

## --runasdaemon 1 on the command line. This is ignored on Windows;

## see the FAQ entry if you want Tor to run as an NT service.

#RunAsDaemon 1

## The directory for keeping all the keys/etc. By default, we store

## things in $HOME/.tor on Unix, and in Application Data\tor on Windows.

#DataDirectory /var/lib/lib/tor

DataDirectory   /var/lib/tor/data

## The port on which Tor will listen for local connections from Tor

## controller applications, as documented in control-spec.txt.

ControlPort 9051

## If you enable the controlport, be sure to enable one of these

## authentication methods, to prevent attackers from accessing it.

HashedControlPassword 16:962453E8EB1AC8D7606AB3E761F55770A0E4EAC088F1BF77611DD090D3 

#CookieAuthentication 1

############### This section is just for location-hidden services ###

## Once you have configured a hidden service, you can look at the

## contents of the file ".../hidden_service/hostname" for the address

## to tell people.

##

## HiddenServicePort x y:z says to redirect requests on port x to the

## address y:z.

#HiddenServiceDir /var/lib/lib/tor/hidden_service/

#HiddenServicePort 80 127.0.0.1:80

#HiddenServiceDir /var/lib/lib/tor/other_hidden_service/

#HiddenServicePort 80 127.0.0.1:80

#HiddenServicePort 22 127.0.0.1:22

################ This section is just for relays #####################

#

## See https://www.torproject.org/docs/tor-doc-relay for details.

## Required: what port to advertise for incoming Tor connections.

ORPort 9001

## If you want to listen on a port other than the one advertised

## in ORPort (e.g. to advertise 443 but bind to 9090), uncomment the

## line below too. You'll need to do ipchains or other port forwarding

## yourself to make this work.

#ORListenAddress 0.0.0.0:9090

## A handle for your relay, so people don't have to refer to it by key.

Nickname sinepreggin

## The IP address or full DNS name for your relay. Leave commented out

## and Tor will guess.

#Address noname.example.com

## Define these to limit how much relayed traffic you will allow. Your

## own traffic is still unthrottled. Note that RelayBandwidthRate must

## be at least 20 KB.

#RelayBandwidthRate 100 KB  # Throttle traffic to 100KB/s (800Kbps)

#RelayBandwidthBurst 200 KB # But allow bursts up to 200KB/s (1600Kbps)

## Use these to restrict the maximum traffic per day, week, or month.

## Note that this threshold applies to sent _and_ to received bytes,

## not to their sum: Setting "4 GB" may allow up to 8 GB

## total before hibernating.

##

## Set a maximum of 4 gigabytes each way per period.

#AccountingMax 4 GB

## Each period starts daily at midnight (AccountingMax is per day)

#AccountingStart day 00:00

## Each period starts on the 3rd of the month at 15:00 (AccountingMax

## is per month)

#AccountingStart month 3 15:00

## Contact info to be published in the directory, so we can contact you

## if your relay is misconfigured or something else goes wrong. Google

## indexes this, so spammers might also collect it.

#ContactInfo Random Person <nobody AT example dot com>

## You might also include your PGP or GPG fingerprint if you have one:

#ContactInfo 1234D/FFFFFFFF Random Person <nobody AT example dot com>

## Uncomment this to mirror directory information for others. Please do

## if you have enough bandwidth.

DirPort 9030 # what port to advertise for directory connections

## If you want to listen on a port other than the one advertised

## in DirPort (e.g. to advertise 80 but bind to 9091), uncomment the line

## below too. You'll need to do ipchains or other port forwarding yourself

## to make this work.

#DirListenAddress 0.0.0.0:9091

## Uncomment to return an arbitrary blob of html on your DirPort. Now you

## can explain what Tor is if anybody wonders why your IP address is

## contacting them. See contrib/tor-exit-notice.html in Tor's source

## distribution for a sample.

#DirPortFrontPage /etc/tor/tor-exit-notice.html

## Uncomment this if you run more than one Tor relay, and add the identity

## key fingerprint of each Tor relay you control, even if they're on

## different networks. You declare it here so Tor clients can avoid

## using more than one of your relays in a single circuit. See

## https://wiki.torproject.org/noreply/TheOnionRouter/TorFAQ#MultipleServers

#MyFamily $keyid,$keyid,...

## A comma-separated list of exit policies. They're considered first

## to last, and the first match wins. If you want to _replace_

## the default exit policy, end this with either a reject *:* or an

## accept *:*. Otherwise, you're _augmenting_ (prepending to) the

## default exit policy. Leave commented to just use the default, which is

## described in the man page or at

## https://www.torproject.org/documentation.html

##

## Look at https://www.torproject.org/faq-abuse.html#TypicalAbuses

## for issues you might encounter if you use the default exit policy.

##

## If certain IPs and ports are blocked externally, e.g. by your firewall,

## you should update your exit policy to reflect this -- otherwise Tor

## users will be told that those destinations are down.

##

#ExitPolicy accept *:6660-6667,reject *:* # allow irc ports but no more

#ExitPolicy accept *:119 # accept nntp as well as default exit policy

#ExitPolicy reject *:* # no exits allowed

#

## Bridge relays (or "bridges") are Tor relays that aren't listed in the

## main directory. Since there is no complete public list of them, even if an

## ISP is filtering connections to all the known Tor relays, they probably

## won't be able to block all the bridges. Also, websites won't treat you

## differently because they won't know you're running Tor. If you can

## be a real relay, please do; but if not, be a bridge!

#BridgeRelay 1

ExitPolicy reject *:*

ExitPolicy   reject *:25

ExitPolicy      reject *:119

ExitPolicy      reject *:135-139

ExitPolicy      reject *:445

ExitPolicy      reject *:445

ExitPolicy      reject *:563

ExitPolicy      reject *:1214

ExitPolicy      reject *:4661-4666

ExitPolicy      reject *:6346-6429

ExitPolicy      reject *:6699

ExitPolicy      reject *:6881-6999

ExitPolicy   accept *:80, accept *:443, accept *:110, accept *:143, accept *:993, accept *:995, reject *:*

TestSocks 1

```

----------

## necron

Just tried running tor-3.5.8 after deleting /etc/tor/torrc.  Same error in spite of the fact that tor is not reading anything that I've edited:

```
# tor

May 14 18:17:48.200 [notice] Tor 0.3.5.8 running on Linux with Libevent 2.1.8-stable, OpenSSL 1.0.2r, Zlib 1.2.11, Liblzma N/A, and Libzstd N/A.

May 14 18:17:48.200 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning

May 14 18:17:48.200 [notice] Configuration file "/etc/tor/torrc" not present, using reasonable defaults.

May 14 18:17:48.203 [notice] Opening Socks listener on 127.0.0.1:9050

May 14 18:17:48.203 [notice] Opened Socks listener on 127.0.0.1:9050

May 14 18:17:48.000 [warn] Error while parsing configuration: Excess data after quoted string

May 14 18:17:48.000 [err] set_options(): Bug: Acting on config options left us in a broken state. Dying. (on Tor 0.3.5.8 )

May 14 18:17:48.000 [err] Reading config failed--see warnings above.

```

----------

