Instead of stating "Connecting to a relay directory failed (no route to host)." it'd be useful to give the error message "Connecting to a relay directory failed (no route to host [host])." so that the user can investigate.
experienced with Tor Browser 4.0.3
Trac: Username: krichter
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
I can see how it would be helpful to know which host / IP address could not be reached. To fix this, I think the error messages generated by the tor daemon would need to be modified to add host information; currently, Tor Launcher does not have access to that info.
Nick, please reassign as appropriate.
Trac: Cc: N/Ato brade, mcs Status: new to assigned Owner: tbb-team to nickm Component: Tor Browser to Tor
I experimented by deleting all of my tor cache files, disconnecting my Ethernet cable, and trying to start Tor Browser. The error message that is the focus of this ticket can be generated in response to a bootstrap status event that looks like this:
650 STATUS_CLIENT WARN BOOTSTRAP PROGRESS=5 TAG=conn_dir SUMMARY="Connecting to directory server" WARNING="No route to host" REASON=NOROUTE COUNT=4 RECOMMENDATION=warn
I also saw a similar response to a 'GETINFO status/bootstrap-phase' command:
250-status/bootstrap-phase=WARN BOOTSTRAP PROGRESS=5 TAG=conn_dir SUMMARY="Connecting to directory server" WARNING="No route to host" REASON=NOROUTE COUNT=2 RECOMMENDATION=warn
The error message displayed by the browser is not in the tor code; that is because Tor Launcher uses TAG and REASON as keywords to produce localized error messages (conn_dir is mapped to 'Connecting to a relay directory' and NOROUTE is mapped to 'no route to host').
Since Tor Launcher does not show users the text within the SUMMARY and WARNING fields, I am not sure where to add the host within these control port responses. You could add an optional HOST field and return it for certain failures (e.g., CONNECTREFUSED, TIMEOUT, NOROUTE). Or you could hack it into the WARNING field using some parsable convention, e.g., WARNING="No route to host [1.2.3.4]" (but this is hacky and violates the "Controllers SHOULD NOT rely on the format of any warning string" clause within the control protocol spec).
Branch "feature15006_026" in my public tor repo has a simple implementation of this that might do what you want. The corresponding spec change is in branch "feature15006" in my public torspec repo.
Trac: Cc: brade, mcs to brade, mcs, atagar Status: assigned to needs_review
Also, is the spec saying all these keyword fields are optional or it's an 'all or nothing'? Usually we have "[keyword1=foo] [keyword2=bar]...". Don't think I've seen square brackets around multiple fields before.
With these changes, I now get:
650 STATUS_CLIENT WARN BOOTSTRAP PROGRESS=5 TAG=conn_dir SUMMARY="Connecting to directory server" WARNING="Network is unreachable" REASON=NOROUTE COUNT=3 RECOMMENDATION=warn HOST="$BD6A829255CB08E66FBE7D3748363586E46B3810"
But I cannot figure out what control port command to use to translate the ID into something like hostname:port or IP:port. Pointers appreciated!
To get the address/ORPort you can fetch the descriptor ('GETINFO desc/id/BD6A829255CB08E66FBE7D3748363586E46B3810' or 'GETINFO ns/id/BD6A829255CB08E66FBE7D3748363586E46B3810' should both do the trick for this).
To get the address/ORPort you can fetch the descriptor ('GETINFO desc/id/BD6A829255CB08E66FBE7D3748363586E46B3810' or 'GETINFO ns/id/BD6A829255CB08E66FBE7D3748363586E46B3810' should both do the trick for this).
Thanks! My problem was that I started with a completely clean tor data directory. In that case, GETINFO desc/id/... seems to return:
552 Unrecognized key "desc/id/$BD6A829255CB08E66FBE7D3748363586E46B3810"
and GETINFO ns/id/... returns:
250-ns/id/$BD6A829255CB08E66FBE7D3748363586E46B3810=
250 OK
I guess this ID is one of the directory servers and tor does not yet have any info to report. But I admit I do not fully understand everything that happens during the Tor bootstrapping process.
Would you be willing to always include ip:port? Maybe tor could always include HOST="ip:port" but also include HOSTID="..." if it is available.
Looks good to me, and I think we can use this nicely inside Tor Launcher... although a tor developer should probably review the code. Questions like "Is conn->identity_digest guaranteed to be non-NULL?" run through me head because I do not know the tor code well (actually, I looked at that one and saw that it is a fixed-size array... but you get the idea).
Linus: the (int) is is optional, since passing anything shorter than an int into a varargs implicitly casts it... but that's not 100% obvious, so sometimes my fingers stick the cast in anyway.
Trac: Resolution: N/Ato implemented Status: needs_review to closed