Ask Your Question
1

Nova services on controller are not working due to SQL error

asked 2015-12-02 12:13:29 -0500

at8eqeq3 gravatar image

updated 2015-12-03 00:54:56 -0500

Hello.

I'm trying to set up Liberty on VMs with CentOS 7. Following the Install Guide, with only exception is Postgres instead of MySQL. Now, I'm stuck with setting up Nova on Controller node. Some services (nova-cert, nova-consoleauth and nova-scheduler) are reporting they can't connect to SQL (actual message in logs is like WARNING oslo_db.sqlalchemy.engines [req-uuiduuid-uuid-uuid-uuid-uuiduuiduuid - - - - -] SQL connection failed. -nn attempts left.).

Obviously, database is working good and accessible, because other services are working, and connection string is correct, because nova-manage db sync works without errors.

During my later research, I found that running, i.e., su -s /bin/sh -c "nova-scheduler" nova in console works fine. According to logs, it can communicate with database. The error reproduced only when it's started as a daemon.

So, tell me, please, where to look for causes?

edit retag flag offensive close merge delete

Comments

most probably, access credentials in nova configuration files were wrong. Double check that.

Bipin gravatar imageBipin ( 2015-12-02 22:13:39 -0500 )edit

If you're telling about [database]/connection directive, then it's more than double checked. I've even dropped the DB and user and re-created them back. nova-manage db sync still working. Or it uses some other directive? Also, I've added some more info to question.

at8eqeq3 gravatar imageat8eqeq3 ( 2015-12-03 00:59:25 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-12-03 12:28:44 -0500

at8eqeq3 gravatar image

So, the cause was SELinux blocking access to Postgres. I don't know why there was different behavior between interactive and daemon start. The standard procedure with audit2allow put everything on their places.

Thanks to all.

edit flag offensive delete link more

Comments

strange ...

Prateek K gravatar imagePrateek K ( 2015-12-03 22:48:15 -0500 )edit
0

answered 2015-12-03 01:15:59 -0500

Prateek K gravatar image

as you said that it works when you run it on console and not as a service then What i can see is when you run through you pass the following command

'su -s /bin/sh -c "nova-scheduler" nova' But when you run it as a deamon and then do ps -aef does it run with the exact same parameters ?

Probably what I can figure out it when it is running as a service it is also using some extra config file or something from which it is getting the wrong configuration causing failure in connecting to SQL. J

Just do ps -aef |grep nova-scheduler and see that how the service is running is the binary and along with what parameters.

edit flag offensive delete link more

Comments

Nope, no difference here.

at8eqeq3 gravatar imageat8eqeq3 ( 2015-12-03 11:47:06 -0500 )edit

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

2 followers

Stats

Asked: 2015-12-02 12:13:29 -0500

Seen: 999 times

Last updated: Dec 03 '15