[RADIATOR] ERR: sendTo: send to <IP address> port 1812 failed: Invalid argument
Heikki Vatiainen
hvn at open.com.au
Thu Jan 13 14:11:43 UTC 2022
Stefan Paetow wrote:
> It turns out that because I bound to 127.0.0.1 *FIRST*, not one of
> the non-localhost addresses, Socket’s sendTo function apparently did
> what’s mentioned in the above URL.
I can reproduce this with macOS too:
ERR: sendTo: send to 10.20.30.80 port 1812 failed: Can't assign
requested address
A bit different reason but it fails similarly. The above happens with
AuthBy RADIUS and global 'BindAddress 127.0.0.1, 10.20.30.40'. If I
switch to 'BindAddress 10.20.30.40, 127.0.0.1' it works as it should.
I can set LocalAddress, but the default is to use the first global
BindAddress as the outgoing address. The default BindAddress is 0.0.0.0
which would also work.
There's one hint in AuthBy RADIUS log about what happens:
DEBUG: AuthBy RADIUS creates new local socket 127.0.0.1 port 12345
for sending requests
I've set OutPort to 12345, but that doesn't change anything. It would
fail with ephemeral port too.
However, there are a number of modules which use the global BinAddress
and may not log what they as the outgoing address.
> I would suggest that OSC please check the configuration to check that
> if BindAddress is set to 127.0.0.1 or ::1 *before* any other IPv4 or
> IPv6 entries, either warn or quit with an error?
One option might be to reorder the addresses before they are used so
that the loopbacks go to the end of the list.
A log message might also be useful. Quitting might be a bit too much
because often there's something like LocalAddress that is available for
exactly setting the locally bound address.
Thanks for reporting this. I'm not sure yet what changes should be done,
but I can see that this can be surprising. One thing might be to enhance
the ERR log message to say more about the possible causes.
Changing the topic: have you noticed problems with getting your emails
delivered? I noticed your messages in the list archive but did not
receive them in my mailbox. I think the same thing has happened earlier too.
Thanks,
Heikki
--
Heikki Vatiainen
OSC, makers of Radiator
Visit radiatorsoftware.com for Radiator AAA server software
More information about the radiator
mailing list