Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#5602 closed defect (fixed)

When managed proxy dies, we get "Tried to connect through proxy, but proxy address could not be found."

Reported by: asn Owned by:
Priority: Medium Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: pt tor-bridge
Cc: Actual Points:
Parent ID: #5070 Points:
Reviewer: Sponsor:

Description

In #5070, arma reported that if he puts:

ClientTransportPlugin obfs2 exec /bin/false --managed

in his torrc.

In his logs he gets:

Feb 10 03:29:57.000 [notice] Managed proxy stream closed. Most probably application stopped running
Feb 10 03:29:57.000 [notice] Failed to terminate process with PID '13672'
Feb 10 03:29:57.000 [warn] You have a Bridge line using the obfs2 pluggable transport, but there doesn't seem to be a corresponding ClientTransportPlugin line.
Feb 10 03:29:58.000 [notice] Bootstrapped 5%: Connecting to directory server.
Feb 10 03:29:58.000 [warn] Tried to connect through proxy, but proxy address could not be found.

The last line Tried to connect through proxy, but proxy address could not be found is not very clear or helpful.

Child Tickets

Change History (9)

comment:1 Changed 8 years ago by asn

The log message appears when Tor tries to connect to a host, finds out that it needs to use a proxy, and then get_proxy_addrport() can't find the corresponding proxy address. At the moment, this can only happen when pluggable transports are used, and our transport proxy failed earlier and destroyed all its transports.

Maybe we should refactor the code a bit, so that it's possible to output a more meaningful log message in this case, like: We tried to connect to bridge X using transport Y, but it seems like transport Y is not available. Did your transport proxy fail?.

comment:2 Changed 8 years ago by asn

note to self: the refactoring needed for this bug is not trivial and we might be able to combine it with the refactoring needed for #5195.

comment:3 Changed 7 years ago by asn

Please see branch bug5602 in https://git.gitorious.org/mytor/mytor.git.

It makes the log message more informative, but it also makes it similar to the one that validate_pluggable_transports_config() is giving out:

May 18 22:03:26.000 [warn] We were supposed to connect to bridge '222.222.222.222:1151' using pluggable transport 'obfs2', but it seems that we can't find a pluggable transport proxy supporting 'obfs2'. Please make sure that your configuration file is valid.
May 18 22:03:26.000 [warn] We can't find a pluggable transport proxy that supports 'obfs2' for bridge '222.222.222.222:1151'. This can happen if you haven't provided a ClientTransportPlugin line, or if your pluggable transport proxy stopped working.

I'm wondering if connection_or_connect() is a good place to give out this warning, and if it can replace validate_pluggable_transports_config() (which is also the subject of silly bugs like #5589). Specifically, I'm thinking whether there are any cases where connection_or_connect() is not called, even though the user's configuration is wrong.

If connection_or_connect() is a good place to warn about non-existent ClientTransportPlugin lines, maybe we can simply remove validate_pluggable_transports_config().

comment:4 in reply to:  3 ; Changed 7 years ago by arma

Replying to asn:

May 18 22:03:26.000 [warn] We can't find a pluggable transport proxy that supports 'obfs2' for bridge '222.222.222.222:1151'. This can happen if you haven't provided a ClientTransportPlugin line, or if your pluggable transport proxy stopped working.

This looks like a situation where we should refactor until we can know which of these it was. They look like two totally different error cases.

comment:5 in reply to:  4 Changed 7 years ago by asn

Replying to arma:

Replying to asn:

May 18 22:03:26.000 [warn] We can't find a pluggable transport proxy that supports 'obfs2' for bridge '222.222.222.222:1151'. This can happen if you haven't provided a ClientTransportPlugin line, or if your pluggable transport proxy stopped working.

This looks like a situation where we should refactor until we can know which of these it was. They look like two totally different error cases.

That's the 0.2.4.x goal of #5601.

comment:6 Changed 7 years ago by asn

Status: newneeds_review

comment:7 Changed 7 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

looks ok; merging

comment:8 Changed 7 years ago by nickm

Keywords: tor-bridge added

comment:9 Changed 7 years ago by nickm

Component: Tor BridgeTor
Note: See TracTickets for help on using tickets.