[OpenSIPS-Users] OpenSIPS 3 - can't create database

Callum Guy callum.guy at x-on.co.uk
Tue Jun 18 03:31:59 EDT 2019


Hi David,

This seems to be a database collation issue - did you create the database
manually and do you have the option to change the charset?

https://stackoverflow.com/questions/1814532/1071-specified-key-was-too-long-max-key-length-is-767-bytes

Not sure what the correct options would be for you however I am sure you
can work that out :)

Good luck!

On Tue, 18 Jun 2019 at 03:59, David Villasmil <
david.villasmil.work at gmail.com> wrote:

> Hello guys,
>
> When executing `create database` with opensips-cli i'm getting:
>
> root at opensip1:~# opensips-cli
> mysql://opensips:password@127.0.0.1
> Welcome to OpenSIPS Command Line Interface!
> (opensips-cli): database create
> Please provide us the URL of the database: mysql://opensips:password@
> 127.0.0.1
> Create [a]ll tables or just the [c]urrently configured ones? (Default
> value is a): a
> Creating all tables ...
> Running standard-create.sql...
> Running cachedb_sql-create.sql...
> ERROR: Error closing cursor
> Traceback (most recent call last):
>   File "/usr/lib/python3.5/cmd.py", line 214, in onecmd
>     func = getattr(self, 'do_' + cmd)
> AttributeError: 'OpenSIPSCLIShell' object has no attribute 'do_database'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File
> "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/base.py",
> line 1333, in _safe_close_cursor
>     cursor.close()
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 86, in close
>     while self.nextset():
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 136, in nextset
>     nr = db.next_result()
> MySQLdb._exceptions.OperationalError: (1071, 'Specified key was too long;
> max key length is 767 bytes')
> ERROR: Error closing cursor
> Traceback (most recent call last):
>   File "/usr/lib/python3.5/cmd.py", line 214, in onecmd
>     func = getattr(self, 'do_' + cmd)
> AttributeError: 'OpenSIPSCLIShell' object has no attribute 'do_database'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File
> "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/base.py",
> line 1333, in _safe_close_cursor
>     cursor.close()
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 86, in close
>     while self.nextset():
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 136, in nextset
>     nr = db.next_result()
> MySQLdb._exceptions.OperationalError: (1071, 'Specified key was too long;
> max key length is 767 bytes')
> Running tracer-create.sql...
> Running rtpengine-create.sql...
> Running rls-create.sql...
> ERROR: Error closing cursor
> Traceback (most recent call last):
>   File "/usr/lib/python3.5/cmd.py", line 214, in onecmd
>     func = getattr(self, 'do_' + cmd)
> AttributeError: 'OpenSIPSCLIShell' object has no attribute 'do_database'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File
> "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/base.py",
> line 1333, in _safe_close_cursor
>     cursor.close()
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 86, in close
>     while self.nextset():
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 136, in nextset
>     nr = db.next_result()
> MySQLdb._exceptions.OperationalError: (1071, 'Specified key was too long;
> max key length is 767 bytes')
> ERROR: Error closing cursor
> Traceback (most recent call last):
>   File "/usr/lib/python3.5/cmd.py", line 214, in onecmd
>     func = getattr(self, 'do_' + cmd)
> AttributeError: 'OpenSIPSCLIShell' object has no attribute 'do_database'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File
> "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/base.py",
> line 1333, in _safe_close_cursor
>     cursor.close()
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 86, in close
>     while self.nextset():
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 136, in nextset
>     nr = db.next_result()
> MySQLdb._exceptions.OperationalError: (1071, 'Specified key was too long;
> max key length is 767 bytes')
> Running closeddial-create.sql...
> Running userblacklist-create.sql...
> Running rtpproxy-create.sql...
> Running call_center-create.sql...
> Running presence-create.sql...
> ERROR: Error closing cursor
> Traceback (most recent call last):
>   File "/usr/lib/python3.5/cmd.py", line 214, in onecmd
>     func = getattr(self, 'do_' + cmd)
> AttributeError: 'OpenSIPSCLIShell' object has no attribute 'do_database'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File
> "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/base.py",
> line 1333, in _safe_close_cursor
>     cursor.close()
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 86, in close
>     while self.nextset():
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 136, in nextset
>     nr = db.next_result()
> MySQLdb._exceptions.OperationalError: (1071, 'Specified key was too long;
> max key length is 767 bytes')
> ERROR: Error closing cursor
> Traceback (most recent call last):
>   File "/usr/lib/python3.5/cmd.py", line 214, in onecmd
>     func = getattr(self, 'do_' + cmd)
> AttributeError: 'OpenSIPSCLIShell' object has no attribute 'do_database'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File
> "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/base.py",
> line 1333, in _safe_close_cursor
>     cursor.close()
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 86, in close
>     while self.nextset():
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 136, in nextset
>     nr = db.next_result()
> MySQLdb._exceptions.OperationalError: (1071, 'Specified key was too long;
> max key length is 767 bytes')
> Running alias_db-create.sql...
> Running carrierroute-create.sql...
> Running imc-create.sql...
> Running tls_mgm-create.sql...
> Running avpops-create.sql...
> Running load_balancer-create.sql...
> Running registrant-create.sql...
> ERROR: Error closing cursor
> Traceback (most recent call last):
>   File "/usr/lib/python3.5/cmd.py", line 214, in onecmd
>     func = getattr(self, 'do_' + cmd)
> AttributeError: 'OpenSIPSCLIShell' object has no attribute 'do_database'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File
> "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/base.py",
> line 1333, in _safe_close_cursor
>     cursor.close()
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 86, in close
>     while self.nextset():
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 136, in nextset
>     nr = db.next_result()
> MySQLdb._exceptions.OperationalError: (1071, 'Specified key was too long;
> max key length is 767 bytes')
> ERROR: Error closing cursor
> Traceback (most recent call last):
>   File "/usr/lib/python3.5/cmd.py", line 214, in onecmd
>     func = getattr(self, 'do_' + cmd)
> AttributeError: 'OpenSIPSCLIShell' object has no attribute 'do_database'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File
> "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/base.py",
> line 1333, in _safe_close_cursor
>     cursor.close()
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 86, in close
>     while self.nextset():
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 136, in nextset
>     nr = db.next_result()
> MySQLdb._exceptions.OperationalError: (1071, 'Specified key was too long;
> max key length is 767 bytes')
> Running b2b_sca-create.sql...
> Running clusterer-create.sql...
> Running acc-create.sql...
> Running usrloc-create.sql...
> Running cpl-create.sql...
> Running b2b-create.sql...
> Running freeswitch_scripting-create.sql...
> Running auth_db-create.sql...
> Running emergency-create.sql...
> Running dialplan-create.sql...
> Running domain-create.sql...
> Running speeddial-create.sql...
> Running drouting-create.sql...
> Running domainpolicy-create.sql...
> ERROR: Error closing cursor
> Traceback (most recent call last):
>   File "/usr/lib/python3.5/cmd.py", line 214, in onecmd
>     func = getattr(self, 'do_' + cmd)
> AttributeError: 'OpenSIPSCLIShell' object has no attribute 'do_database'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File
> "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/base.py",
> line 1333, in _safe_close_cursor
>     cursor.close()
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 86, in close
>     while self.nextset():
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 136, in nextset
>     nr = db.next_result()
> MySQLdb._exceptions.OperationalError: (1071, 'Specified key was too long;
> max key length is 767 bytes')
> ERROR: Error closing cursor
> Traceback (most recent call last):
>   File "/usr/lib/python3.5/cmd.py", line 214, in onecmd
>     func = getattr(self, 'do_' + cmd)
> AttributeError: 'OpenSIPSCLIShell' object has no attribute 'do_database'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File
> "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/base.py",
> line 1333, in _safe_close_cursor
>     cursor.close()
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 86, in close
>     while self.nextset():
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 136, in nextset
>     nr = db.next_result()
> MySQLdb._exceptions.OperationalError: (1071, 'Specified key was too long;
> max key length is 767 bytes')
> Running permissions-create.sql...
> Running smpp-create.sql...
> ERROR: Error closing cursor
> Traceback (most recent call last):
>   File "/usr/lib/python3.5/cmd.py", line 214, in onecmd
>     func = getattr(self, 'do_' + cmd)
> AttributeError: 'OpenSIPSCLIShell' object has no attribute 'do_database'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File
> "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/base.py",
> line 1333, in _safe_close_cursor
>     cursor.close()
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 86, in close
>     while self.nextset():
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 136, in nextset
>     nr = db.next_result()
> MySQLdb._exceptions.OperationalError: (1071, 'Specified key was too long;
> max key length is 767 bytes')
> ERROR: Error closing cursor
> Traceback (most recent call last):
>   File "/usr/lib/python3.5/cmd.py", line 214, in onecmd
>     func = getattr(self, 'do_' + cmd)
> AttributeError: 'OpenSIPSCLIShell' object has no attribute 'do_database'
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File
> "/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/base.py",
> line 1333, in _safe_close_cursor
>     cursor.close()
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 86, in close
>     while self.nextset():
>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
> 136, in nextset
>     nr = db.next_result()
> MySQLdb._exceptions.OperationalError: (1071, 'Specified key was too long;
> max key length is 767 bytes')
> Running fraud_detection-create.sql...
> Running dispatcher-create.sql...
> Running msilo-create.sql...
> Running group-create.sql...
> Running dialog-create.sql...
> The 'opensips' database has been successfully created!
>
>
> Regards,
>
> David Villasmil
> email: david.villasmil.work at gmail.com
> phone: +34669448337
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

-- 





*0333 332 0000  |  www.x-on.co.uk <http://www.x-on.co.uk>  |   ** 
<https://www.linkedin.com/company/x-on>   <https://www.facebook.com/XonTel> 
  <https://twitter.com/xonuk> *


X-on
is a trading name of Storacall 
Technology Ltd a limited company registered in
England and Wales.


Registered Office : Avaland House, 110 London Road, Apsley, Hemel 
Hempstead,
Herts, HP3 9SD. Company Registration No. 2578478.

The 
information in this e-mail is confidential and for use by the addressee(s)

only. If you are not the intended recipient, please notify X-on immediately 
on +44(0)333 332 0000 and delete the
message from your computer. If you are 
not a named addressee you must not use,
disclose, disseminate, distribute, 
copy, print or reply to this email. Views
or opinions expressed by an 
individual
within this email may not necessarily
reflect the views of X-on 
or its associated companies. Although X-on routinely
screens for viruses, 
addressees should scan this email and any attachments
for
viruses. X-on 
makes no representation or warranty as to the absence of viruses
in this 
email or any attachments.










-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190618/eb975d4a/attachment-0001.html>


More information about the Users mailing list