[SR-Users] DMQ - Failed to get domain

Daniel W. Graham dan at cmsinter.net
Fri Sep 7 15:38:43 CEST 2018


My intent is to run in memory only except on one node which writes to database for reporting use.

If this is not possible I will use an alternate for the database host.

Just to note, same issue is present for dialog module, in this case dialogs sync fine but nothing is written to the database.
….
modparam("dialog", "enable_dmq", 1)
modparam("dialog", "db_mode", 1) ----(Set to 0 on sender)
….

Contact replication is still not working though, even with db_mode=4 on both nodes, still getting:
ERROR: dmq_usrloc [usrloc_sync.c:70]: add_contact(): Failed to get domain

# kamctl ul show
{
  "jsonrpc":  "2.0",
  "result": {
    "Domains":  []
  },
  "id": 1366
}

Send:
modparam("usrloc", "db_url", DBURL)
modparam("usrloc", "db_mode", 4)
modparam("usrloc", "use_domain", 0)
modparam("usrloc", "nat_bflag", FLB_NATB)
modparam("dmq_usrloc", "enable", 1)
modparam("dmq_usrloc", "sync", 1)

Receive:
modparam("usrloc", "db_url", DBURL)
modparam("usrloc", "db_mode", 4)
modparam("usrloc", "use_domain", 0)
modparam("dmq_usrloc", "enable", 1)
modparam("dmq_usrloc", "sync", 0)


-dan

From: sr-users <sr-users-bounces at lists.kamailio.org> On Behalf Of Charles Chance
Sent: Friday, September 7, 2018 1:27 AM
To: Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org>
Subject: Re: [SR-Users] DMQ - Failed to get domain

dmq_usrloc is designed for replication of in-memory contacts and typically removes the need for using a database altogether. If you do still have a need for the database then you probably want to be using db_mode 1 or 2 (and the same on both nodes).

I have never tried using db_mode 3 on a receiving (or any for that matter) node - can you try with an alternative mode and let me know if you still have the same issue? If the issue remains, please share your usrloc params  for both servers.

Charles

On Thu, 6 Sep 2018 at 20:23, Daniel W. Graham <dan at cmsinter.net<mailto:dan at cmsinter.net>> wrote:
dbmode = 4 on the host acting as registrar.
dbmode = 3 on the host receiving replicated usr_loc.

-dan

From: sr-users <sr-users-bounces at lists.kamailio.org<mailto:sr-users-bounces at lists.kamailio.org>> On Behalf Of Charles Chance
Sent: Thursday, September 6, 2018 3:12 PM
To: Kamailio (SER) - Users Mailing List <sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>>
Subject: Re: [SR-Users] DMQ - Failed to get domain

Hello,

On Thu, 6 Sep 2018 at 19:00, Daniel W. Graham <dan at cmsinter.net<mailto:dan at cmsinter.net>> wrote:
v 5.1.5

modparam("dmq", "server_address", "sip:x.x.x.x:5060")
modparam("dmq", "notification_address", "sip:y.y.y.y:5060")
modparam("dmq", "multi_notify", 1)
modparam("dmq", "num_workers", 2)
modparam("dmq", "worker_usleep", 0)
modparam("dmq", "ping_interval", 90)

modparam("dmq_usrloc", "enable", 1)
modparam("dmq_usrloc", "sync", 0)
modparam("dmq_usrloc", "usrloc_domain", "location")

My initial assumption was that dmq_handle_message() handled everything.


It does.

I have since added
if (dmq_is_from_node()) {
                if (!save("location")) {
                                xlogl("L_ERR", "Error saving contact\n");
                }
}


This will not work.

Now results in:

ERROR: <core> [db.c:463]: db_use_table(): invalid parameter value
ERROR: usrloc [udomain.c:631]: db_load_urecord(): failed to use table location
ERROR: <core> [db.c:463]: db_use_table(): invalid parameter value
ERROR: usrloc [ucontact.c:679]: db_insert_ucontact(): sql use_table failed
ERROR: usrloc [urecord.c:582]: insert_ucontact(): failed to insert in database


Which db_mode are you using for usrloc?


Cheers,

Charles



--
Charles Chance
Managing Director

t. 0330 120 1200    m. 07932 063 891

Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users at lists.kamailio.org<mailto:sr-users at lists.kamailio.org>
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
--
Charles Chance
Managing Director

t. 0330 120 1200    m. 07932 063 891

Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, Birmingham Science Park, Birmingham B7 4BB.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180907/d7b13038/attachment.html>


More information about the sr-users mailing list