[OpenSIPS-Users] Load balancer probing from incorrect interface
bogdan at voice-system.ro
Wed Nov 24 12:10:12 CET 2010
Bill W. wrote:
> 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.
That is not possible - you cannot change at runtime the interfaces
opensips works with - you cannot make it to listen on a newly added
interface, you cannot make it stop using an already configured interface.
Each time you change the interfaces on the server, if you need to
> 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
to be honest, never tried something like that - let me know if it works
> I can't simply use the port= directive because I've got other services
> running on 5060.
> Thoughts? Thanks!
> 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?
> Users mailing list
> Users at lists.opensips.org
More information about the Users