"Access denied for user 'root'@'10.144.65.71' (using password: YES)") None None

Asked by dipak

Hi,

I have the cloud controller installed on server 1 and only the nova-compute on server 2.
I was under a wrong assumption that 2 of my servers were working properly. But only my server 1 works and not server 2. I realized this from euca-describe-availability-zone verbose command. I could see only the nova services from server 1 and nothing from server 2. Not even a mention of name 'server 2'.

Then I looked into the log files of my server 2. There were 2 log files nova-manage.log and nova-compute.log and in both these log files I could only find the error
'"(nova): TRACE: OperationalError: (OperationalError) (1045, "Access denied for user 'root'@'10.144.65.71' (using password: YES)") None None"

where 10.144.65.71 is the ip of my server 2, where just the compute node runs.

I know this sounds like a silly error which has to do with setting grant permissions. But I do not have precise idea how to achieve this.

Thanks,

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
dipak
Solved:
Last query:
Last reply:
Revision history for this message
Sateesh (sateesh-chodapuneedi) said :
#1

Can you check mysql/db connectivity from server 2 which is running nova-compute service?

Also can you verify nova.conf if it's having correct flags for sql_connection flag?

Revision history for this message
dipak (dipak87) said :
#2

Hi,

I can connect to the mysql db on my server 1 from server 2 by this command

  sudo mysql -h 10.144.65.70 -u root -p mysql
  enter password--

And my nova.conf file on my server 2 looks like this

--dhcpbridge_flagfile=/etc/nova/nova.conf
--dhcpbridge=/usr/bin/nova-dhcpbridge
--logdir=/var/log/nova
--state_path=/var/lib/nova
--lock_path=/var/lock/nova
--verbose
--s3_host=10.144.65.70
--rabbit_host=192.168.3.1
--cc_host=192.168.3.1
--ec2_url=http://10.144.65.70:8773/services/Cloud
--fixed_range=192.168.0.0/16
--network_size=8
--FAKE_subdomain=ec2
--routing_source_ip=192.168.3.2
--sql_connection=mysql://root:nova@10.144.65.70/nova
--glance_host=192.168.3.1
--image_service=nova.image.glance.GlanceImageService

thanks,

Revision history for this message
Vish Ishaya (vishvananda) said :
#3

GRANT ALL PRIVILEGES ON nova.* to root@'%' IDENTIFIED BY 'password' WITH GRANT OPTION ;

If you have changed the password somehow you might need to update all relevant rows with something like:

UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
FLUSH PRIVILEGES;

On Oct 27, 2011, at 8:21 AM, dipak wrote:

> New question #176501 on OpenStack Compute (nova):
> https://answers.launchpad.net/nova/+question/176501
>
> Hi,
>
> I have the cloud controller installed on server 1 and only the nova-compute on server 2.
> I was under a wrong assumption that 2 of my servers were working properly. But only my server 1 works and not server 2. I realized this from euca-describe-availability-zone verbose command. I could see only the nova services from server 1 and nothing from server 2. Not even a mention of name 'server 2'.
>
> Then I looked into the log files of my server 2. There were 2 log files nova-manage.log and nova-compute.log and in both these log files I could only find the error
> '"(nova): TRACE: OperationalError: (OperationalError) (1045, "Access denied for user 'root'@'10.144.65.71' (using password: YES)") None None"
>
> where 10.144.65.71 is the ip of my server 2, where just the compute node runs.
>
> I know this sounds like a silly error which has to do with setting grant permissions. But I do not have precise idea how to achieve this.
>
> Thanks,
>
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Revision history for this message
dipak (dipak87) said :
#4

Hi Vish,

Thanks for the answer but the problem is not solved. I am still facing the same issue. I restarted mysql server, server 1 and server 2 and restarted all the services on both servers. Still no luck.

The error msg on server 2 from nova-manage.log points to the same thing
2011-10-28 10:59:23,181 CRITICAL nova [-] (OperationalError) (1045, "Access denied for user 'root'@'10.144.65.71' (using password: YES)") None None

Thanks,

Revision history for this message
dipak (dipak87) said :
#5

+-------------+------------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
| Host | User | Password | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | Create_view_priv | Show_view_priv | Create_routine_priv | Alter_routine_priv | Create_user_priv | Event_priv | Trigger_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections | max_user_connections |
+-------------+------------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+
| os-compute1 | root | *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | | | | 0 | 0 | 0 | 0 |
| 127.0.0.1 | root | *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | | | | 0 | 0 | 0 | 0 |
| localhost | debian-sys-maint | *4F5CC9DD7053552FF686A4294BEBD7933D5083FC | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | | | | 0 | 0 | 0 | 0 |
| % | root | *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | Y | | | | | 0 | 0 | 0 | 0 |
| localhost | nova | *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | | | | | 0 | 0 | 0 | 0 |
| localhost | dipak | *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | | | | | 0 | 0 | 0 | 0 |
+-------------+------------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+

Revision history for this message
dipak (dipak87) said :
#6

Hi,

I somehow feel that this access denied error is not related to granting permissions because the user table in mysql looks ok to me.

Could there be a chance that the access denied error can occur at some other reason ?

Output of my user table -
mysql> select host,user,select_priv,Insert_priv,update_priv from user;
+-------------+------------------+-------------+-------------+-------------+
| host | user | select_priv | Insert_priv | update_priv |
+-------------+------------------+-------------+-------------+-------------+
| os-compute1 | root | Y | Y | Y |
| 127.0.0.1 | root | Y | Y | Y |
| localhost | debian-sys-maint | Y | Y | Y |
| % | root | Y | Y | Y |
| localhost | nova | N | N | N |
| localhost | dipak | N | N | N |
+-------------+------------------+-------------+-------------+-------------+

Thanks,

Revision history for this message
dipak (dipak87) said :
#7

Hi,

There was a mistake with the sql password in my nova.conf file on the second server.

Thanks,