[OpenSIPS-Users] opensips-cli error

Mark Farmer farmorg at gmail.com
Tue May 21 07:17:11 EDT 2019


Yes. (I have my sources in /usr/local/src/)

locate opensips-cli | grep usr/local | grep -v src
/usr/local/bin/opensips-cli
/usr/local/lib/python3.6/dist-packages/opensipscli-0.1-py3.6.egg/EGG-INFO/scripts/opensips-cli

I'm also seeing other issues, perhaps they are related.

There seems to be an issue accessing the history file when configured
as ~/.opensips-cli.history
If I set it to /root/.opensips-cli.history it seems to work OK.

Also, when I run 'diagnose' I get the following. Setting the history file
as above makes the 3rd traceback at the bottom go away.

Worker Capacity: OK
Shared Memory:   OK
Traceback (most recent call last):
  File "/usr/lib/python3.6/cmd.py", line 214, in onecmd
    func = getattr(self, 'do_' + cmd)
AttributeError: 'OpenSIPSCLIShell' object has no attribute 'do_diagnose'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "bin/opensips-cli", line 9, in <module>
    run_console()
  File "bin/opensips-cli", line 6, in run_console
    main.main()
  File "/usr/local/lib/python3.6/dist-packages/opensipscli/main.py", line
78, in main
    sys.exit(shell.cmdloop())
  File "/usr/local/lib/python3.6/dist-packages/opensipscli/cli.py", line
203, in cmdloop
    super(OpenSIPSCLIShell, self).cmdloop(intro='')
  File "/usr/lib/python3.6/cmd.py", line 138, in cmdloop
    stop = self.onecmd(line)
  File "/usr/lib/python3.6/cmd.py", line 216, in onecmd
    return self.default(line)
  File "/usr/local/lib/python3.6/dist-packages/opensipscli/cli.py", line
301, in default
    self.run_command(module, cmd, params)
  File "/usr/local/lib/python3.6/dist-packages/opensipscli/cli.py", line
290, in run_command
    return mod[0].__invoke__(cmd, params)
  File
"/usr/local/lib/python3.6/dist-packages/opensipscli/modules/diagnose.py",
line 991, in __invoke__
    return self.diagnosis_summary()
  File
"/usr/local/lib/python3.6/dist-packages/opensipscli/modules/diagnose.py",
line 815, in diagnosis_summary
    if not self.diagnosis_summary_loop():
  File
"/usr/local/lib/python3.6/dist-packages/opensipscli/modules/diagnose.py",
line 878, in diagnosis_summary_loop
    used = int(stats['pkmem:{}-real_used_size'.format(proc)])
KeyError: 'pkmem:7-real_used_size'
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/opensipscli/cli.py", line
150, in history_write
    readline.write_history_file(history_file)
FileNotFoundError: [Errno 2] No such file or directory

Ubuntu 18.04.2

OpenSIPS CLI 0.1

opensips -V
version: opensips 3.0.0-beta (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, Q_MALLOC,
F_MALLOC, HP_MALLOC, DBG_MALLOC, CC_O0, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
poll method support: poll, epoll, sigio_rt, select.
git revision: 5561528a2
main.c compiled on 11:16:01 May 20 2019 with gcc 7

Regards
Mark.

On Tue, 21 May 2019 at 12:08, Liviu Chircu <liviu at opensips.org> wrote:

> Did you install it to /usr/local/lib/python3.6 as per the last command
> in the
> install instructions[1]?  You can confirm this with:
>
> $ locate opensips-cli | grep usr/local
> /usr/local/bin/opensips-cli
>
> /usr/local/lib/python3.6/dist-packages/opensipscli-0.1-py3.6.egg/EGG-INFO/scripts/opensips-cli
>
> [1]: https://github.com/opensips/opensips-cli#install
>
> Liviu Chircu
> OpenSIPS Developer
> http://www.opensips-solutions.com
>
> On 21.05.2019 13:28, Mark Farmer wrote:
> > Hi Liviu
> >
> > Thanks for the fast response!
> > I tried both solutions but only "python3 bin/opensips-cli" from the
> > source directory worked.
> >
> > I tried opensips-cli -f /etc/opensips-cli.cfg from /root as root & got
> > the same error.
> >
> > HTH
> > Mark.
>


-- 
Mark Farmer
farmorg at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190521/4823b4b6/attachment-0001.html>


More information about the Users mailing list