I contact you directly to avoid public confusion.
I want to understand why the relay server does not connect correctly when I do not set the listen address on the command line.
The server:
No firewall (double checked)
Public IP on a local physical interface
No NAT at all (also double checked)
The relay:
last binaries fetched from Jenkins
I can provide debug/log/pcap trace and maybe server access.
Just a sample capture showing that it seems to work without the --listen option:
Well I have read the documention another time and it appears that none of the flags are mandatory.
So I expect the relay server to work simply running the binary without any flags.
I just have tried to disable ipv6 and it still does not work.
So going with all those tests, I assume there is some mandatory options that must be used to make the relay server to work correctly (like -listen or -ext-address).
Maybe updating the documentation that way can avoid confusion.
-ext-address is only needed if you have a firewall rule in place redirecting relaysrv’s listen port (as described in the docs), and -listen defaults to :22070 which should be fine most if the time (and works fine for me), so I do think you’re wrong to say that one of those is required on all cases.
I though I was wrong, but tests show I have to explicitly set -listen to make it work. As I described my setup is pretty simple and network config cannot be as simple as it is right now.
I am just trying to understand why in that case I had to set the listen param. Maybe something somewhere on the system or in the code, I have no idea right now (only some guesses).
The only thing you might need to set is ext-address, listen address is only useful if you want to force it to listen on a specific interface, otherwise it defaults to all.
The only cases I can think that would be solved with listen address is outgoing requests being routed via some route that has no way to connect back, or firewall rules requiring binding on a specific interface.
Well looking at the relaypool server & relay server code, and checking/testing with additional debug, it appears (when all flags are omitted on the relay server) that the relay address is 0.0.0.0 (perfectly good as the server listen on all interfaces with carrier.
The thing is that the relaypool server first compare this address to an empty string (I have no idea when this case can happen but the interesting thing is coming), then if it fails when it compared to the address seen by its http server which is the foreign address of the relay trying to connect (that is the case because “0.0.0.0” != “”).