[Openstack] Designate Install SQL errors (Liberty)

Mohammed Naser mnaser at vexxhost.com
Sat Feb 6 01:28:11 UTC 2016


Does your SQL database string contain 127.0.0.1 or localhost?

https://dev.mysql.com/doc/refman/5.5/en/connecting.html

On Unix, MySQL programs treat the host name localhost specially, in a way
that is likely different from what you expect compared to other
network-based programs. For connections to localhost, MySQL programs
attempt to connect to the local server by using a Unix socket file. This
occurs even if a --port
<https://dev.mysql.com/doc/refman/5.5/en/connecting.html#option_general_port>
 or -P option is given to specify a port number. To ensure that the client
makes a TCP/IP connection to the local server, use --host
<https://dev.mysql.com/doc/refman/5.5/en/connecting.html#option_general_host>
 or -h to specify a host name value of 127.0.0.1, or the IP address or name
of the local server. You can also specify the connection protocol
explicitly, even for localhost, by using the --protocol=TCP
<https://dev.mysql.com/doc/refman/5.5/en/connecting.html#option_general_protocol>
option.
For example:


On Fri, Feb 5, 2016 at 5:01 PM, Steve Searles <SSearles at zimcom.net> wrote:

> I am having a problem with Designate when installing the DB.  Apt runs
> through the configuration portion and I receive a ECONNREFUSED when
> connecting to localhost as the mysql server.  Mysql connections work fine
> from the command line to localhost, 127.0.0.1.  Has anyone seen this
> before?
>
> dbconfig-common: writing config to
> /etc/dbconfig-common/designate-common.conf
> granting access to database designatedb for designate-common at localhost:
> success.
> verifying access for designate-common at localhost: success.
> creating database designatedb: success.
> verifying database designatedb exists: success.
> dbconfig-common: flushing administrative password
> Now doing 'designate-manage database sync': this may take a while...
> No handlers could be found for logger "oslo_config.cfg"
> 2016-02-05 16:52:29.827 3169 CRITICAL designate [designate-manage - - - -
> -] OperationalError: (pymysql.err.OperationalError) (2003, "Can't connect
> to MySQL server on 'localhost' ([Errno 111] ECONNREFUSED)")
> 2016-02-05 16:52:29.827 3169 ERROR designate Traceback (most recent call
> last):
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/bin/designate-manage", line 10, in <module>
> 2016-02-05 16:52:29.827 3169 ERROR designate     sys.exit(main())
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/designate/cmd/manage.py", line 130, in
> main
> 2016-02-05 16:52:29.827 3169 ERROR designate     fn(*fn_args)
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/designate/manage/database.py", line 63,
> in sync
> 2016-02-05 16:52:29.827 3169 ERROR designate
> get_manager().upgrade(None)
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/oslo_db/sqlalchemy/migration_cli/manager.py",
> line 65, in upgrade
> 2016-02-05 16:52:29.827 3169 ERROR designate
> results.append(plugin.upgrade(None))
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/oslo_db/sqlalchemy/migration_cli/ext_migrate.py",
> line 48, in upgrade
> 2016-02-05 16:52:29.827 3169 ERROR designate
> init_version=self.init_version)
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/oslo_db/sqlalchemy/migration.py", line
> 74, in db_sync
> 2016-02-05 16:52:29.827 3169 ERROR designate     current_version =
> db_version(engine, abs_path, init_version)
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/oslo_db/sqlalchemy/migration.py", line
> 129, in db_version
> 2016-02-05 16:52:29.827 3169 ERROR designate     meta.reflect(bind=engine)
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/schema.py", line 3594, in
> reflect
> 2016-02-05 16:52:29.827 3169 ERROR designate     with bind.connect() as
> conn:
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2018, in
> connect
> 2016-02-05 16:52:29.827 3169 ERROR designate     return
> self._connection_cls(self, **kwargs)
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 72, in
> __init__
> 2016-02-05 16:52:29.827 3169 ERROR designate     if connection is not None
> else engine.raw_connection()
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2104, in
> raw_connection
> 2016-02-05 16:52:29.827 3169 ERROR designate
> self.pool.unique_connection, _connection)
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2078, in
> _wrap_pool_connect
> 2016-02-05 16:52:29.827 3169 ERROR designate     e, dialect, self)
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1405, in
> _handle_dbapi_exception_noconnection
> 2016-02-05 16:52:29.827 3169 ERROR designate     exc_info
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 199, in
> raise_from_cause
> 2016-02-05 16:52:29.827 3169 ERROR designate     reraise(type(exception),
> exception, tb=exc_tb)
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2074, in
> _wrap_pool_connect
> 2016-02-05 16:52:29.827 3169 ERROR designate     return fn()
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 318, in
> unique_connection
> 2016-02-05 16:52:29.827 3169 ERROR designate     return
> _ConnectionFairy._checkout(self)
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 713, in
> _checkout
> 2016-02-05 16:52:29.827 3169 ERROR designate     fairy =
> _ConnectionRecord.checkout(pool)
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 480, in checkout
> 2016-02-05 16:52:29.827 3169 ERROR designate     rec = pool._do_get()
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 1151, in _do_get
> 2016-02-05 16:52:29.827 3169 ERROR designate     return
> self._create_connection()
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 323, in
> _create_connection
> 2016-02-05 16:52:29.827 3169 ERROR designate     return
> _ConnectionRecord(self)
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 449, in __init__
> 2016-02-05 16:52:29.827 3169 ERROR designate     self.connection =
> self.__connect()
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 607, in
> __connect
> 2016-02-05 16:52:29.827 3169 ERROR designate     connection =
> self.__pool._invoke_creator(self)
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line
> 97, in connect
> 2016-02-05 16:52:29.827 3169 ERROR designate     return
> dialect.connect(*cargs, **cparams)
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 385,
> in connect
> 2016-02-05 16:52:29.827 3169 ERROR designate     return
> self.dbapi.connect(*cargs, **cparams)
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/pymysql/__init__.py", line 88, in Connect
> 2016-02-05 16:52:29.827 3169 ERROR designate     return Connection(*args,
> **kwargs)
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 626, in
> __init__
> 2016-02-05 16:52:29.827 3169 ERROR designate     self._connect()
> 2016-02-05 16:52:29.827 3169 ERROR designate   File
> "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 818, in
> _connect
> 2016-02-05 16:52:29.827 3169 ERROR designate     2003, "Can't connect to
> MySQL server on %r (%s)" % (self.host, e))
> 2016-02-05 16:52:29.827 3169 ERROR designate OperationalError:
> (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on
> 'localhost' ([Errno 111] ECONNREFUSED)")
> 2016-02-05 16:52:29.827 3169 ERROR designate
> root at controller01:/etc/designate#
> root at controller01:/etc/designate#
> root at controller01:/etc/designate# mysql -u root -p -h localhost
> Enter password:
> Welcome to the MariaDB monitor.  Commands end with ; or \g.
> Your MariaDB connection id is 143
> Server version: 5.5.46-MariaDB-1ubuntu0.14.04.2 (Ubuntu)
>
> Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
>
> Type 'help;' or '\h' for help. Type '\c' to clear the current input
> statement.
>
> MariaDB [(none)]>
>
>
>
> Steven Searles, CTO | ssearles at zimcom.net
> Zimcom Internet Solutions  | www.zimcom.net
> O: 513.231.9500  |  D: 513.233.4130
>
>
>
> _______________________________________________
> Mailing list:
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe :
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>
>


-- 
Mohammed Naser — vexxhost
-----------------------------------------------------
E. mnaser at vexxhost.com
W. http://vexxhost.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20160205/d7c300a3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 847FA943-AFD4-4E4F-BB5E-0DDB37DEAF6A[24].png
Type: image/png
Size: 10713 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20160205/d7c300a3/attachment.png>


More information about the Openstack mailing list