Ask Your Question
0

cinder mysql connection failed errno 113

asked 2019-04-03 09:45:58 -0500

Adammm gravatar image
 Hello, I have a problem with cinder, command tail -f /var/log/cinder/volume.log shows :


2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume Traceback (most recent call last):
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume   File "/usr/lib/python2.7/site-packages/cinder/cmd/volume.py", line 100, in _launch_service
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume     cluster=cluster)
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume   File "/usr/lib/python2.7/site-packages/cinder/service.py", line 403, in create
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume     cluster=cluster)
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume   File "/usr/lib/python2.7/site-packages/cinder/service.py", line 156, in __init__
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume     *args, **kwargs)
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume   File "/usr/lib/python2.7/site-packages/cinder/volume/manager.py", line 218, in __init__
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume     *args, **kwargs)
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume   File "/usr/lib/python2.7/site-packages/cinder/manager.py", line 183, in __init__
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume     self.scheduler_rpcapi = scheduler_rpcapi.SchedulerAPI()
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume   File "/usr/lib/python2.7/site-packages/cinder/rpc.py", line 207, in __init__
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume     obj_version_cap = self.determine_obj_version_cap()
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume   File "/usr/lib/python2.7/site-packages/cinder/rpc.py", line 260, in determine_obj_version_cap
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume     cinder.context.get_admin_context(), cls.BINARY)
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume   File "/usr/lib/python2.7/site-packages/cinder/objects/service.py", line 222, in get_minimum_obj_version
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume     binary)
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume   File "/usr/lib/python2.7/site-packages/cinder/objects/service.py", line 192, in _get_minimum_version
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume     services = ServiceList.get_all_by_binary(context, binary)
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume   File "/usr/lib/python2.7/site-packages/cinder/objects/service.py", line 256, in get_all_by_binary
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume     disabled=disabled)
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume   File "/usr/lib/python2.7/site-packages/cinder/db/api.py", line 141, in service_get_all
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume     return IMPL.service_get_all(context, backend_match_level, **filters)
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume   File "/usr/lib/python2.7/site-packages/cinder/db/sqlalchemy/api.py", line 164, in wrapper
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume     return f(*args, **kwargs)
2019-04-03 10:39:51.000 11911 ERROR cinder.cmd.volume   File "/usr/lib/python2.7/site-packages/cinder/db/sqlalchemy/api.py", line 524, in service_get_all
2019-04-03 10 ...
(more)
edit retag flag offensive close merge delete

Comments

It looks like you can’t access the database from the storage node. Does the controller have a firewall? Can the storage node resolve the name controller?

Bernd Bausch gravatar imageBernd Bausch ( 2019-04-03 17:40:09 -0500 )edit

cat /etc/hosts (storage node)

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1              localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.100.4 controller
192.168.100.5 compute
192.168.100.6 storage

how to verify firewall?

Adammm gravatar imageAdammm ( 2019-04-04 02:32:12 -0500 )edit

This depends on the Linux distro, but you could try running mysql -uroot -pPASSWORD -h controller on the storage node as a first step.

Bernd Bausch gravatar imageBernd Bausch ( 2019-04-04 03:22:10 -0500 )edit

I have centos

cat /etc/os-release
NAME="CentOS Linux"

I executed below cmd on storage node

mysql -uroot -h controller -p
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on 'controller' (113 "No route to host")

can you help me ? I will try to google it also

Adammm gravatar imageAdammm ( 2019-04-04 03:42:00 -0500 )edit

It seems as if you can't resolve "controller", check your name resolution.

eblock gravatar imageeblock ( 2019-04-05 07:27:31 -0500 )edit

1 answer

Sort by » oldest newest most voted
0

answered 2019-04-04 05:43:06 -0500

updated 2019-04-04 05:45:26 -0500

Centos implements a very strict firewall, all ports closed except 22 for ssh. To open a port, use firewall-cmd --add-port PORTNUMBER. Add the --permanent option to ensure the port is open next time you reboot as well.

You may have to open other ports than just MySQL. The install guide has a list of ports used by OpenStack services; MySQL is 3306.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2019-04-03 09:45:58 -0500

Seen: 61 times

Last updated: Apr 04