OpenSIPS / opensips-cli

OpenSIPS CLI tool - an interactive command line tool that can be used to control and monitor OpenSIPS servers.
GNU General Public License v3.0
85 stars 48 forks source link

Cannot create database on Debian 10 using repository #40

Closed sdwru closed 4 years ago

sdwru commented 4 years ago

opensips-cli installed from deb https://apt.opensips.org buster cli-nightly on Debian 10.

# opensips-cli -xd database create
DEBUG: no config file found in any of /root/.opensips-cli.cfg, /etc/opensips-cli.cfg, /etc/opensips/opensips-cli.cfg
INFO: no config file used!
DEBUG: Skipping module 'database' - excluded on purpose
DEBUG: Loaded module 'diagnose'
DEBUG: Loaded module 'instance'
DEBUG: Loaded module 'mi'
DEBUG: sent command ':opensips_fifo_reply_10860:{"jsonrpc": "2.0", "id": "18800", "method": "which", "params": []}'
DEBUG: Skipping module 'tls' - excluded on purpose
DEBUG: Loaded module 'trace'
DEBUG: Skipping module 'trap' - excluded on purpose
DEBUG: Skipping module 'user' - excluded on purpose
DEBUG: running in non-interactive mode '['database', 'create']'
ERROR: no module 'database' loaded
sdwru commented 4 years ago

The problem was because of missing dependency python3-sqlachemy-utils. I eventually found the mention of it in the database module documentation database.md. It would be nice if it was added as a dependency in the installer packages. It would have saved me a lot of time trying to troubleshoot.

liviuchircu commented 4 years ago

It seems this problem is on Debian 9 as well (cli-nightly package):

root@localhost:~# apt install opensips-cli
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  default-libmysqlclient-dev libmariadbclient-dev libmariadbclient-dev-compat libmariadbclient18 zlib1g-dev
The following NEW packages will be installed:
  default-libmysqlclient-dev libmariadbclient-dev libmariadbclient-dev-compat opensips-cli zlib1g-dev
The following packages will be upgraded:
  libmariadbclient18
1 upgraded, 5 newly installed, 0 to remove and 152 not upgraded.
Need to get 2.713 kB of archives.
After this operation, 10,7 MB of additional disk space will be used.
Do you want to continue? [Y/n]  

The python3-sqlachemy-utils package is not seen as a requirement, despite the control file lists it as a dependency, since January 4th. Perhaps @nikbyte can give some tips here?

samk-acw commented 4 years ago

This might be a separate issue but seems related - the debian repo appears have stopped working within the last few days due to broken dependencies:

The following packages have unmet dependencies:
 opensips-cli : Depends: python3-mysql but it is not installable
E: Unable to correct problems, you have held broken packages.

The python3-mysql doesn't appear to exist, seems like it should be python3-mysqldb:

apt search python3-mysql
Sorting... Done
Full Text Search... Done
python3-mysqldb/stable,now 1.3.10-2 amd64 [installed]
  Python interface to MySQL

python3-mysqldb-dbg/stable 1.3.10-2 amd64
  Python interface to MySQL (debug extension)
nikbyte commented 4 years ago

For now must be ok. Please confirm. @sdwru @samk-acw

nikbyte commented 4 years ago

I'm closing the issue. Reopen if something still required.