[OpenSIPS-Users] opensips-cli errors
trumpetguy
trumpetguy900s at gmail.com
Fri Aug 18 02:49:59 UTC 2023
Greetings -
I recently installed Opensips v3.3 on a CentOS Linux physical server via
yum. When I attempt to create the Opensips databases using opensips-cli, I
am constantly getting errors and the databases are not created. I have
provided the screen output from running "opensips-cli -f
/etc/opensips/opensips-cli.cfg -x database create" below:
# opensips-cli -f /etc/opensips/opensips-cli.cfg -x database create
DEBUG: Loaded module 'database'
DEBUG: running in non-interactive mode database create []
DEBUG: running command 'create' '[]'
DEBUG: db_name: 'opensips'
Password for admin MySQL user (root):
DEBUG: read password: '<password>'
DEBUG: admin DB URL: 'mysql://root:<password>@localhost'
DEBUG: DB URL: 'mysql://opensips:opensipsrw@localhost'
DEBUG: connecting to mysql://root:<password>@localhost
Traceback (most recent call last):
File "/usr/lib64/python3.6/site-packages/sqlalchemy/pool.py", line 1122,
in _do_get
return self._pool.get(wait, self._timeout)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/util/queue.py", line
145, in get
raise Empty
sqlalchemy.util.queue.Empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line
2141, in _wrap_pool_connect
return fn()
File "/usr/lib64/python3.6/site-packages/sqlalchemy/pool.py", line 328,
in unique_connection
return _ConnectionFairy._checkout(self)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/pool.py", line 766,
in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/pool.py", line 516,
in checkout
rec = pool._do_get()
File "/usr/lib64/python3.6/site-packages/sqlalchemy/pool.py", line 1138,
in _do_get
self._dec_overflow()
File "/usr/lib64/python3.6/site-packages/sqlalchemy/util/langhelpers.py",
line 60, in __exit__
compat.reraise(exc_type, exc_value, exc_tb)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/util/compat.py", line
186, in reraise
raise value
File "/usr/lib64/python3.6/site-packages/sqlalchemy/pool.py", line 1135,
in _do_get
return self._create_connection()
File "/usr/lib64/python3.6/site-packages/sqlalchemy/pool.py", line 333,
in _create_connection
return _ConnectionRecord(self)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/pool.py", line 461,
in __init__
self.__connect(first_connect_check=True)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/pool.py", line 661,
in __connect
exec_once(self.connection, self)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/event/attr.py", line
246, in exec_once
self(*args, **kw)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/event/attr.py", line
256, in __call__
fn(*args, **kw)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/util/langhelpers.py",
line 1321, in go
return once_fn(*arg, **kw)
File
"/usr/lib64/python3.6/site-packages/sqlalchemy/engine/strategies.py", line
181, in first_connect
dialect.initialize(c)
File
"/usr/lib64/python3.6/site-packages/sqlalchemy/dialects/mysql/base.py",
line 1632, in initialize
default.DefaultDialect.initialize(self, connection)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/default.py",
line 249, in initialize
self.get_isolation_level(connection.connection)
File
"/usr/lib64/python3.6/site-packages/sqlalchemy/dialects/mysql/base.py",
line 1496, in get_isolation_level
cursor.execute('SELECT @@tx_isolation')
File "/usr/lib64/python3.6/site-packages/MySQLdb/cursors.py", line 255,
in execute
self.errorhandler(self, exc, value)
File "/usr/lib64/python3.6/site-packages/MySQLdb/connections.py", line
50, in defaulterrorhandler
raise errorvalue
File "/usr/lib64/python3.6/site-packages/MySQLdb/cursors.py", line 252,
in execute
res = self._query(query)
File "/usr/lib64/python3.6/site-packages/MySQLdb/cursors.py", line 378,
in _query
db.query(q)
File "/usr/lib64/python3.6/site-packages/MySQLdb/connections.py", line
280, in query
_mysql.connection.query(self, query)
_mysql_exceptions.OperationalError: (1193, "Unknown system variable
'tx_isolation'")
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/opensipscli/db.py", line 208, in
__init__
self.__conn = self.__engine.connect().\
File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line
2085, in connect
return self._connection_cls(self, **kwargs)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line
90, in __init__
if connection is not None else engine.raw_connection()
File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line
2171, in raw_connection
self.pool.unique_connection, _connection)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line
2145, in _wrap_pool_connect
e, dialect, self)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line
1456, in _handle_dbapi_exception_noconnection
exc_info
File "/usr/lib64/python3.6/site-packages/sqlalchemy/util/compat.py", line
202, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/util/compat.py", line
185, in reraise
raise value.with_traceback(tb)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/base.py", line
2141, in _wrap_pool_connect
return fn()
File "/usr/lib64/python3.6/site-packages/sqlalchemy/pool.py", line 328,
in unique_connection
return _ConnectionFairy._checkout(self)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/pool.py", line 766,
in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/pool.py", line 516,
in checkout
rec = pool._do_get()
File "/usr/lib64/python3.6/site-packages/sqlalchemy/pool.py", line 1138,
in _do_get
self._dec_overflow()
File "/usr/lib64/python3.6/site-packages/sqlalchemy/util/langhelpers.py",
line 60, in __exit__
compat.reraise(exc_type, exc_value, exc_tb)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/util/compat.py", line
186, in reraise
raise value
File "/usr/lib64/python3.6/site-packages/sqlalchemy/pool.py", line 1135,
in _do_get
return self._create_connection()
File "/usr/lib64/python3.6/site-packages/sqlalchemy/pool.py", line 333,
in _create_connection
return _ConnectionRecord(self)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/pool.py", line 461,
in __init__
self.__connect(first_connect_check=True)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/pool.py", line 661,
in __connect
exec_once(self.connection, self)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/event/attr.py", line
246, in exec_once
self(*args, **kw)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/event/attr.py", line
256, in __call__
fn(*args, **kw)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/util/langhelpers.py",
line 1321, in go
return once_fn(*arg, **kw)
File
"/usr/lib64/python3.6/site-packages/sqlalchemy/engine/strategies.py", line
181, in first_connect
dialect.initialize(c)
File
"/usr/lib64/python3.6/site-packages/sqlalchemy/dialects/mysql/base.py",
line 1632, in initialize
default.DefaultDialect.initialize(self, connection)
File "/usr/lib64/python3.6/site-packages/sqlalchemy/engine/default.py",
line 249, in initialize
self.get_isolation_level(connection.connection)
File
"/usr/lib64/python3.6/site-packages/sqlalchemy/dialects/mysql/base.py",
line 1496, in get_isolation_level
cursor.execute('SELECT @@tx_isolation')
File "/usr/lib64/python3.6/site-packages/MySQLdb/cursors.py", line 255,
in execute
self.errorhandler(self, exc, value)
File "/usr/lib64/python3.6/site-packages/MySQLdb/connections.py", line
50, in defaulterrorhandler
raise errorvalue
File "/usr/lib64/python3.6/site-packages/MySQLdb/cursors.py", line 252,
in execute
res = self._query(query)
File "/usr/lib64/python3.6/site-packages/MySQLdb/cursors.py", line 378,
in _query
db.query(q)
File "/usr/lib64/python3.6/site-packages/MySQLdb/connections.py", line
280, in query
_mysql.connection.query(self, query)
sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError)
(1193, "Unknown system variable 'tx_isolation'")
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/lib/python3.6/site-packages/opensipscli/main.py", line 78, in
main
sys.exit(shell.cmdloop())
File "/usr/lib/python3.6/site-packages/opensipscli/cli.py", line 247, in
cmdloop
ret = self.run_command(module, command, modifiers, params)
File "/usr/lib/python3.6/site-packages/opensipscli/cli.py", line 409, in
run_command
return mod[0].__invoke__(cmd, params, modifiers)
File "/usr/lib/python3.6/site-packages/opensipscli/module.py", line 36,
in __invoke__
return f(params, modifiers)
File "/usr/lib/python3.6/site-packages/opensipscli/modules/database.py",
line 598, in do_create
db = self.get_db(admin_url if engine != 'sqlite' else db_url, db_name)
File "/usr/lib/python3.6/site-packages/opensipscli/modules/database.py",
line 871, in get_db
return osdb(db_url, db_name)
File "/usr/lib/python3.6/site-packages/opensipscli/db.py", line 233, in
__init__
raise osdbError("unable to connect to the database")
opensipscli.db.osdbError: unable to connect to the database
The contents of the opensips-cli.cfg file are as follows:
[default]
database_modules: ALL
log_level: DEBUG
database_admin_url: mysql://root@localhost
database_name: opensips
database_url: mysql://opensips:opensipsrw@localhost
database_path: /usr/share/opensips/
communication_type: fifo
fifo_file: /var/run/opensips/opensips_fifo
The OS is CentOS 7 x86, and the version of MySql installed on the server
is MySQL Community Server v8.0.34.
Any advice or assistance would be greatly appreciated!
Regards,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20230817/d67e5e8e/attachment.html>
More information about the Users
mailing list