Opened 12 months ago

Closed 9 months ago

#20711 closed defect (fixed)

[warn] Cannot make an outgoing connection without a DirPort

Reported by: arma Owned by:
Priority: Medium Milestone: Tor: 0.3.0.x-final
Component: Core Tor/Tor Version: Tor: 0.2.8.2-alpha
Severity: Normal Keywords: triage-out-030-201612, review-group-16, 030-backport
Cc: Actual Points:
Parent ID: Points: 0.2
Reviewer: nickm Sponsor:

Description

Running my close-to-maint-0.2.9 branch as a relay, I get this complaint periodically:

Nov 18 02:36:03.747 [warn] Cannot make an outgoing connection without a DirPort.
Nov 18 02:36:03.848 [warn] Cannot make an outgoing connection without a DirPort.
Nov 18 02:37:03.659 [warn] Cannot make an outgoing connection without a DirPort.

I have set ORPort and I have not set DirPort, and also my relay can't find itself reachable (because it isn't).

The code indicates that I should get a stack-trace, but only at info-level, and I lost that log. I'll try to reproduce sometime -- or maybe somebody else will do it first. :)

Child Tickets

Change History (10)

comment:1 Changed 12 months ago by signout

I see the same. This stack trace is from Tor 0.2.8.9

Nov 21 18:10:15.000 [warn] Cannot make an outgoing connection without a DirPort.
Nov 21 18:10:15.000 [info] Bug: Address came from. Stack trace: (on Tor 0.2.8.9 )
Nov 21 18:10:15.000 [info] Bug:     0x115a108 <log_backtrace+0x48> at /usr/local/bin/tor (on Tor 0.2.8.9 )
Nov 21 18:10:15.000 [info] Bug:     0x1128d6c <directory_initiate_command_routerstatus_rend+0x5ac> at /usr/local/bin/tor (on Tor 0.2.8.9 )
Nov 21 18:10:15.000 [info] Bug:     0x1128a87 <directory_initiate_command_routerstatus_rend+0x2c7> at /usr/local/bin/tor (on Tor 0.2.8.9 )
Nov 21 18:10:15.000 [info] Bug:     0x112854e <directory_get_from_dirserver+0x5be> at /usr/local/bin/tor (on Tor 0.2.8.9 )
Nov 21 18:10:15.000 [info] Bug:     0x10b0341 <launch_descriptor_downloads+0x4b1> at /usr/local/bin/tor (on Tor 0.2.8.9 )
Nov 21 18:10:15.000 [info] Bug:     0x10b010b <launch_descriptor_downloads+0x27b> at /usr/local/bin/tor (on Tor 0.2.8.9 )
Nov 21 18:10:15.000 [info] Bug:     0x106a5cd <update_microdesc_downloads+0x10d> at /usr/local/bin/tor (on Tor 0.2.8.9 )
Nov 21 18:10:15.000 [info] Bug:     0x10af6be <update_all_descriptor_downloads+0x6e> at /usr/local/bin/tor (on Tor 0.2.8.9 )
Nov 21 18:10:15.000 [info] Bug:     0x10671ec <tor_main+0x27cc> at /usr/local/bin/tor (on Tor 0.2.8.9 )
Nov 21 18:10:15.000 [info] Bug:     0x107ad56 <periodic_event_setup+0x106> at /usr/local/bin/tor (on Tor 0.2.8.9 )
Nov 21 18:10:15.000 [info] Bug:     0x801aad2c7 <event_base_loop+0x6e7> at /usr/local/lib/libevent-2.0.so.5 (on Tor 0.2.8.9 )
Nov 21 18:10:15.000 [info] Bug:     0x1062795 <do_main_loop+0x5c5> at /usr/local/bin/tor (on Tor 0.2.8.9 )
Nov 21 18:10:15.000 [info] Bug:     0x1064b06 <tor_main+0xe6> at /usr/local/bin/tor (on Tor 0.2.8.9 )
Nov 21 18:10:15.000 [info] Bug:     0x10606d9 <main+0x19> at /usr/local/bin/tor (on Tor 0.2.8.9 )
Nov 21 18:10:15.000 [info] Bug:     0x10605d1 <_start+0x1b1> at /usr/local/bin/tor (on Tor 0.2.8.9 )
Nov 21 18:10:15.000 [info] routerlist_remove_old_routers: We have 7178 live routers and 12177 old router descriptors.
Last edited 12 months ago by signout (previous) (diff)

comment:2 Changed 12 months ago by isis

Milestone: Tor: unspecifiedTor: 0.3.0.x-final
Version: Tor: 0.2.9.5-alphaTor: 0.2.8.9

comment:3 Changed 11 months ago by dgoulet

Keywords: triage-out-030-201612 added
Milestone: Tor: 0.3.0.x-finalTor: 0.3.1.x-final

Triaged out on December 2016 from 030 to 031.

comment:4 Changed 11 months ago by teor

Points: 0.2
Status: newneeds_review
Version: Tor: 0.2.8.9Tor: 0.2.8.2-alpha

This is probably a mismatch between #12538 and #18625.

What I think is happening is this:

  • as an 0.2.8 tor, we choose directory mirrors that only have ORPorts, because they have the V2Dir flag and tunneled-dir-connection in their descriptors (#12538),
  • but as a relay, we prefer not to use begindir (#18625).

I think this issue only surfaced when the authorities upgraded to 0.2.8 and started assigning the V2Dir flag to ORPort-only relays.

Please see my branch bug20711 on github, which fixes the issue and clarifies the log message.

comment:5 Changed 9 months ago by Christian

I have DirPort (and ORPort) set and get the same message, but a few lines before it stated that DirPort is reachable, so it must have found it in the configuration, right?

Feb 13 00:51:01.378 [notice] Tor 0.3.0.3-alpha-dev (git-2670844b2b64172f) running on Linux with Libevent 2.2.0-alpha-dev, OpenSSL 1.1.0d and Zlib 1.2.8.
[...]
Feb 13 00:57:41.000 [notice] Tor has successfully opened a circuit. Looks like client functionality is working.
Feb 13 00:57:41.000 [notice] Bootstrapped 100%: Done
Feb 13 00:57:41.000 [notice] Now checking whether ORPort 71.xxx.xxx.xxx:9001 and DirPort 71.xxx.xxx.xxx:9030 are reachable... (this may take up to 20 minutes -- look for log messages indicating success)
Feb 13 00:57:42.000 [notice] Self-testing indicates your DirPort is reachable from the outside. Excellent.
Feb 13 00:57:43.000 [notice] Self-testing indicates your ORPort is reachable from the outside. Excellent. Publishing server descriptor.
Feb 13 00:57:51.000 [notice] Performing bandwidth self-test...done.
Feb 13 00:58:15.000 [warn] Cannot make an outgoing connection without a DirPort.
Feb 13 00:58:15.000 [warn] Cannot make an outgoing connection without a DirPort.
Feb 13 01:02:20.000 [notice] New control connection opened from 127.0.0.1.

This is with today's Git checkout.

comment:6 Changed 9 months ago by nickm

Keywords: review-group-16 added

comment:7 Changed 9 months ago by nickm

Reviewer: nickm

lgtm; do you think we should consider for backport?

comment:8 Changed 9 months ago by nickm

Status: needs_reviewmerge_ready

comment:9 Changed 9 months ago by teor

Keywords: 030-backport added

Yes to 0.3.0, because otherwise it will confuse operators for an entire release.
No to 0.2.9, because it's not security, and 0.3.0 will be out soon.

comment:10 Changed 9 months ago by nickm

Milestone: Tor: 0.3.1.x-finalTor: 0.3.0.x-final
Resolution: fixed
Status: merge_readyclosed

Merged to 030 then. Thanks!

Note: See TracTickets for help on using tickets.