[OpenSIPS-Users] opensips-cli permissions problem on database creation

Jeff Pyle jeff at ugnd.org
Thu Sep 17 12:15:13 EST 2020


Hello,

I'm attempting to use opensips-cli to create the initial databases for
OpenSIPS 3.1 with opensips-cli 0.1~20200901~524c020-1 installed from
3.1-nightly.  The database is MariaDB 10.3.23-0+deb10u1 installed from the
'default-mysql-server' package.  The system is Debian 10 on a container
created with 'lxc-create', which installs very few packages by default.  I
wonder if I'm experiencing a problem a stock Debian 10 install might not be
because I'm missing something that's normally there.

opensips-cli creates the `opensips` database successfully, but then fails
to populate any of the tables.  I see the following exception:

root at opensips:~# opensips-cli -x database create
Password for admin MySQL user (root):
Traceback (most recent call last):
 File "/usr/lib/python3/dist-packages/sqlalchemy/engine/base.py", line
2228, in _wrap_pool_connect
   return fn()
 File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 365, in
unique_connection
   return _ConnectionFairy._checkout(self)
 File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 822, in
_checkout
   fairy = _ConnectionRecord.checkout(pool)
 File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 554, in
checkout
   rec = pool._do_get()
 File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 1250, in
_do_get
   self._dec_overflow()
 File "/usr/lib/python3/dist-packages/sqlalchemy/util/langhelpers.py", line
67, in __exit__
   compat.reraise(exc_type, exc_value, exc_tb)
 File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 277,
in reraise
   raise value
 File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 1247, in
_do_get
   return self._create_connection()
 File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 370, in
_create_connection
   return _ConnectionRecord(self)
 File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 499, in
__init__
   self.__connect(first_connect_check=True)
 File "/usr/lib/python3/dist-packages/sqlalchemy/pool.py", line 701, in
__connect
   connection = pool._invoke_creator(self)
 File "/usr/lib/python3/dist-packages/sqlalchemy/engine/strategies.py",
line 114, in connect
   return dialect.connect(*cargs, **cparams)
 File "/usr/lib/python3/dist-packages/sqlalchemy/engine/default.py", line
437, in connect
   return self.dbapi.connect(*cargs, **cparams)
 File "/usr/lib/python3/dist-packages/MySQLdb/__init__.py", line 86, in
Connect
   return Connection(*args, **kwargs)
 File "/usr/lib/python3/dist-packages/MySQLdb/connections.py", line 204, in
__init__
   super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (1698, "Access denied for user
'opensips'@'localhost'")

There are a few more exceptions after this but I think the key is the last
line in this one.  I checked the mysql.user table and there is no
'opensips' user, so if anything, that's failing to be created and
everything dies afterwards.

The database gets created but there are no tables in it.  I can run
'opensips-cli -x database drop' and that works alright.  I've got to be
missing something simple.


- Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200917/d11b3b29/attachment.html>


More information about the Users mailing list