<div dir="ltr">Hi Henning<div><br></div><div>Thanks for the reply. </div><div>We tried as you suggested but it is not working. Also our main issue is to sync data on startup. In case of the proxy (Receiver) service has rebooted then it should replicate the data from the main server, it is not working now.</div><div><br></div><div>Please let me know what we can do to make it working?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 7, 2021 at 1:29 AM Henning Westerholt <<a href="mailto:hw@gilawa.com">hw@gilawa.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="DE" style="overflow-wrap: break-word;">
<div class="gmail-m_8272367924866220483WordSection1">
<p class="MsoNormal"><span>Hello,<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">if you want to use DMQ for synchronizing usrloc information, I think just calling dmq_handling_message() is enough. The save() call in the Server 1 (proxy) should not be necessary.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Try to deactivate it and see if it still synchronizing (e.g. by looking with ngrep for KDMQ messages). If not, there is a problem with the DMQ cluster, which would explain also the missing
 sync on startup.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Cheers,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Henning<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">-- <u></u>
<u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Henning Westerholt –
</span><span><a href="https://skalatan.de/blog/" target="_blank"><span lang="EN-GB" style="color:rgb(5,99,193)">https://skalatan.de/blog/</span></a></span><span lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Kamailio services –
</span><span><a href="https://gilawa.com/" target="_blank"><span lang="EN-GB" style="color:rgb(5,99,193)">https://gilawa.com</span></a></span><span lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm">
<p class="MsoNormal" style="margin-left:35.4pt"><b>From:</b> sr-dev <<a href="mailto:sr-dev-bounces@lists.kamailio.org" target="_blank">sr-dev-bounces@lists.kamailio.org</a>>
<b>On Behalf Of </b>Hardik Patel<br>
<b>Sent:</b> Wednesday, November 3, 2021 4:11 PM<br>
<b>To:</b> <a href="mailto:sr-dev@lists.kamailio.org" target="_blank">sr-dev@lists.kamailio.org</a><br>
<b>Subject:</b> [sr-dev] DMQ userloc data not replicated after restarting the receiver service.<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><u></u> <u></u></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Hello Team,<br>
<br>
We are using Kamailio 5.5.2 (DMQ + usrloc) modules. We want to replicate all users from server-2(Registration) to server-1(Proxy) .<br>
<br>
Replication worked perfectly fine but we noticed that after restarting the receiver (Proxy node) data has not been replicated automatically. If we re-register the users it is replicating to the receiver side but the old data is not replicated.<br>
<br>
Can you please guide us where we made the mistake?<br>
<br>
Please find the configuration<br>
<br>
<br>
SERVER-1 (Proxy)<br>
========================<br>
<br>
#--- dmq db param ----<br>
modparam("dmq","server_address","sip:<a href="http://10.128.77.187:5060" target="_blank">10.128.77.187:5060</a>")<br>
modparam("dmq", "notification_address", "sip:<a href="http://10.128.77.188:5060" target="_blank">10.128.77.188:5060</a>")<br>
modparam("dmq", "num_workers", 6)<br>
modparam("dmq", "multi_notify", 1)<br>
#modparam("dmq", "worker_usleep", 0)<br>
modparam("dmq", "ping_interval", 60)<br>
<br>
#--- dmq usrloc db param ----<br>
modparam("dmq_usrloc", "enable", 1)<br>
modparam("dmq_usrloc", "replicate_socket_info", 1)<br>
modparam("dmq_usrloc", "sync", 1)<br>
modparam("dmq_usrloc", "batch_size", 2000)<br>
modparam("dmq_usrloc", "batch_usleep", 1000)<br>
<br>
route[KMDQ_SAVE_LOCATION] {<br>
<br>
        if(is_method("KDMQ")) {<br>
                dmq_handle_message();<br>
        }<br>
        if (dmq_is_from_node()) {<br>
                if(!save("location"))<br>
                        xlogl("L_ERR", "Error saving contact\n");<br>
        }<br>
}<br>
<br>
SERVER-2 (Registration)<br>
======================<br>
<br>
#--- dmq db param ----<br>
modparam("dmq","server_address","sip:<a href="http://10.128.77.188:5060" target="_blank">10.128.77.188:5060</a>")<br>
modparam("dmq", "notification_address", "sip:<a href="http://10.128.77.187:5060" target="_blank">10.128.77.187:5060</a>")<br>
modparam("dmq", "num_workers", 6)<br>
modparam("dmq", "multi_notify", 1)<br>
modparam("dmq", "ping_interval", 60)<br>
<br>
#--- dmq usrloc db param ----<br>
modparam("dmq_usrloc", "enable", 1)<br>
modparam("dmq_usrloc", "replicate_socket_info", 1)<br>
modparam("dmq_usrloc", "sync", 1)<br>
modparam("dmq_usrloc", "batch_size", 2000)<br>
modparam("dmq_usrloc", "batch_usleep", 1000)<br>
<br>
route[SAVE_LOCATION]{<br>
        save("location");<br>
}<br>
<br>
<br>
version: kamailio 5.5.2 (x86_64/linux) e2b6cc<br>
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, 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<br>
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB<br>
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.<br>
id: e2b6cc <u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><u></u> <u></u></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt">-- <u></u><u></u></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Hardik Patel<u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><u></u> <u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Hardik Patel<div><br></div></div></div></div></div>