Nova Configuration (DBConnection Error) (2003 "Cant to MySQL Server"

asked 2019-04-14 22:45:51 -0500

anonymous user

Anonymous

Hi All,

As I was trying to configure Rocky Flavor of Openstack in my ONPrem Server. As i Follow the Document which is available with Openstack Installation Guide.

I am facing a issue for configuring nova. The issue is

When I execute the command

su -s /bin/sh -c "nova-manage api_db sync" nova

My system throw the error

DBConnectionError: (pymysql.err.OperationalError) (2003, "Can't Connect to MYSQL server on 'openstack-controller' ([Errno -21] No address found)") (Background on this error at: http://sqlalche.me/e/e3q8)

But the intresting thing is I have also configure Glance and when i used the su command there this error didnt poped up

Please help me to resolve this issue

Regards Vikas Kanojia

edit retag flag offensive close merge delete

Comments

nova-manage uses the MySQL connection string from nova.conf, whereas Glance uses the connection string from glance.conf. You seem to have an erroneous connection string in nova.conf.

Can you resolve openstack-controller to an IP address?

Bernd Bausch gravatar imageBernd Bausch ( 2019-04-14 23:09:18 -0500 )edit

Hi Bemd Bausch,

Yes I can resolve the openstack-controller to an IP ADDRESS

ViMa gravatar imageViMa ( 2019-04-15 03:45:44 -0500 )edit

Then something else is wrong with the connection string.

Bernd Bausch gravatar imageBernd Bausch ( 2019-04-15 04:49:58 -0500 )edit

This is my connection string

connection = mysql+pymysql://nova:admin@123@openstack-controller/nova_api connection = mysql+pymysql://nova:admin@123@openstack-controller/nova connection = mysql+pymysql://placement:admin@123@openstack-controller/placement

ViMa gravatar imageViMa ( 2019-04-15 20:51:51 -0500 )edit

One troubleshooting technique is comparing a working configuration with the non-working one. So, does this look like the Glance connection string?

By the way, while I am not certain, I don’t think a connection string can have two @ signs.

Bernd Bausch gravatar imageBernd Bausch ( 2019-04-15 22:28:29 -0500 )edit