Dear,
I uninstalled kamcli from apt.
I followed the steps from github.
As mentionned, I am using :
- kamailio : 5.5.4
- OS : DEBIAN 11
- DB : $ mariadb --version mariadb Ver 15.1 Distrib 10.5.12-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper
The installation of mysqlclient failed :
I added this line to install it successfully.sipsecure@kamailio:/usr/local/src/kamcli$ pip3 install mysqlclient
Collecting mysqlclient
Using cached mysqlclient-2.1.0.tar.gz (87 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9tp906qi/mysqlclient_a832087cf0bf4ec4a1ed5eb85361b4cf/setup.py'"'"'; __file__='"'"'/tmp/pip-install-9tp906qi/mysqlclient_a832087cf0bf4ec4a1ed5eb85361b4cf/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-iqatd_cj
cwd: /tmp/pip-install-9tp906qi/mysqlclient_a832087cf0bf4ec4a1ed5eb85361b4cf/
Complete output (15 lines):
/bin/sh: 1: mysql_config: not found
/bin/sh: 1: mariadb_config: not found
/bin/sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-9tp906qi/mysqlclient_a832087cf0bf4ec4a1ed5eb85361b4cf/setup.py", line 15, in <module>
metadata, options = get_config()
File "/tmp/pip-install-9tp906qi/mysqlclient_a832087cf0bf4ec4a1ed5eb85361b4cf/setup_posix.py", line 70, in get_config
libs = mysql_config("libs")
File "/tmp/pip-install-9tp906qi/mysqlclient_a832087cf0bf4ec4a1ed5eb85361b4cf/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
mysql_config --version
mariadb_config --version
mysql_config --libs
----------------------------------------
And installed the rest of the packsudo apt-get install -y libmariadb-dev
sipsecure@kamailio:/usr/local/src/kamcli$ pip3 install .Then I generated the config
Processing /usr/local/src/kamcli
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: wheel in /home/sipsecure/.local/lib/python3.9/site-packages (from kamcli==3.0.0) (0.37.1)
Requirement already satisfied: tabulate in /usr/lib/python3/dist-packages (from kamcli==3.0.0) (0.8.7)
Requirement already satisfied: pygments in /home/sipsecure/.local/lib/python3.9/site-packages (from kamcli==3.0.0) (2.11.2)
Requirement already satisfied: sqlalchemy in /usr/lib/python3/dist-packages (from kamcli==3.0.0) (1.3.22)
Requirement already satisfied: pyaml in /usr/lib/python3/dist-packages (from kamcli==3.0.0) (20.4.0)
Requirement already satisfied: prompt-toolkit in /home/sipsecure/.local/lib/python3.9/site-packages (from kamcli==3.0.0) (3.0.28)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from kamcli==3.0.0) (52.0.0)
Requirement already satisfied: click in /usr/lib/python3/dist-packages (from kamcli==3.0.0) (7.1.2)
Requirement already satisfied: wcwidth in /home/sipsecure/.local/lib/python3.9/site-packages (from prompt-toolkit->kamcli==3.0.0) (0.2.5)
Building wheels for collected packages: kamcli
Building wheel for kamcli (PEP 517) ... done
Created wheel for kamcli: filename=kamcli-3.0.0-py3-none-any.whl size=64787 sha256=2ad98c7adee63827a8f9c173c34db614e6bbfb7465009a5fb60c75e1803caa76
Stored in directory: /tmp/pip-ephem-wheel-cache-q0rnj8r4/wheels/95/d2/1c/800e910cb7af55c2a3a447a5492784e261729b4f31f52bc2d5
Successfully built kamcli
Installing collected packages: kamcli
Attempting uninstall: kamcli
Found existing installation: kamcli 3.0.0
Uninstalling kamcli-3.0.0:
Successfully uninstalled kamcli-3.0.0
Successfully installed kamcli-3.0.0
sipsecure@kamailio:/usr/local/src/kamcli$ kamcli config install -u
directory /home/sipsecure/.kamcli created
config file installed to /home/sipsecure/.kamcli/kamcli.ini
sipsecure@kamailio:/$ kamcli config raw
(log):
---
[main]
domain = MYDOMAIN
[cmdaliases]
sd = speeddial
pl = pipelimit
[db]
type = mysql
driver = mysqldb
host = localhost
dbport = 3306
dbname = kamailio
dbpath = /etc/kamailio/kamailio.db
rwuser = kamailio
rwpassword = MYPASSWORD
rouser = kamailioro
ropassword = MYPASSWORD
adminuser = root
adminpassword =
rwurl = %(type)s+%(driver)s://%(rwuser)s:%(rwpassword)s@%(host)s/%(dbname)s
rourl = %(type)s+%(driver)s://%(rouser)s:%(ropassword)s@%(host)s/%(dbname)s
adminurl = %(type)s+%(driver)s://%(adminuser)s:%(adminpassword)s@%(host)s
accesshost = ????LOCALHOST????
scriptsdirectory = /usr/local/share/kamailio/mysql
outformat = table
[ctl]
type = jsonrpc
kamgroup = kamailio
[jsonrpc]
transport = socket
path = /var/run/kamailio/kamailio_rpc.fifo
rplnamebase = kamailio_rpc_reply.fifo
rpldir = /tmp
srvaddr = /var/run/kamailio/kamailio_rpc.sock
rcvaddr = /var/run/kamailio/kamailio_rpc_reply.sock
outformat = yaml
[shell]
[shell.cmdremap]
dv = db show "version"
u = uptime
[apiban]
(log):
---
sipsecure@kamailio:/$ kamcli ul showdbI can see the records.
Nothingsipsecure@kamailio:/$ kamcli ul show
I can see only this, no statistics as expected with kamctl monitor (who doesn't work)sipsecure@kamailio:/$ kamcli moni
[cycle #: 4; if constant make sure server is running]
Maybe you didn't install the config file, in the source directory of kamcli, run:
kamcli config install
You should use/install latest version kamcli.
I tried it on my debian 10 and works.
Daniel
Dear,
Yes all are available.
When using : "etc$ sudo kamcli moni" I got error.
It's look like jsonrpc issue.Best Regards,sipsecure@kamailio:/etc$ sudo kamcli moni
Traceback (most recent call last):
File "/usr/bin/kamcli", line 11, in <module>
load_entry_point('kamcli==2.0.0', 'console_scripts', 'kamcli')()
File "/usr/lib/python3/dist-packages/click/core.py", line 829, in call
return self.main(args, kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3/dist-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 610, in invoke
return callback(args, kwargs)
File "/usr/lib/python3/dist-packages/click/decorators.py", line 73, in new_func
return ctx.invoke(f, obj, *args, kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python3/dist-packages/kamcli/commands/cmd_moni.py", line 36, in cli
command_ctl(ctx, 'stats.get_statistics', slist, {"func": cmd_moni_result_print})
File "/usr/lib/python3/dist-packages/kamcli/iorpc.py", line 387, in command_ctl
if ctx.gconfig.get('jsonrpc', 'transport') == 'socket':
File "/usr/lib/python3.9/configparser.py", line 781, in get
d = self._unify_values(section, vars)
File "/usr/lib/python3.9/configparser.py", line 1149, in _unify_values
raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'jsonrpc'
On Thursday, March 17, 2022 08:34 CET, Daniel-Constantin Mierla <miconda@gmail.com> wrote:
sipsecure@kamailio:/$ kamcli ul show
Hello,
be sure the common cli tools are installed: grep, egrep, awk, sed, ... Also, it may require to use bash.
The alternative, try to use kamcli.
Cheers,
DanielOn 17.03.22 00:40, Youssef Boujraf wrote:Dear,Kamailio : 5.5.4OS : Debian 11kamailio.cfgloadmodule "kex.so" is includedOn Wednesday, March 16, 2022 13:02 CET, "Youssef Boujraf" <yboujraf@by-research.be> wrote:
Any idea what is missing in the configuration.
Best Regards,
Youssef
Dear
I am tying to monitor the kamailio with "kamctl monitor" and I got this error.Any idea-e [cycle #: 1; if constant make sure server lives]
-e Kamailio Runtime Details:
kamailio 5.5.4 (x86_64/linux)
now: Wed Mar 16 12:44:43 2022
up_since: Wed Mar 16 12:39:51 2022
uptime: 292
-e Transaction Statistics:
/usr/sbin/kamctl: 245: column: not found
-e Stateless Server Statistics:
/usr/sbin/kamctl: 259: column: not found
-e UsrLoc Statistics:
/usr/sbin/kamctl: 273: column: not found
-e Core Statistics:
/usr/sbin/kamctl: 287: column: not found
-e Shared Memory Statistics:
/usr/sbin/kamctl: 301: column: not found
Best Regards
--
Youssef__________________________________________________________ Kamailio - Users Mailing List - Non Commercial Discussions * sr-users@lists.kamailio.org Important: keep the mailing list in the recipients, do not reply only to the sender! Edit mailing list options or unsubscribe: * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users-- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - Online March 28-31, 2022 (Europe Timezone) * https://www.asipto.com/sw/kamailio-advanced-training-online/
--
Youssef
-- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio Advanced Training - Online March 28-31, 2022 (Europe Timezone) * https://www.asipto.com/sw/kamailio-advanced-training-online/