syslog:
Self-testing indicates your ORPort xxxxxxx:443 is reachable from the outside. Excellent. Publishing server descriptor.
THEN:
Our IP Address has changed from xxxxxxx to ???; rebuilding descriptor (source: METHOD=NONE).
LX1changed title from Bridge obfs4 0.4.5.0-alpha-dev rebuilding descriptor (source: METHOD=NONE) | Don't know my address while generating descriptor to Bug: Bridge obfs4 0.4.5.0-alpha-dev rebuilding descriptor (source: METHOD=NONE) | Don't know my address while generating descriptor
changed title from Bridge obfs4 0.4.5.0-alpha-dev rebuilding descriptor (source: METHOD=NONE) | Don't know my address while generating descriptor to Bug: Bridge obfs4 0.4.5.0-alpha-dev rebuilding descriptor (source: METHOD=NONE) | Don't know my address while generating descriptor
I switched to stable 0.4.3.6 for these moments because I want to provide functional bridges for users. After solving the bug "METHOD=NONE" > back to alpha.
Are those two log sections from the same torrc? Are they from different times, or at the same time?
Can you say more about which options you have set in the torrc? Of course, please feel free to replace all explicit IPs with x.x.x.x.
Would it be possible to try this again at info-level logging, and see what messages happen right before the one about METHOD=NONE?
(Also, if you want to try an alpha that is less "exciting", the 0.4.4.x series is currently in alpha and more stable than 0.4.5.x, which is just a development trunk.)
I did the research, for more information, about bug:
previous logs were from Debian 9.
I upgraded research machine to latest Debian Unstable/Sid now
Unpacking tor (0.4.5.0-alpha-dev-20200811T144847Z-1)
deb http://ftp.nl.debian.org/debian/ unstable main contrib non-freedeb https://deb.torproject.org/torproject.org sid maindeb-src https://deb.torproject.org/torproject.org sid maindeb https://deb.torproject.org/torproject.org tor-nightly-master-sid maindeb-src https://deb.torproject.org/torproject.org tor-nightly-master-sid main
and ha get bug again with loop "rebuilding descriptor (source: METHOD=NONE)"
Aug 11 23:07:35 antix Tor[30814]: Bootstrapped 0% (starting): StartingAug 11 23:07:38 antix Tor[30814]: This version of Tor (0.4.5.0-alpha-dev) is newer than any recommended version, according to the directory authorities. Recommended versions are: 0.3.5.10,0.3.5.11,0.4.2.7,0.4.2.8,0.4.3.3-alpha,0.4.3.4-rc,0.4.3.5,0.4.3.6,0.4.4.1-alpha,0.4.4.2-alpha,0.4.4.3-alpha,0.4.4.4-rcAug 11 23:09:27 antix Tor[30814]: Starting with guard context "default"Aug 11 23:09:28 antix Tor[30814]: Registered server transport 'obfs4' at '[::]:55102'Aug 11 23:09:29 antix Tor[30814]: Bootstrapped 5% (conn): Connecting to a relayAug 11 23:09:29 antix Tor[30814]: Opening Socks listener on /run/tor/socksAug 11 23:09:29 antix Tor[30814]: Opened Socks listener connection (ready) on /run/tor/socksAug 11 23:09:29 antix Tor[30814]: Opening Control listener on /run/tor/controlAug 11 23:09:29 antix Tor[30814]: Opened Control listener connection (ready) on /run/tor/controlAug 11 23:09:29 antix Tor[30814]: Don't know my address while generating descriptorAug 11 23:09:29 antix Tor[30814]: Bootstrapped 10% (conn_done): Connected to a relayAug 11 23:09:29 antix Tor[30814]: Bootstrapped 14% (handshake): Handshaking with a relayAug 11 23:09:29 antix Tor[30814]: Bootstrapped 15% (handshake_done): Handshake with a relay doneAug 11 23:09:29 antix Tor[30814]: Bootstrapped 75% (enough_dirinfo): Loaded enough directory info to build circuitsAug 11 23:09:29 antix Tor[30814]: Bootstrapped 90% (ap_handshake_done): Handshake finished with a relay to build circuitsAug 11 23:09:29 antix Tor[30814]: Bootstrapped 95% (circuit_create): Establishing a Tor circuitAug 11 23:09:30 antix Tor[30814]: Bootstrapped 100% (done): DoneAug 11 23:10:29 antix Tor[30814]: Now checking whether IPv4 ORPort x.x.x.x:443 is reachable... (this may take up to 20 minutes -- look for log messages indicating success)Aug 11 23:10:29 antix Tor[30814]: Self-testing indicates your ORPort x.x.x.x:443 is reachable from the outside. Excellent. Publishing server descriptor.Aug 11 23:10:31 antix Tor[30814]: Our IP Address has changed from x.x.x.x to ???; rebuilding descriptor (source: METHOD=NONE).Aug 11 23:10:31 antix Tor[30814]: Now checking whether IPv4 ORPort x.x.x.x:443 is reachable... (this may take up to 20 minutes -- look for log messages indicating success)Aug 11 23:10:31 antix Tor[30814]: Self-testing indicates your ORPort x.x.x.x:443 is reachable from the outside. Excellent. Publishing server descriptor.Aug 11 23:10:31 antix Tor[30814]: Performing bandwidth self-test...done.Aug 11 23:10:32 antix Tor[30814]: Our IP Address has changed from x.x.x.x to ???; rebuilding descriptor (source: METHOD=NONE). Aug 11 23:10:33 antix Tor[30814]: Now checking whether IPv4 ORPort x.x.x.x:443 is reachable... (this may take up to 20 minutes -- look for log messages indicating success) Aug 11 23:10:35 antix Tor[30814]: Self-testing indicates your ORPort x.x.x.x:443 is reachable from the outside. Excellent. Publishing server descriptor. Aug 11 23:10:36 antix Tor[30814]: Our IP Address has changed from x.x.x.x to ???; rebuilding descriptor (source: METHOD=NONE). Aug 11 23:10:36 antix Tor[30814]: Now checking whether IPv4 ORPort x.x.x.x:443 is reachable... (this may take up to 20 minutes -- look for log messages indicating success) Aug 11 23:10:37 antix Tor[30814]: Self-testing indicates your ORPort x.x.x.x:443 is reachable from the outside. Excellent. Publishing server descriptor. Aug 11 23:10:38 antix Tor[30814]: Our IP Address has changed from x.x.x.x to ???; rebuilding descriptor (source: METHOD=NONE). Aug 11 23:10:38 antix Tor[30814]: Now checking whether IPv4 ORPort x.x.x.x:443 is reachable... (this may take up to 20 minutes -- look for log messages indicating success) Aug 11 23:10:39 antix Tor[30814]: Self-testing indicates your ORPort x.x.x.x:443 is reachable from the outside. Excellent. Publishing server descriptor. Aug 11 23:10:40 antix Tor[30814]: Our IP Address has changed from x.x.x.x to ???; rebuilding descriptor (source: METHOD=NONE). Aug 11 23:10:40 antix Tor[30814]: Now checking whether IPv4 ORPort x.x.x.x:443 is reachable... (this may take up to 20 minutes -- look for log messages indicating success) Aug 11 23:10:41 antix Tor[30814]: Self-testing indicates your ORPort x.x.x.x:443 is reachable from the outside. Excellent. Publishing server descriptor. Aug 11 23:10:42 antix Tor[30814]: Our IP Address has changed from x.x.x.x to ???; rebuilding descriptor (source: METHOD=NONE).
Sorry, I haven't been able to figure this one out. I tried running the same configuration, and didn't see that error. Maybe it requires me to open external ports? In any case, I'm hoping that David will be able to figure it out when he's back on Monday, since he wrote this version of the code.
Ok this is a fun one... first, thanks for the report! Lets try to narrow this down.
In 0.4.5.x, we've changed radically (as in the entire code has changed) how we discover addresses so you might have hit a bug there!
For relays, 4 methods are used in order to discover: Config (Address), OR Port (ORPort), network interface lookup and finally local hostname resolution.
Now, if none of them worked, we should see an info log:
[info] find_my_address(): Unable to find our IP address.
If you are able to get the debug level logs and confirm that we can then proceed to understand why it found nothing. If you know how great, else simply add this to your torrc to get those logs:
Log debug file /tmp/info.log
(Don't hesitate to post the whole thing here but just make sure to remove any private information from it like your IP or bridge fingerprint.)
We can already zone out options. The torrc you posted does not have Address and the ORPort 443 does not have an explicit address configured. Thus, the only way Tor can discover its public address is through the network interface or local hostname. And maybe that failed somehow... Logging will tell us more.
It is weird though that the self testing can find an address but then we are unable to find it the second later through the other mechanism... Debug logs here are really instrumental to understand what is happening.
# tail -F /var/log/syslog | grep TorAug 20 19:19:27 antix Tor[10904]: This version of Tor (0.4.5.0-alpha-dev) is newer than any recommended version, according to the directory authorities. Recommended versions are: 0.3.5.10,0.3.5.11,0.4.2.7,0.4.2.8,0.4.3.3-alpha,0.4.3.4-rc,0.4.3.5,0.4.3.6,0.4.4.1-alpha,0.4.4.2-alpha,0.4.4.3-alpha,0.4.4.4-rc Aug 20 19:24:51 antix Tor[10904]: Starting with guard context "default" Aug 20 19:24:51 antix Tor[10904]: Registered server transport 'obfs4' at '[::]:55102' Aug 20 19:24:53 antix Tor[10904]: Bootstrapped 5% (conn): Connecting to a relay Aug 20 19:24:53 antix Tor[10904]: Opening Socks listener on /run/tor/socks Aug 20 19:24:53 antix Tor[10904]: Opened Socks listener connection (ready) on /run/tor/socks Aug 20 19:24:53 antix Tor[10904]: Opening Control listener on /run/tor/control Aug 20 19:24:53 antix Tor[10904]: Opened Control listener connection (ready) on /run/tor/control Aug 20 19:24:53 antix Tor[10904]: Don't know my address while generating descriptor Aug 20 19:24:53 antix Tor[10904]: Bootstrapped 10% (conn_done): Connected to a relay Aug 20 19:24:53 antix Tor[10904]: Bootstrapped 14% (handshake): Handshaking with a relay Aug 20 19:24:53 antix Tor[10904]: Bootstrapped 15% (handshake_done): Handshake with a relay done Aug 20 19:24:53 antix Tor[10904]: Bootstrapped 75% (enough_dirinfo): Loaded enough directory info to build circuits Aug 20 19:24:53 antix Tor[10904]: Bootstrapped 90% (ap_handshake_done): Handshake finished with a relay to build circuits Aug 20 19:24:53 antix Tor[10904]: Bootstrapped 95% (circuit_create): Establishing a Tor circuit Aug 20 19:25:00 antix Tor[10904]: Bootstrapped 100% (done): DoneAug 20 19:25:53 antix Tor[10904]: Don't know my address while generating descriptorAug 20 19:26:53 antix Tor[10904]: Don't know my address while generating descriptor
and got bug loop
Aug 20 19:26:53 antix Tor[10904]: Don't know my address while generating descriptor
Aug 20 19:24:53.000 [debug] get_address_from_config(): Attempting to get address from configurationAug 20 19:24:53.000 [info] get_address_from_config(): No Address option found in configuration.
ORPort
Aug 20 19:24:53.000 [debug] get_address_from_orport(): Attempting to get address from ORPortAug 20 19:24:53.000 [info] address_can_be_used(): Address '0.0.0.0' is a private IP address. Tor relays that use the default DirAuthorities must have public IP addresses.
Network Interface
Aug 20 19:24:53.000 [debug] get_address_from_interface(): Attempting to get address from network interfaceAug 20 19:24:53.000 [debug] get_interface_address6(): Found internal interface address 'xxx.xxx.xxx.xxx'Aug 20 19:24:53.000 [info] address_can_be_used(): Address 'xxx.xxx.xxx.xxx' is a private IP address. Tor relays that use the default DirAuthorities must have public IP addresses.
Local hostname
Aug 20 19:24:53.000 [debug] get_address_from_hostname(): Attempting to get address from local hostnameAug 20 19:24:53.000 [info] tor_getaddrinfo(): (Sandbox) getaddrinfo succeeded.Aug 20 19:24:53.000 [info] address_can_be_used(): Address '127.0.0.1' is a private IP address. Tor relays that use the default DirAuthorities must have public IP addresses.
No methods were able to find your address. For some reasons, the address on the interface it only got a local IPv4? Was the xxx.xxx.xxx.xxx really local (RFC1918) ?
Now, there is a last resort method that relay use is that they learn their address from a directory authority when downloading directory data. HOWEVER, bridges don't do that, they act as client I believe so they don't leak to the authorities that they are in fact a relay (I might be wrong on the details but the debug logs suggest that since the directory fetch was done on a fallbackdir, relay don't poke them).
Thus your bridge has no way of finding its address. We ought to find the mystery of the network interface address first that is if really private address. Else, you will have to set Address in your torrc or OPPort address:port.
if I switch to stable (0.4.3.6-1), with the same torrc config, no bug, relay runs
it means from July alpha, they have new config? - more accurate time location: at the end of June I left state, and everything was fine, and at the end of July after the return, I discovered this bug.
"We ought to find the mystery of the network interface address first that is if really private address"
This network is corporate. I built everything, so I know the exact structure.
tail -F /var/log/syslog | grep TorAug 22 04:05:53 antix Tor[3464]: Configuration port ORPort 443 superseded by ORPort xx.xxx.xx.xxx:443Aug 22 04:06:01 antix Tor[3464]: Parsing GEOIP IPv4 file /usr/share/tor/geoip.Aug 22 04:06:02 antix Tor[3464]: Parsing GEOIP IPv6 file /usr/share/tor/geoip6.Aug 22 04:06:02 antix Tor[3464]: Configured to measure statistics. Look for the *-stats files that will first be written to the data directory in 24 hours from now.Aug 22 04:06:05 antix Tor[3464]: Your Tor server's identity key fingerprint is 'AgileResearchLab'Aug 22 04:06:05 antix Tor[3464]: Your Tor bridge's hashed identity key fingerprint is 'AgileResearchLab'Aug 22 04:06:05 antix Tor[3464]: Your Tor server's identity key ed25519 fingerprint is 'AgileResearchLab'Aug 22 04:06:05 antix Tor[3464]: Bootstrapped 0% (starting): StartingAug 22 04:06:07 antix Tor[3464]: This version of Tor (0.4.5.0-alpha-dev) is newer than any recommended version, according to the directory authorities. Recommended versions are: 0.3.5.10,0.3.5.11,0.4.2.7,0.4.2.8,0.4.3.3-alpha,0.4.3.4-rc,0.4.3.5,0.4.3.6,0.4.4.1-alpha,0.4.4.2-alpha,0.4.4.3-alpha,0.4.4.4-rcAug 22 04:08:09 antix Tor[3464]: Starting with guard context "default"Aug 22 04:08:09 antix Tor[3464]: Registered server transport 'obfs4' at '[::]:55102'Aug 22 04:08:10 antix Tor[3464]: Bootstrapped 5% (conn): Connecting to a relayAug 22 04:08:10 antix Tor[3464]: Opening Socks listener on /run/tor/socksAug 22 04:08:10 antix Tor[3464]: Opened Socks listener connection (ready) on /run/tor/socksAug 22 04:08:10 antix Tor[3464]: Opening Control listener on /run/tor/controlAug 22 04:08:10 antix Tor[3464]: Opened Control listener connection (ready) on /run/tor/controlAug 22 04:08:10 antix Tor[3464]: Bootstrapped 10% (conn_done): Connected to a relayAug 22 04:08:10 antix Tor[3464]: Bootstrapped 14% (handshake): Handshaking with a relayAug 22 04:08:10 antix Tor[3464]: Bootstrapped 15% (handshake_done): Handshake with a relay doneAug 22 04:08:10 antix Tor[3464]: Bootstrapped 75% (enough_dirinfo): Loaded enough directory info to build circuitsAug 22 04:08:10 antix Tor[3464]: Bootstrapped 90% (ap_handshake_done): Handshake finished with a relay to build circuitsAug 22 04:08:10 antix Tor[3464]: Bootstrapped 95% (circuit_create): Establishing a Tor circuitAug 22 04:08:11 antix Tor[3464]: Bootstrapped 100% (done): DoneAug 22 04:08:11 antix Tor[3464]: Now checking whether IPv4 ORPort xx.xxx.xx.xxx:443 is reachable... (this may take up to 20 minutes -- look for log messages indicating success)ro
and now watch out for the SCIFI voice
04:28:10 [WARN] Your server has not managed to confirm reachability for its ORPort(s) at xx.xxx.xx.xxx:443. Relays do not publish descriptors until their ORPort and DirPort are reachable. Please check your firewalls, ports, address, /etc/hosts file, etc.
Nonsense! if I switch to the stable (0.4.3.6-1) version all runs, 443 is success reachable. See previous post.
Something had to happen in the alpha version in July. because until then everything was fine, and alpha worked for me over a year.
Let's go to test 2 - stable 0.4.3.6-1 - same new config
Aug 22 04:57:26 antix Tor[5407]: Self-testing indicates your ORPort is reachable from the outside. Excellent. Publishing server descriptor.Aug 22 04:57:29 antix Tor[5407]: Performing bandwidth self-test...done.
Which means that stable version (0.4.3.6-1) works with both the original torrc configuration and the new one,
Huh ... so hmmm, two possibilities, we introduced a bug or we fixed a bug :).
Now, I want to get that logic straighten out. The first ORPort 443 is in no advertise mode so basically you want tor to listen on 0.0.0.0:443 but not advertise its port + address in the descriptor.
The second is that you want to advertise xx.xxx.xx.xxx:443 but not listen on it.
Which means that the first ORPort statement will never be picked for the descriptor or reachability tests. What puzzles me is that the second ORPort is an internal address and 0.4.5 should never pick it as usable or even do reachability test. Again, can you provide the 0.4.5. debug logs if possible up to the reachability test on xx.xxx.xx.xxx:443?
Tor, in theory, in all versions, should never allowed a private address to be tested on the network nor even published. Thanks!
I need the debug log to go further as I said previously:
Again, can you provide the 0.4.5. debug logs if possible up to the reachability test on xx.xxx.xx.xxx:443?
For some reasons, the 043 took that private address but in 045, which a lot of code touching that changed, we don't allow it (which should be the correct behavior).
Thus, we need to look at the tor logs here (ideally on both version) and understand why 1) reachability worked on 0.4.3 with a private address and 2) Why tor attempts to do a reachability check on a private address.
Just use the ORPort you showed us in #40071 (comment 2706761) and test it on 043 and 045. Thanks!
Thanks! Quick question to really confirm things because the logs suggest me otherwise but xx.xxx.xx.xxx is a private address as in the 192.168.x.x you mentioned before or it is a public address?
I think I might have identified the issue here with this smaller debug log.
Basically, tor was not able to auto-discover an address because all methods failed. That is possible and expected behavior. No IP in the config, no usable IP on the interface and the local hostname resolved to an internal address.
What left is Tor discovering its IP from a directory authority. That is where it is failing. Bridge do not poke dirauth directly contrary to Relays and thus it never got a suggestion.
Remember that in July, with the S55 work and address discovery, we changed that behavior to ONLY allow dirauth to tell us our address.
Furthermore, the dummy descriptor fetch that tor has to speed up the address discovery uses the DL_WANT_ANY_DIRSERVER parameter which will fail most of the time. We might want to change it to DL_WANT_AUTHORITY but then we ought to make sure we are not adding more pressure on dirauth...
Found another bug. If you got your address from an authority, our periodic event check_descriptor_ipaddress_changed will trigger an address discovery and will fail to notice that we have not found one and instead will consider the address changed from the suggestion to "nothing" and trigger an event.
This triggers logging, control event and rebuild of a descriptor which will use the right address. But it also resets all reachability tests so this is really not good because we will bounce back and forth non stop here from noticing a false IP change and resetting reachability...
I'm currently unable to reproduce the reachability failure when only using ORPort or Address that you are experiencing... so first I want to see if that branch help things on your side or not. Thanks!