[OpenSIPS-Users] Issues running opensips with load balancer.
Răzvan Crainea
razvan at opensips.org
Mon May 15 03:57:37 EDT 2017
Hi, Ravitez!
You have my answers inline.
Best regards,
Răzvan Crainea
OpenSIPS Solutions
www.opensips-solutions.com
On 05/14/2017 12:01 AM, Ravitez Ravi wrote:
> Hi All,
>
> I’m trying to run opensips with load balancer module but it fails to
> come up. Below are details of what I have done and been trying. My
> questions are in */bold italics and highlighted in yellow/*. Request
> you to take a look and help.
>
> *_Objective:_* Install OpenSIPS 1.11.10 with TLS on RHEL 6.5 for load
> balancing SIP traffic
>
> *_Procedure followed:_*
>
> 1.Download and install OpenSIPS1.11.10 on RHEL 6.5 with default
> configuration:
>
> a.Downloaded
> http://opensips.org/pub/opensips/1.11.10/opensips-1.11.10-tls.tar.gz
>
> b.Un-tar and un-zip the downloaded file
>
> c.Go to opensips-1.11.10-tls folder, ran make menuconfig, select
> Compile And Install OpenSIPS and followed by Exit & Save All Changes
>
> d.Run opensips on command line, ensure the opensips process is running
> using ‘ps -ef | grep opensips’ command and stop the process using
> ‘killall opensips’
>
> 2.Get necessary dependencies straightened out for load balancer as
> mentioned in section 1.4 in
> http://www.opensips.org/html/docs/modules/1.11.x/load_balancer.html
>
> a.The section lists the following OpenSIPS modules: i) /Dialog/ –
> Dialog module, ii) /Dialog/ – TM module, iii) /database/ – one of the
> DB modules.
>
> b.I did not see any specific dialog module either in Configure Compile
> Flags or Configure Excluded Modules, however, I could see
> /usr/local/lib64/opensips/modules/dialog.so and assumed this is the
> intended module. */Not sure if it covers both Dialog and TM. Please
> clarify./*
>
dialog.so only covers the dialog module. tm.so implements the
transaction module, so in your config you have to compile and load both
modules. If you are not doing any custom compile & install, these two
modules are built and installed by default.
>
> *//*
>
> c.I selected db_mysql from Configure Excluded Modules and got a
> message “You have enabled the 'db_mysql' module, so please install '
> development libraries of mysql-client , typically libmysqlclient-dev'”
> while saving. I could not find the RPM for RHEL. The closed I could
> find is libmysqlclient16-devel-5.1.69-1.w6.x86_64.rpm which fails to
> get installed. */Am I in right path here? Please advise./*
>
Try to install mysql-devel. This package should provide all the
development libraries for mysql. libmysqlclient-devel is used on a
debian system.
>
> d.I was following an example mentioned section 3.2 in
> http://www.opensips.org/Documentation/Tutorials-LoadBalancing.
>
> The section shows following modules to be loaded:
>
> loadmodule "modules/maxfwd/maxfwd.so"
>
> loadmodule "modules/sl/sl.so"
>
> loadmodule "modules/db_mysql/db_mysql.so"
>
> loadmodule "modules/tm/tm.so"
>
> loadmodule "modules/xlog/xlog.so"
>
> loadmodule "modules/uri/uri.so"
>
> loadmodule "modules/rr/rr.so"
>
> loadmodule "modules/dialog/dialog.so"
>
> loadmodule "modules/mi_fifo/mi_fifo.so"
>
> loadmodule "modules/mi_xmlrpc/mi_xmlrpc.so"
>
> loadmodule "modules/signaling/signaling.so"
>
> loadmodule "modules/textops/textops.so"
>
> loadmodule "modules/load_balancer/load_balancer.so"
>
> However, the sub-directories mentioned in above list is not seen on my
> file system after OpenSIPS installation, yet I see some of the above
> list shared libraries under /usr/local/lib64/opensips/modules. */Hope
> this is ok./*
>
That example is relative to the sources code. In your setup you should
either set the default path to the modules (using mpath), or specify the
full path of the so. I guess you've done the second thing, which should
be ok.
>
> e.The defaults opensips.cfg provided includes most of the above listed
> modules, but the below libraries were missing which are needed for
> load balancer:
>
> loadmodule "modules/dialog.so"
>
> loadmodule "modules/textops.so"
>
> loadmodule "modules/load_balancer/load_balancer.so"
>
> loadmodule "modules/db_mysql/db_mysql.so"
>
> loadmodule "modules/xlog/xlog.so"
>
> loadmodule "modules/mi_xmlrpc/mi_xmlrpc.so
>
> I was able to successfully start opensips after loading dialog.so and
> textops.so, however, opensips refuses to start when I load
> load_balancer.so with following error:
>
> May 13 16:40:18 kuat opensips: INFO:core:shm_mem_init: allocating SHM
> block
>
> May 13 16:40:18 kuat opensips[22969]: NOTICE:core:main: version:
> opensips 1.11.10-tls (x86_64/linux)
>
> May 13 16:40:18 kuat opensips[22969]: INFO:core:main: using 32 Mb
> shared memory
>
> May 13 16:40:18 kuat opensips[22969]: INFO:core:main: using 2 Mb
> private memory per process
>
> May 13 16:40:18 kuat opensips[22969]: INFO:core:evi_publish_event:
> Registered event <E_CORE_THRESHOLD(0)>
>
> May 13 16:40:18 kuat opensips[22969]: INFO:core:evi_publish_event:
> Registered event <E_CORE_SHM_THRESHOLD(1)>
>
> May 13 16:40:18 kuat opensips[22969]: INFO:core:evi_publish_event:
> Registered event <E_CORE_PKG_THRESHOLD(2)>
>
> May 13 16:40:18 kuat opensips[22969]: NOTICE:signaling:mod_init:
> initializing module ...
>
> May 13 16:40:18 kuat opensips[22969]: INFO:sl:mod_init: Initializing
> StateLess engine
>
> May 13 16:40:18 kuat opensips[22969]: INFO:tm:mod_init: TM -
> initializing...
>
> May 13 16:40:18 kuat opensips[22969]: INFO:rr:mod_init: rr - initializing
>
> May 13 16:40:18 kuat opensips[22969]: INFO:maxfwd:mod_init:
> initializing...
>
> May 13 16:40:18 kuat opensips[22969]: INFO:sipmsgops:mod_init:
> initializing...
>
> May 13 16:40:18 kuat opensips[22969]: INFO:usrloc:ul_init_locks: locks
> array size 512
>
> May 13 16:40:18 kuat opensips[22969]: INFO:core:evi_publish_event:
> Registered event <E_UL_AOR_INSERT(3)>
>
> May 13 16:40:18 kuat opensips[22969]: INFO:core:evi_publish_event:
> Registered event <E_UL_AOR_DELETE(4)>
>
> May 13 16:40:18 kuat opensips[22969]: INFO:registrar:mod_init:
> initializing...
>
> May 13 16:40:18 kuat opensips[22969]: INFO:acc:mod_init: initializing...
>
> May 13 16:40:18 kuat opensips[22969]: INFO:core:evi_publish_event:
> Registered event <E_ACC_EVENT(5)>
>
> May 13 16:40:18 kuat opensips[22969]: INFO:core:evi_publish_event:
> Registered event <E_ACC_CDR(6)>
>
> May 13 16:40:18 kuat opensips[22969]: INFO:core:evi_publish_event:
> Registered event <E_ACC_MISSED_EVENT(7)>
>
> May 13 16:40:18 kuat opensips[22969]: INFO:dialog:mod_init: Dialog
> module - initializing
>
> May 13 16:40:18 kuat opensips[22969]: INFO:textops:mod_init:
> initializing...
>
> May 13 16:40:18 kuat opensips[22969]: INFO:load_balancer:mod_init:
> Load-Balancer module - initializing
>
> *May 13 16:40:18 kuat opensips[22969]: ERROR:load_balancer:mod_init:
> DB URL is not defined!*
>
> *May 13 16:40:18 kuat opensips[22969]: ERROR:core:init_mod: failed to
> initialize module load_balancer*
>
> *May 13 16:40:18 kuat opensips[22969]: ERROR:core:main: error while
> initializing modules*
>
> May 13 16:40:18 kuat opensips[22969]: INFO:core:cleanup: cleanup
>
> May 13 16:40:18 kuat opensips: INFO:core:daemonize: pre-daemon process
> exiting with -1
>
> */Looks like this is due to DB module. Is this correct?/*
>
Yes. Most probably you haven't complied the db_mysql module, due to the
fact that you didn't install the mysql-devel package.
>
> *//*
>
> f.I do not see following shared libraries. */Please let me know which
> modules should I load to get them./*
>
> loadmodule "modules/db_mysql/db_mysql.so"
>
This should be built and installed after installing mysql-devel package.
Also, make sure you have db_mysql selected in after you run 'make
menuconfig'.
>
> loadmodule "modules/xlog/xlog.so"
>
The xlog module no loger exists (since 1.6 I think). The functions have
been moved in opensips core.
>
> loadmodule "modules/mi_xmlrpc/mi_xmlrpc.so"
>
This module has been replaced by the mi_xmlrpc_ng module.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170515/5c5f4125/attachment-0001.html>
More information about the Users
mailing list