Opened 3 years ago

Closed 3 years ago

#23314 closed defect (worksforme)

`make test-stem` starts up tor on 9050: Address already in use

Reported by: asn Owned by: atagar
Priority: Medium Milestone:
Component: Archived/Stem Version:
Severity: Normal Keywords: tor-tests stem
Cc: atagar Actual Points:
Parent ID: Points: 0.1
Reviewer: Sponsor:


I tried to run the little-t-tor stem tests using make test-stem. The unittests finished successfuly but all the integration tests failed because stem couldn't start up tor. It was trying to launch tor with a socksport on 9050 but it was failing because my system tor was already occupying that port:

                          INTEGRATION TESTS                           

Setting up a test instance...
  making test directory (/home/f/Computers/tor/stem/test/data)... done
  configuring logger (/home/f/Computers/tor/stem/test/data/log)... done
  writing torrc (/home/f/Computers/tor/stem/test/data/torrc)... done
    # configuration for stem integration tests
    DataDirectory /home/f/Computers/tor/stem/test/data
    DownloadExtraInfo 1
    Log notice stdout
    Log notice file /home/f/Computers/tor/stem/test/data/tor_log

Starting ./src/or/tor...

  Aug 24 14:20:28.564 [notice] Tor (git-40acdc357e08ab03) running on Linux with Libevent 2.0.21-stable, OpenSSL 1.0.1t, Zlib 1.2.8, Liblzma N/A, and Libzstd N/A.
  Aug 24 14:20:28.564 [notice] Tor can't help you if you use it wrong! Learn how to be safe at
  Aug 24 14:20:28.564 [notice] This version is not a stable Tor release. Expect more bugs than usual.
  Aug 24 14:20:28.564 [notice] Read configuration file "/home/f/Computers/tor/stem/test/data/torrc".
  Aug 24 14:20:28.567 [warn] Skipping obsolete configuration option 'SocksListenAddress'
  Aug 24 14:20:28.567 [notice] Opening Socks listener on
  Aug 24 14:20:28.567 [warn] Could not bind to Address already in use. Is Tor already running?
  Aug 24 14:20:28.567 [warn] Failed to parse/validate config: Failed to bind one of the listener ports.
  Aug 24 14:20:28.567 [err] Reading config failed--see warnings above.
  failed to start tor: Process terminated: Failed to bind one of the listener ports.

Shutting down tor... done

I think stem should start up tor on a different non-default port, or just use SocksPort auto.


Child Tickets

Change History (2)

comment:1 Changed 3 years ago by atagar

Hi asn, thanks for pointing this out! Actually, Stem is *trying* to use a non-standard port but tor's ignoring it...

"Aug 24 14:20:28.567 [warn] Skipping obsolete configuration option 'SocksListenAddress'"

Simple to fix.

comment:2 Changed 3 years ago by atagar

Resolution: worksforme
Status: newclosed

Oh wait, I did this months ago. You're simply out of date. ;)

Note: See TracTickets for help on using tickets.