[OpenSIPS-Users] Load balancer probing from incorrect interface
Bill W.
opensips at aastral.net
Mon Nov 22 21:19:09 CET 2010
Hello Bogdan,
Okay I've been researching this more. I am not a programmer, but it
looks like get_out_socket and find_si in forward.c and socket_info.c are
just comparing ip addresses, and when opensips is trying to probe an
interface on the same machine, but is not bound to that IP, then source
IP address selection fails.
The challenge is that my instance of opensips is an HA service between
two machines, so I cannot simply specify IPs to listen on in
opensips.cfg because the source IPs I need to probe from will change
depending on which machine opensips is running on.
It looks like the solution to make this work with the existing
get_out_socket code is to be able to specify interface aliases in the
listen= directive.
If I could do something like this:
listen=udp:eth0:5090 # for probing eth0 IP alias
listen=udp:eth0.0:5090 # for probing eth0:0 IP alias
listen=udp:eth1.1:5090 # for probing eth1:1 IP alias
Then opensips could pick the appropriate IP from the interface/alias on
the machine where it is running.
If that's too complex, then the brute-force method would be to allow this:
listen=udp:*:5090 # for probing
I can't simply use the port= directive because I've got other services
running on 5060.
Thoughts? Thanks!
Bill
On 11/12/10 8:27 PM, Bill W wrote:
> Hi Bogdan,
>
> Thanks so much for explaining how interface selection works.
>
> Unfortunately the other interfaces all have daemons listening on port
> 5060 and are in production and I can't simply reallocate IPs.
>
> So for the error messages below, is the problem that opensips is trying
> to send out a packet on the automatically selected IP but since port
> 5060 is occupied on that address, the socket is failing?
>
> If so, is it possible to specify a different source port so the packet
> will go out?
>
>
> Thanks,
> Bill
More information about the Users
mailing list