Relays get stuck on resolve_my_address() if unable to guess address
I was just trying to set up a new relay, and it seems to spend excessive amounts of time repeatedly calling resolve_my_address(). First when starting it up it goes very slowly, it took it several hours to get all relay descriptors. After it did start, it acted very slowly and did nothing but complain about clock jumps:
Sep 22 18:07:04 Tor[560]: Your system clock just jumped 4420 seconds forward; assuming established circuits no longer work.
Sep 22 19:18:08 Tor[560]: Your system clock just jumped 4264 seconds forward; assuming established circuits no longer work.
Sep 22 20:24:19 Tor[560]: Your system clock just jumped 3971 seconds forward; assuming established circuits no longer work.
Sep 22 21:25:12 Tor[560]: Your system clock just jumped 3653 seconds forward; assuming established circuits no longer work.
The clock is completely accurate, with ntp running, and notice that the timestamps correspond to the seconds.
Turning debug on I just got spammed repeatedly with
Sep 23 15:51:06 Tor[11583]: resolve_my_address(): Guessed local hostname '<LOCALHOST>' resolves to a private IP address (192.168.0.191). Trying something else.
Sep 23 15:51:06 Tor[11583]: resolve_my_address(): Interface IP address '192.168.0.191' is a private address too. Ignoring.
Sep 23 15:51:06 Tor[11583]: resolve_my_address(): Address '<LOCALHOST>' resolves to private IP address '192.168.0.191'. Tor servers that use the default DirAuthorities must have public IP addresses.
Sep 23 15:51:06 Tor[11583]: router_pick_published_address(): Could not determine our address locally. Checking if directory headers provide any hints.
Sep 23 15:51:06 Tor[11583]: router_pick_published_address(): No hints from directory headers either. Will try again later.
Sep 23 15:51:06 Tor[11583]: resolve_my_address(): Guessed local host name as '<LOCALHOST>'
Sep 23 15:51:06 Tor[11583]: sandbox_getaddrinfo(): (Sandbox) getaddrinfo succeeded.
Setting the torrc Address option to the outside IP fixes this, but it would be nice if it gave a warning that it's not able to figure this out, instead of just getting stuck with no info unless you turn debug on.
Trac:
Username: c4k3