[tor-bugs] #3577 [Tor Relay]: Unable to query fingerprint when there's no connection

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Wed Jul 13 16:35:07 UTC 2011


#3577: Unable to query fingerprint when there's no connection
-----------------------+----------------------------------------------------
 Reporter:  atagar     |          Owner:     
     Type:  defect     |         Status:  new
 Priority:  normal     |      Milestone:     
Component:  Tor Relay  |        Version:     
 Keywords:             |         Parent:     
   Points:             |   Actualpoints:     
-----------------------+----------------------------------------------------
 When I'm offline, start a relay, and run the GETINFO option for my
 fingerprint it fails (this also fails when online for a small window when
 first starting up):
 {{{
 >>> from TorCtl import TorCtl
 >>> conn = TorCtl.connect(controlPort=9052)
 >>> conn.get_info("fingerprint")
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "TorCtl/TorCtl.py", line 1165, in get_info
     lines = self.sendAndRecv("GETINFO %s\r\n"%name)
   File "TorCtl/TorCtl.py", line 942, in sendAndRecv
     raise ErrorReply("%s %s"%(tp, msg), status = code, message = msg)
 TorCtl.TorCtl.ErrorReply: 551 No routerdesc known; am I really a server?
 }}}

 However from the log I do have a fingerprint:
 {{{
  13:41:42 [WARN] eventdns: All nameservers have failed
  13:41:25 [NOTICE] New control connection opened.
  13:38:52 [NOTICE] I learned some more directory information, but not
 enough to build a circuit:
 We have no recent network-status consensus.
  13:38:50 [NOTICE] Your Tor server's identity key fingerprint is
 'fenrir 30BEFE1F8E07FAD830EA885C2E067F174AB48BD3'
  13:38:50 [NOTICE] OpenSSL OpenSSL 0.9.8g 19 Oct 2007 [90807f] looks like
 it's older than 0.9.8l,
 but some vendors have backported 0.9.8l's renegotiation code to earlier
 versions, and some have backported the
 code from 0.9.8m or 0.9.8n. I'll set both SSL3_FLAGS and SSL_OP just to be
 safe.
  13:38:50 [WARN] Couldn't set up any working nameservers. Network not up
 yet? Will try again soon.
  13:38:50 [WARN] Unable to parse '/etc/resolv.conf', or no nameservers in
 '/etc/resolv.conf' (6)
  13:38:50 [NOTICE] Parsing GEOIP file /usr/local/share/tor/geoip.
  13:38:50 [NOTICE] Based on 239 circuit times, it looks like we don't need
 to wait so long for
 circuits to finish. We will now assume a circuit is too slow to use after
 waiting 4 seconds.
  13:38:50 [NOTICE] Tor 0.2.2.23-alpha (git-b85eb949b528f4d7) opening log
 file.
 }}}

 Looks like this is from...

 - getinfo_helper_misc (control.c, lines 1460-1464)
 {{{
   const routerinfo_t *me = router_get_my_routerinfo();
   if (!me) {
     *errmsg = "No routerdesc known; am I really a server?";
     return -1;
   }
 }}}

 - router_get_my_routerinfo (router.c, lines 1353-1356)
 {{{
   if (!server_mode(get_options()))
     return NULL;
   if (router_rebuild_descriptor(0))
     return NULL;
 }}}

 - router_rebuild_descriptor (router.c, lines 1432-1439)
 {{{
   if (router_pick_published_address(options, &addr) < 0 ||
       router_get_advertised_or_port(options) == 0) {
     /* Stop trying to rebuild our descriptor every second. We'll
      * learn that it's time to try again when ip_address_changed()
      * marks it dirty. */
     desc_clean_since = time(NULL);
     return -1;
   }
 }}}

 Hopefully this result isn't intentional since it would mean falling back
 to log parsing. :)

 Cheers! -Damian

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/3577>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list