I am trying to run a tor relay on Ubuntu from source.

I have done the following:

  • Installed stable version ( (as written in the documentations)
  • Used "apt source" to get the source code
  • Configured and compiled (using "configure" and "make")
  • I copied the result binary (tor file) to /usr/bin/ so it will be executed as a service
  • I than start tor service

In problem in the logs that after some time after I get in the log (always (10-20 minutes) after "[notice] Bootstrapped 100%: Done"):

[notice] Interrupt: we have stopped accepting new connections, and will shut down in 30 seconds. Interrupt again to exit now.

Here's the log file (It repeats over and over):

Nov 29 18:44:11.587 [notice] Read configuration file "/usr/share/tor/tor-service-defaults-torrc".
Nov 29 18:44:11.587 [notice] Read configuration file "/etc/tor/torrc".
Nov 29 18:44:11.589 [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.
Nov 29 18:44:11.590 [notice] Based on detected system memory, MaxMemInQueues is set to 743 MB. You can override this by setting MaxMemInQueues by hand.
Nov 29 18:44:11.590 [notice] Opening Socks listener on
Nov 29 18:44:11.590 [notice] Opening OR listener on
Nov 29 18:44:11.591 [notice] Opening Directory listener on
Nov 29 18:44:12.000 [notice] Configured to measure directory request statistics, but no GeoIP database found. Please specify a GeoIP database using the GeoIPFile option.
Nov 29 18:44:12.000 [notice] Your Tor server's identity key fingerprint is '*************'
Nov 29 18:44:12.000 [notice] Bootstrapped 0%: Starting
Nov 29 18:44:19.000 [notice] Starting with guard context "default"
Nov 29 18:44:19.000 [notice] Bootstrapped 80%: Connecting to the Tor network
Nov 29 18:44:19.000 [notice] Opening Socks listener on /var/run/tor/socks
Nov 29 18:44:19.000 [notice] Opening Control listener on /var/run/tor/control
Nov 29 18:44:19.000 [notice] Guessed our IP address as ****** (source: ***).
Nov 29 18:44:19.000 [notice] Self-testing indicates your ORPort is reachable from the outside. Excellent.
Nov 29 18:44:20.000 [notice] Bootstrapped 85%: Finishing handshake with first hop
Nov 29 18:44:20.000 [notice] Bootstrapped 90%: Establishing a Tor circuit
Nov 29 18:44:21.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working.
Nov 29 18:44:21.000 [notice] Bootstrapped 100%: Done
Nov 29 18:44:30.000 [notice] Self-testing indicates your DirPort is reachable from the outside. Excellent. Publishing server descriptor.
Nov 29 18:44:32.000 [notice] Performing bandwidth self-test...done.
Nov 29 18:49:11.000 [notice] Interrupt: we have stopped accepting new connections, and will shut down in 30 seconds. Interrupt again to exit now.
Nov 29 18:49:41.000 [notice] Clean shutdown finished. Exiting.

My torrc contains:

Log notice file /var/log/tor/notices.log
DataDirectory /var/lib/tor
ORPort 9001
Nickname *****
DirPort 9030
ExitPolicy reject *:* # for now...

I've been trying to solve this for quite some time, can anyone help me with that?

I should also point out that on "my" machine it worked great, when I place it on the machine that I actually want to make it a relay (machine that will stay on all the time), it does this problem.

And just to point out, I installed stable tor, downloaded the stable version sources, compiled and replaced the binary, that's it.


  • Please provide a more complete log and the contents of whatever Tor service file you're using to control the service, since according to your description you only installed the tor binary and nothing else. – cacahuatl Nov 30 '17 at 1:35
  • The log seems to indicate that something is asking Tor to shut down (e.g. sending service tor stop or similar). It's getting sent an interrupt signal and telling Tor to stop (and it would need to be sent from a privileged account). Is this running on a server or a desktop system? Is it possible that it is suspending after some time period of inactivity or similar? – cacahuatl Nov 30 '17 at 4:44
  • @canonizingironize Its a server system and it doesn't get suspended or anything. In fact after the service stops it just restarts again and the same happens... – TCS Nov 30 '17 at 5:02
  • From what you've described, it doesn't sound like the building a new tor binary from source should have any impact. you could of course ensure this is the case by moving back and testing with the original binary distributed with the tor package but it looks to be something else on the system. what does that system have that your local one doesnt? are they the same distro and version? does info level logging give any further insight? – cacahuatl Nov 30 '17 at 5:11

The problem was quite simple. I am using Ubuntu but I built it using the make while there are different build instructions for Debian.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.