Greetings,
I have two Machines with Kamailio in a High Availability (HA) configuration. Both machines are active and processing calls and both have one HA IP that can jump to the other machine in case of failure.
I also have probing for NAPs configured with each IP as the socket.
So, in each machine i have this configuration :
listen=udp:HA_Address1 listen=udp:HA_Address2
NAP 1 being probed from socket HA_Address1 NAP 1 being probed from socket HA_Address2
I also have /proc/sys/net/ipv4/ip_nonlocal_bind with value 1.
Everything works correctly with this configuration. However when the probing is sent for the NAP' my logs get filled with the same error messages.
udp_send(): sendto(sock, buf: 0x7f2d4c91fa18, len: 340, 0, dst: (xxx.xxx.xxx.xxx:xxx), tolen: 16) - err: Invalid argument (22) CRITICAL: <core> [core/udp_server.c:602]: udp_send(): invalid sendtoparameters#012one possible reason is the server is bound to localhost and#012attempts to send to the net ERROR: tm [../../core/forward.h:219]: msg_send_buffer(): udp_send failed
The error happens because it is trying to probe a NAP using a socket that isn't active at the moment in the machine.
Is there a way for this error not to be logged or be disabled without reducing Log Level to suppress CRITICAL errors? I think this is a standard High Availability configuration. Is there some setting that can disable this kind of errors?
Best Regards,
Duarte Rocha
Hi Duarte,
You can enable a filter on the nathelper module to help with this https://www.kamailio.org/docs/modules/5.2.x/modules/nathelper.html#nathelper...
Check the similar setting for usrloc if you're using cache mode https://www.kamailio.org/docs/modules/5.2.x/modules/usrloc.html#usrloc.p.ser...
Cheers, Boden
On Wed, 8 May 2019, at 10:06 PM, Duarte Rocha wrote:
Greetings,
I have two Machines with Kamailio in a High Availability (HA) configuration. Both machines are active and processing calls and both have one HA IP that can jump to the other machine in case of failure.
I also have probing for NAPs configured with each IP as the socket.
So, in each machine i have this configuration :
listen=udp:HA_Address1 listen=udp:HA_Address2
NAP 1 being probed from socket HA_Address1 NAP 1 being probed from socket HA_Address2
I also have /proc/sys/net/ipv4/ip_nonlocal_bind with value 1.
Everything works correctly with this configuration. However when the probing is sent for the NAP' my logs get filled with the same error messages.
udp_send(): sendto(sock, buf: 0x7f2d4c91fa18, len: 340, 0, dst: (xxx.xxx.xxx.xxx:xxx), tolen: 16) - err: Invalid argument (22) CRITICAL: <core> [core/udp_server.c:602]: udp_send(): invalid sendtoparameters#012one possible reason is the server is bound to localhost and#012attempts to send to the net ERROR: tm [../../core/forward.h:219]: msg_send_buffer(): udp_send failed
The error happens because it is trying to probe a NAP using a socket that isn't active at the moment in the machine.
Is there a way for this error not to be logged or be disabled without reducing Log Level to suppress CRITICAL errors? I think this is a standard High Availability configuration. Is there some setting that can disable this kind of errors?
Best Regards,
Duarte Rocha _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Thank you for your answer.
I forgot to mention, the Probing is being done by the dispatcher module and this is a Kamailio that works without registration
A quarta, 8/05/2019, 13:04, Duarte Rocha duarterocha91@gmail.com escreveu:
Greetings,
I have two Machines with Kamailio in a High Availability (HA) configuration. Both machines are active and processing calls and both have one HA IP that can jump to the other machine in case of failure.
I also have probing for NAPs configured with each IP as the socket.
So, in each machine i have this configuration :
listen=udp:HA_Address1 listen=udp:HA_Address2
NAP 1 being probed from socket HA_Address1 NAP 1 being probed from socket HA_Address2
I also have /proc/sys/net/ipv4/ip_nonlocal_bind with value 1.
Everything works correctly with this configuration. However when the probing is sent for the NAP' my logs get filled with the same error messages.
udp_send(): sendto(sock, buf: 0x7f2d4c91fa18, len: 340, 0, dst: (xxx.xxx.xxx.xxx:xxx), tolen: 16) - err: Invalid argument (22) CRITICAL: <core> [core/udp_server.c:602]: udp_send(): invalid sendtoparameters#012one possible reason is the server is bound to localhost and#012attempts to send to the net ERROR: tm [../../core/forward.h:219]: msg_send_buffer(): udp_send failed
The error happens because it is trying to probe a NAP using a socket that isn't active at the moment in the machine.
Is there a way for this error not to be logged or be disabled without reducing Log Level to suppress CRITICAL errors? I think this is a standard High Availability configuration. Is there some setting that can disable this kind of errors?
Best Regards,
Duarte Rocha
Hello,
you can give each Kamailio an own address on top of the HA addresses and setup dispatcher in config to use this address on default for probing. Small benefit: even if both HA addresses are running on one node only, pinging is still working.
https://kamailio.org/docs/modules/5.2.x/modules/dispatcher.html#dispatcher.p...
Instance 1: listen=udp:Node1 listen=udp:HA_Address1 listen=udp:HA_Address2 modparam("dispatcher", "ds_default_socket", "udp:Node1")
Instance 2: listen=udp:Node2 listen=udp:HA_Address1 listen=udp:HA_Address2 modparam("dispatcher", "ds_default_socket", "udp:Node2")
BR Arnd
On Mi, Mai 08, 2019 um 12:23:21, Duarte Rocha wrote:
Thank you for your answer.
I forgot to mention, the Probing is being done by the dispatcher module and this is a Kamailio that works without registration
A quarta, 8/05/2019, 13:04, Duarte Rocha duarterocha91@gmail.com escreveu:
Greetings,
I have two Machines with Kamailio in a High Availability (HA) configuration. Both machines are active and processing calls and both have one HA IP that can jump to the other machine in case of failure.
I also have probing for NAPs configured with each IP as the socket.
So, in each machine i have this configuration :
listen=udp:HA_Address1 listen=udp:HA_Address2
NAP 1 being probed from socket HA_Address1 NAP 1 being probed from socket HA_Address2
I also have /proc/sys/net/ipv4/ip_nonlocal_bind with value 1.
Everything works correctly with this configuration. However when the probing is sent for the NAP' my logs get filled with the same error messages.
udp_send(): sendto(sock, buf: 0x7f2d4c91fa18, len: 340, 0, dst: (xxx.xxx.xxx.xxx:xxx), tolen: 16) - err: Invalid argument (22) CRITICAL: <core> [core/udp_server.c:602]: udp_send(): invalid sendtoparameters#012one possible reason is the server is bound to localhost and#012attempts to send to the net ERROR: tm [../../core/forward.h:219]: msg_send_buffer(): udp_send failed
The error happens because it is trying to probe a NAP using a socket that isn't active at the moment in the machine.
Is there a way for this error not to be logged or be disabled without reducing Log Level to suppress CRITICAL errors? I think this is a standard High Availability configuration. Is there some setting that can disable this kind of errors?
Best Regards,
Duarte Rocha
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hello Arnd,
Thank you for answering me
That would be a solution but i can't use it since i need to be able to specify sockets on a per Nap basis. My listen config has more addresses than those mentioned by me and the sockets are part of the NAP identification.
The best way to solve this would be something to suppress the error i think.
A quarta, 8/05/2019, 13:04, Duarte Rocha duarterocha91@gmail.com escreveu:
Greetings,
I have two Machines with Kamailio in a High Availability (HA) configuration. Both machines are active and processing calls and both have one HA IP that can jump to the other machine in case of failure.
I also have probing for NAPs configured with each IP as the socket.
So, in each machine i have this configuration :
listen=udp:HA_Address1 listen=udp:HA_Address2
NAP 1 being probed from socket HA_Address1 NAP 1 being probed from socket HA_Address2
I also have /proc/sys/net/ipv4/ip_nonlocal_bind with value 1.
Everything works correctly with this configuration. However when the probing is sent for the NAP' my logs get filled with the same error messages.
udp_send(): sendto(sock, buf: 0x7f2d4c91fa18, len: 340, 0, dst: (xxx.xxx.xxx.xxx:xxx), tolen: 16) - err: Invalid argument (22) CRITICAL: <core> [core/udp_server.c:602]: udp_send(): invalid sendtoparameters#012one possible reason is the server is bound to localhost and#012attempts to send to the net ERROR: tm [../../core/forward.h:219]: msg_send_buffer(): udp_send failed
The error happens because it is trying to probe a NAP using a socket that isn't active at the moment in the machine.
Is there a way for this error not to be logged or be disabled without reducing Log Level to suppress CRITICAL errors? I think this is a standard High Availability configuration. Is there some setting that can disable this kind of errors?
Best Regards,
Duarte Rocha
You could also activate/deactivate probing via RPC interface on failover.
I think, that suppressing the error messages would require patching the code or setup some kind of filter in syslog or something similiar.
On Mi, Mai 08, 2019 um 12:42:47, Duarte Rocha wrote:
Hello Arnd,
Thank you for answering me
That would be a solution but i can't use it since i need to be able to specify sockets on a per Nap basis. My listen config has more addresses than those mentioned by me and the sockets are part of the NAP identification.
The best way to solve this would be something to suppress the error i think.
A quarta, 8/05/2019, 13:04, Duarte Rocha duarterocha91@gmail.com escreveu:
Greetings,
I have two Machines with Kamailio in a High Availability (HA) configuration. Both machines are active and processing calls and both have one HA IP that can jump to the other machine in case of failure.
I also have probing for NAPs configured with each IP as the socket.
So, in each machine i have this configuration :
listen=udp:HA_Address1 listen=udp:HA_Address2
NAP 1 being probed from socket HA_Address1 NAP 1 being probed from socket HA_Address2
I also have /proc/sys/net/ipv4/ip_nonlocal_bind with value 1.
Everything works correctly with this configuration. However when the probing is sent for the NAP' my logs get filled with the same error messages.
udp_send(): sendto(sock, buf: 0x7f2d4c91fa18, len: 340, 0, dst: (xxx.xxx.xxx.xxx:xxx), tolen: 16) - err: Invalid argument (22) CRITICAL: <core> [core/udp_server.c:602]: udp_send(): invalid sendtoparameters#012one possible reason is the server is bound to localhost and#012attempts to send to the net ERROR: tm [../../core/forward.h:219]: msg_send_buffer(): udp_send failed
The error happens because it is trying to probe a NAP using a socket that isn't active at the moment in the machine.
Is there a way for this error not to be logged or be disabled without reducing Log Level to suppress CRITICAL errors? I think this is a standard High Availability configuration. Is there some setting that can disable this kind of errors?
Best Regards,
Duarte Rocha
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users