Hi Fabian,

I guess Callum wants to use the clusterer *without* any SQL backend. Your suggestion is a workaround, to trick the start up :)

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 08/08/2018 11:43 AM, Fabian Gast wrote:
Hi,

add this:

loadmodule "db_text.so"
modparam("clusterer", "db_url", "text:///etc/opensips/db/")

In the database directory add two files
  - version ( found in sources at scripts/dbtext/opensips/version )
  - clusterer from scripts/dbtext/opensips/clusterer

Add your cluster nodes to 'clusterer' file like

id(int,auto) cluster_id(int) node_id(int) url(string) state(int) 
no_ping_retries(int) priority(int) sip_addr(string,null) flags(string,null) 
description(string,null)

1:200:1:bin\:192.168.99.201\:60200:1:3:50:NULL:NULL:node-a
2:200:2:bin\:192.168.99.202\:60200:1:3:50:NULL:NULL:node-b


Cheers,

Fabian

----- Ursprüngliche Mail -----
Von: "Callum Guy" <callum....@x-on.co.uk>
An: "OpenSIPS users mailling list" <users@lists.opensips.org>
Gesendet: Mittwoch, 8. August 2018 10:25:30
Betreff: [OpenSIPS-Users] Clusterer without a database

Hi All,
For "greater good" I thought it would be interesting to add some clusterer 
dialog replication to my OpenSIPs pair.

Specifically I am on 2.4, installed the appropriate clusterer module and 
applied the following configuration:

+# Replication listener
+listen=bin: [ http://172.18.0.112:5566/ | 172.18.0.112:5566 ]
+loadmodule "proto_bin.so"
+loadmodule "clusterer.so"
+
+# Setup replication cluster
+modparam("clusterer", "current_id", 2)
+modparam("clusterer", "db_mode", 0)
+modparam("clusterer", "current_info", "cluster_id=1, url=bin: [ 
http://172.18.0.112:5566/ | 172.18.0.112:5566 ] ") # data about this node
+modparam("clusterer", "neighbor_info", "cluster_id=1,node_id=1,url=bin: [ 
http://172.18.0.111:5566/ | 172.18.0.111:5566 ] ") # data about other node
+modparam("dialog", "dialog_replication_cluster", 1)
+modparam("dialog", "profile_replication_cluster", 1)

Once configured I attempted to start the service only to discover that 
clusterer will not load without a database module. See below:

Aug 08 08:55:10 [ http://pci-fram-proxy2.x-onsecure.net/ | 
pci-fram-proxy2.x-onsecure.net ] opensips-m4cfg[30867]: Aug 8 08:55:10 [30867] 
WARNING:core:solve_module_dependencies: module clusterer depends on an sqldb 
module, but none was loaded!
Aug 08 08:55:10 [ http://pci-fram-proxy2.x-onsecure.net/ | 
pci-fram-proxy2.x-onsecure.net ] opensips-m4cfg[30867]: Aug 8 08:55:10 [30867] 
ERROR:core:main: failed to solve module dependencies

For now I have simply reverted back however I wonder if this is a user error or 
a module/documentation error?

Thanks,

Callum


_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to