0

I'm running some experiments using the stem library where I change circuit paths fairly frequently. Every so often, I get a stream detached event and a Socks5Error: 'TTL Expired' in my Python script, and at the same time I get something like Jan 12 12:09:52.000 [notice] Tried for 120 seconds to get a connection to [scrubbed]:6667. Giving up. (waiting for controller) in my Tor log.

Does anyone have any idea why this might be occurring, and how I could either prevent it or even recover from it? I tried catching the exception, waiting, and then getting a new controller (with Controller.from_port) but the attempt to get a new controller throws a Socks5Error as well. Once I restart the script though, everything works fine until the error occurs agin.

Even if the error can't be prevented, I'd like the script to be able to keep going on it's own.

4
  • A few places actually block IRC (port 6667). Try using a different port, if you can. Commented Jan 13, 2014 at 7:46
  • If it's listed in their "rejected" ports list in the directory then that shouldn't be it, because I'm only using Tor exit nodes that say they allow exiting to *:6667 Commented Jan 13, 2014 at 17:39
  • That doesn't eliminate the possibility that you've hit a bad exit, one whose ISP blocks the port (and the exit node operator is unaware of this). Commented Jan 14, 2014 at 0:57
  • Maybe you can set SafeLogging 0 in your torrc, get the failing IP and test it using another Tor client or by other means. Commented Jan 20, 2014 at 21:06

0

You must log in to answer this question.

Browse other questions tagged .