[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #14419 [Stem]: Suggestion to Kill Tor Process before Starting



#14419: Suggestion to Kill Tor Process before Starting
------------------------------+-------------------------------
     Reporter:  icodemachine  |      Owner:  atagar
         Type:  defect        |     Status:  needs_information
     Priority:  minor         |  Milestone:
    Component:  Stem          |    Version:
   Resolution:                |   Keywords:  controller, easy
Actual Points:                |  Parent ID:
       Points:                |
------------------------------+-------------------------------
Changes (by atagar):

 * status:  new => needs_information


Comment:

 Hi icodemachine, I just tried to add an integ test for this but seems the
 tor process dies on its own...

 {{{
     # Set the same SocksPort and ControlPort, this should fail with...
     #
     #   [warn] Failed to parse/validate config: Failed to bind one of the
 listener ports.
     #   [err] Reading config failed--see warnings above.

     def init_line_handler(line):
       print line

     runner = test.runner.get_runner()
     tor_process = stem.process.launch_tor_with_config(
       tor_cmd = runner.get_tor_command(),
       config = {
         'SocksPort': '2777',
         'ControlPort': '2777',
         'DataDirectory': self.data_directory,
       },
       init_msg_handler = init_line_handler,
     )
 }}}

 ... causes the following tor output which seems to be what you're
 hitting...

 {{{
 Feb 01 13:15:52.723 [notice] Tor v0.2.6.2-alpha-dev (git-518b0b3c5fefba24)
 running on Linux with Libevent 2.0.16-stable, OpenSSL 1.0.1 and Zlib
 1.2.3.4.
 Feb 01 13:15:52.723 [notice] Tor can't help you if you use it wrong! Learn
 how to be safe at https://www.torproject.org/download/download#warning
 Feb 01 13:15:52.724 [notice] This version is not a stable Tor release.
 Expect more bugs than usual.
 Feb 01 13:15:52.724 [notice] Read configuration file "/tmp/torrc-lUvE6k".
 Feb 01 13:15:52.745 [warn] ControlPort is open, but no authentication
 method has been configured.  This means that any program on your computer
 can reconfigure your Tor.  That's bad!  You should upgrade your Tor
 controller as soon as possible.
 Feb 01 13:15:52.748 [notice] Opening Socks listener on 127.0.0.1:2777
 Feb 01 13:15:52.748 [notice] Opening Control listener on 127.0.0.1:2777
 Feb 01 13:15:52.748 [warn] Could not bind to 127.0.0.1:2777: Address
 already in use. Is Tor already running?
 Feb 01 13:15:52.749 [notice] Closing partially-constructed Socks listener
 on 127.0.0.1:2777
 Feb 01 13:15:52.749 [warn] Failed to parse/validate config: Failed to bind
 one of the listener ports.
 Feb 01 13:15:52.749 [err] Reading config failed--see warnings above.
 }}}

 But after the tests finish there's no lingering tor processes...

 {{{
 % pidof tor | wc -l
 0
 }}}

 Any thoughts on what's missing?

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/14419#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs