Opened 3 years ago

Last modified 13 months ago

#20232 assigned defect

Relays get stuck on resolve_my_address() if unable to guess address

Reported by: c4k3 Owned by:
Priority: Very Low Milestone: Tor: unspecified
Component: Core Tor/Tor Version: Tor: 0.2.8.7
Severity: Trivial Keywords: host hostname hosts ip resolve tor-relay address-guessing self-identification
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

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.

Child Tickets

Change History (5)

comment:1 Changed 3 years ago by nickm

Milestone: Tor: unspecified

comment:2 Changed 2 years ago by nickm

Keywords: tor-relay address-guessing self-identification added

comment:3 Changed 13 months ago by traumschule

Ran into to this as well, let me know if you are interested in info logs.

If it's a configuration error we should update TorRelayGuide what users should do about
Address '<LOCALHOST>' resolves to private IP address '192.168.###.###'. Tor servers that use the default DirAuthorities must have public IP addresses.

TorRelayGuide#PublicIPv4Address says

Every relay needs a public IPv4 address - either directly on the host (preferred) or via NAT and port forwarding.

This is not very instructive. Should we recommend to run a doc/PluggableTransports/obfs4proxy instead?

comment:4 Changed 13 months ago by traumschule

Component: Core Tor/TorCommunity/Relays
Owner: set to Nusenu

turns out it helps to define Address as described in the comments in default torrc. I propose to add this to the platform specific instruction pages:

# Address [Your Public IP Address] # Uncomment this if you are behind a router or your internet is NATed
Last edited 13 months ago by traumschule (previous) (diff)

comment:5 in reply to:  4 Changed 13 months ago by teor

Component: Community/RelaysCore Tor/Tor
Owner: Nusenu deleted
Status: newassigned

Replying to traumschule:

turns out it helps to define Address as described in the comments in default torrc. I propose to add this to the platform specific instruction pages:

# Address [Your Public IP Address] # Uncomment this if you are behind a router or your internet is NATed

Please don't move a ticket that needs a Tor bugfix to the relay guide.

Instead, open a new ticket about the relay guide as a child of the Tor ticket.

Note: See TracTickets for help on using tickets.