### Description
Kamailio is running on 2 nodes using DMQ for HA.
Following DMQ parameters are set:
```
modparam("dmq", "server_address", "sip:LOCAL_IP:DMQ_PORT")
modparam("dmq", "notification_address",
"sip:OTHER_NODE_IP:DMQ_PORT")
modparam("dmq", "multi_notify", 0)
modparam("dmq_usrloc", "enable", 1)
modparam("dmq_usrloc", "sync", 1)
modparam("dmq_usrloc", "replicate_socket_info", 1)
modparam("dmq_usrloc", "batch_msg_contacts", 50)
modparam("dmq_usrloc", "batch_size", 10000)
modparam("dmq_usrloc", "batch_usleep", 500000)
```
If kamailio is restarted on passive instance, it tries to send keepalives for DMQ
replicated dialog, producing errors
### Troubleshooting
#### Reproduction
- Have set dialog properties "ka-src", "ka-dst":
```
if (is_method("INVITE")) {
setflag(FLT_ACC);
#!ifdef WITH_DIALOG
dlg_manage();
dlg_set_property("ka-src");
dlg_set_property("ka-dst");
#!endif
}
```
- Have calls on active instance and DMQ replicated dialogs on passive instance
```
kamcmd dlg.list
{
h_entry: 936
h_id: 7534
ref: 2
call-id: inds188n38bjr7tsa2hb
from_uri: sip:90123@10.1.2.3
to_uri: sip:0012345@10.1.2.3
state: 4
start_ts: 1734441148
init_ts: 1734441142
end_ts: 0
duration: 119
timeout: 1734484347
lifetime: 43200
dflags: 0
sflags: 0
iflags: 64
caller: {
tag: c91qu93uc5
contact: sip:hp3405ho@iacvttr6b897.invalid;transport=ws;ob;alias=10.5.6.7~39402~6
cseq: 2
route_set:
socket: <null string>
}
callee: {
tag: 32fd1f16-2fd3-4924-9423-4267871f4ea8
contact: sip:10.2.3.4:5060
cseq: 0
route_set:
socket: <null string>
}
profiles: {
}
variables: {
}
}
```
- Restart kamailio service on passive instance
#### Debugging Data
#### Log Messages
```
Dec 17 13:15:34
hostname.redacted.com docker[31099]: 45(53) WARNING: <core>
[core/msg_translator.c:3024]: via_builder(): TCP/TLS connection (id: 0) for WebSocket
could not be found
Dec 17 13:15:34
hostname.redacted.com docker[31099]: 45(53) ERROR: tm
[t_msgbuilder.c:1423]: assemble_via(): via building failed
Dec 17 13:15:34
hostname.redacted.com docker[31099]: 45(53) ERROR: tm
[t_msgbuilder.c:1614]: build_uac_req(): error while assembling Via
Dec 17 13:15:34
hostname.redacted.com docker[31099]: 45(53) ERROR: tm [uac.c:552]:
t_uac_prepare(): Error while building message
Dec 17 13:15:34
hostname.redacted.com docker[31099]: 45(53) ERROR: dialog
[dlg_req_within.c:810]: dlg_send_ka(): failed to send the OPTIONS request
Dec 17 13:15:34
hostname.redacted.com docker[31099]: 45(53) ERROR: <core>
[core/udp_server.c:810]: udp_send(): sendto(sock, buf: 0x7f3736a421b0, len: 329, 0, dst:
(10.5.2.192:5060), tolen: 16) - err: Invalid argument (22)
Dec 17 13:15:34
hostname.redacted.com docker[31099]: 45(53) CRITICAL: <core>
[core/udp_server.c:817]: udp_send(): invalid sendtoparameters
Dec 17 13:15:34
hostname.redacted.com docker[31099]: one possible reason is the server is
bound to localhost and
Dec 17 13:15:34
hostname.redacted.com docker[31099]: attempts to send to the net
Dec 17 13:15:34
hostname.redacted.com docker[31099]: 45(53) ERROR: tm
[../../core/forward.h:245]: msg_send_buffer(): udp_send failed
Dec 17 13:15:34
hostname.redacted.com docker[31099]: 45(53) ERROR: tm [uac.c:708]:
send_prepared_request_impl(): Attempt to send to precreated request failed
Dec 17 13:15:34
hostname.redacted.com docker[31099]: 34(42) ERROR: <core>
[core/udp_server.c:810]: udp_send(): sendto(sock, buf: 0x7f3736a42000, len: 329, 0, dst:
(10.5.2.192:5060), tolen: 16) - err: Invalid argument (22)
Dec 17 13:15:34
hostname.redacted.com docker[31099]: 34(42) CRITICAL: <core>
[core/udp_server.c:817]: udp_send(): invalid sendtoparameters
Dec 17 13:15:34
hostname.redacted.com docker[31099]: one possible reason is the server is
bound to localhost and
Dec 17 13:15:34
hostname.redacted.com docker[31099]: attempts to send to the net
Dec 17 13:15:34
hostname.redacted.com docker[31099]: 34(42) ERROR: tm
[../../core/forward.h:245]: msg_send_buffer(): udp_send failed
```
#### SIP Traffic
### Possible Solutions
### Additional Information
```
version: kamailio 5.8.4 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST,
DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, Q_MALLOC, F_MALLOC, TLSF_MALLOC,
DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER,
USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_BUFFER_SIZE 262144,
MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled on 13:38:04 Nov 12 2024 with gcc 13.2.1
```
* **Operating System**:
Running
https://ghcr.io/kamailio/kamailio-ci:5.8.4-alpine in docker as systemd service
```
Host system:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
uname -a
Linux _hostname redacted_ 4.4.0-1052-aws #61-Ubuntu SMP Mon Feb 12 23:05:58 UTC 2018
x86_64 x86_64 x86_64 GNU/Linux
docker -v
Docker version 20.10.7, build f0df350
```
--
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4077
You are receiving this because you are subscribed to this thread.
Message ID: <kamailio/kamailio/issues/4077(a)github.com>