1

I want to try multiple instances of tor. I tried different datadirectory and pidfile with --DataDirectory and --pidfile but only the first tor instance is listening. I also have different controlport and socksport. When I start the second instance it is closed shortly after I can see it in the list of processes. Here is my command line:

START /B tor.exe --RunAsDaemon 1 --DataDirectory Tor1 --ControlPort 9051 --SocksPort 9050 -f Tor1\torrc.1 --pidfile Tor1\tor1.pid
START /B tor.exe --RunAsDaemon 1 --DataDirectory Tor2 --ControlPort 9052 --SocksPort 9051 -f Tor2\torrc.2 --pidfile Tor2\tor2.pid
  • It's not clear what your actual question is - can you edit your post to clarify? – Richard Horrocks Oct 11 '15 at 8:38
  • @What is not clear? – Gigamegs Oct 11 '15 at 8:51
  • Apologies - I've re-read it - I think it's clear enough. – Richard Horrocks Oct 11 '15 at 13:35
2

You haven't included the console logs, but I'm suspecting the log for the second instance - the one that's dying - will be outputting an error to say that port 9051 is already in use. The first instance is using it as its ControlPort, so it can't then be used as the second instance's SocksPort.

Note that these port options can be included in the respective torrc files.

As an aside, RunAsDaemon is a no-op on Windows systems - you need to use the --service argument instead.

RunAsDaemon 0|1 If 1, Tor forks and daemonizes to the background. This option has no effect on Windows; instead you should use the --service command-line option. (Default: 0)

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.