# Ansible openstack deploy fails with mysql error

**URL:** <https://forum.ansible.com/t/ansible-openstack-deploy-fails-with-mysql-error/13138>\
**Category:** Ansible Project\
**Created:** [July 16, 2013, 4:18pm UTC](https://forum.ansible.com/t/ansible-openstack-deploy-fails-with-mysql-error/13138 "2013-07-16T16:18:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Aldridge](https://avatars.discourse-cdn.com/v4/letter/m/0ea827/32.png) [@Michael\_Aldridge](https://forum.ansible.com/u/Michael_Aldridge)\
**Post date:** [July 16, 2013, 4:18pm UTC](https://forum.ansible.com/t/ansible-openstack-deploy-fails-with-mysql-error/13138/1 "2013-07-16T16:18:34Z")

</div>

I have been trying to install with the scripts from the webinar a few days ago. Consistently the install fails on the following step:

TASK: [create the external network] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [cloud-controller] =\> failed to parse: /root/.ansible/tmp/ansible-1373991065.17-51641315664934/quantum\_network:120: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6  
module.fail\_json(msg = “Error authenticating to the keystone: %s” %e.message)  
{“msg”: “Error authenticating to the keystone: Authorization Failed: Unable to communicate with identity service: {"error": {"message": "An unexpected error prevented the server from fulfilling your request. (OperationalError) (1045, \"Access denied for user ‘keystone’@‘localhost’ (using password: NO)\") None None", "code": 500, "title": "Internal Server Error"}}. (HTTP 500)”, “failed”: true}

FATAL: all hosts have already failed – aborting

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
to retry, use: --limit @/var/tmp/ansible/site.retry

cloud-compute : ok=15 changed=3 unreachable=0 failed=0  
cloud-controller : ok=48 changed=8 unreachable=1 failed=0

I am running as root on centos 6.4 installed on bare metal. Any ideas?

---

<div class="post-metadata">

**Author:** ![Darragh\_O\_Reilly](https://avatars.discourse-cdn.com/v4/letter/d/71c47a/32.png) [@Darragh\_O\_Reilly](https://forum.ansible.com/u/Darragh_O_Reilly)\
**Post date:** [July 17, 2013, 10:27am UTC](https://forum.ansible.com/t/ansible-openstack-deploy-fails-with-mysql-error/13138/2 "2013-07-17T10:27:32Z")

</div>

can you do this without getting an exception?

[vagrant@controller ~]$ python  
Python 2.6.6 (r266:84292, Feb 22 2013, 00:00:18)  
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2  
Type “help”, “copyright”, “credits” or “license” for more information.

> > > from keystoneclient.v2\_0 import client as ksclient  
> > > kc = ksclient.Client(username=‘admin’, password=‘secret’, tenant\_name=‘admin’, auth\_url=‘[http://127.0.0.1:35357/v2.0/](http://127.0.0.1:35357/v2.0/)’)

> > >

If not, then check /var/log/keystone/keystone.log. Those credientials all the defaults from group\_vars/all.

---

<div class="post-metadata">

**Author:** ![Darragh\_O\_Reilly](https://avatars.discourse-cdn.com/v4/letter/d/71c47a/32.png) [@Darragh\_O\_Reilly](https://forum.ansible.com/u/Darragh_O_Reilly)\
**Post date:** [July 17, 2013, 11:10am UTC](https://forum.ansible.com/t/ansible-openstack-deploy-fails-with-mysql-error/13138/3 "2013-07-17T11:10:39Z")

</div>

sorry, I missed the mysql bit. Check to see if the DB was setup right by running ‘mysql’ as root:

select user, host from mysql.user;  
use keystone;  
show tables;

---

<div class="post-metadata">

**Author:** ![benno\_joy](https://avatars.discourse-cdn.com/v4/letter/b/73ab20/32.png) [@benno\_joy](https://forum.ansible.com/u/benno_joy)\
**Post date:** [July 18, 2013, 2:45pm UTC](https://forum.ansible.com/t/ansible-openstack-deploy-fails-with-mysql-error/13138/4 "2013-07-18T14:45:52Z")

</div>

Hi Michael,

could you also check if you have the following line in your keystone config.

```auto

[signing]

token_format = UUID

Regards,
Benno

```

---

<div class="post-metadata">

**Author:** ![kesten\_broughton1](https://avatars.discourse-cdn.com/v4/letter/k/dc4da7/32.png) [@kesten\_broughton1](https://forum.ansible.com/u/kesten_broughton1)\
**Post date:** [July 29, 2013, 9:50pm UTC](https://forum.ansible.com/t/ansible-openstack-deploy-fails-with-mysql-error/13138/5 "2013-07-29T21:50:58Z")

</div>

I’ve hit the same error - same step. I just grabbed the latest 1.3 from git (july 29).

$ cat /etc/keystone/keystone.conf  
…  
[signing]  
token\_format = UUID  
…

My sql db looks bad though. Duplicates.

---

<div class="post-metadata">

**Author:** ![kesten\_broughton1](https://avatars.discourse-cdn.com/v4/letter/k/dc4da7/32.png) [@kesten\_broughton1](https://forum.ansible.com/u/kesten_broughton1)\
**Post date:** [July 29, 2013, 9:54pm UTC](https://forum.ansible.com/t/ansible-openstack-deploy-fails-with-mysql-error/13138/6 "2013-07-29T21:54:47Z")

</div>

from keystoneclient.v2\_0 import client as ksclient

> > > kc = ksclient.Client(username=‘admin’, password=‘secret’, tenant\_name=‘admin’, auth\_url=‘[http://127.0.0.1:35357/v2.0/](http://127.0.0.1:35357/v2.0/)’)

fails with the same “Error authenticating keystone” for me.

---

<div class="post-metadata">

**Author:** ![Darragh\_O\_Reilly](https://avatars.discourse-cdn.com/v4/letter/d/71c47a/32.png) [@Darragh\_O\_Reilly](https://forum.ansible.com/u/Darragh_O_Reilly)\
**Post date:** [July 30, 2013, 7:54pm UTC](https://forum.ansible.com/t/ansible-openstack-deploy-fails-with-mysql-error/13138/7 "2013-07-30T19:54:59Z")

</div>

Your mysql.user tables looks ok. What does your connection string in /etc/keystone/keystone.conf look like? Here is mine:

[sql]  
connection = mysql://keystone:keystone@localhost/keystone

The password was taken from keystone\_db\_pass in group\_vars/all when the template for keystone.conf in keystone.yml was run.

And I can do this ok:  
$mysql -u keystone -pkeystone keystone

But without the password I get:  
$ mysql -u keystone keystone  
ERROR 1045 (28000): Access denied for user ‘keystone’@‘localhost’ (using password: NO)

Which I think is the error you are getting?

---

<div class="post-metadata">

**Author:** ![kesten\_broughton1](https://avatars.discourse-cdn.com/v4/letter/k/dc4da7/32.png) [@kesten\_broughton1](https://forum.ansible.com/u/kesten_broughton1)\
**Post date:** [July 31, 2013, 9:22pm UTC](https://forum.ansible.com/t/ansible-openstack-deploy-fails-with-mysql-error/13138/8 "2013-07-31T21:22:01Z")

</div>

my [sql] connection is the same.

546 root:~$ mysql -u keystone -pkeystone keystone  
Reading table information for completion of table and column names  
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.  
Your MySQL connection id is 113  
Server version: 5.1.69 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its  
affiliates. Other names may be trademarks of their respective  
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

> exit  
> Bye  
> 547 root:~$ mysql -u keystone keystone  
> ERROR 1045 (28000): Access denied for user ‘keystone’@‘localhost’ (using password: NO)  
> 548 root:~$

\<\<\<\<\<\<\<

I should have been more clear - running the ansible openstack playbook was failing for me at exactly the same task  
TASK: [create the external network] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

but with a different error:

\<10.0.9.170\> ESTABLISH CONNECTION FOR USER: root  
\<10.0.9.170\> EXEC [‘ssh’, ‘-tt’, ‘-q’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/tmp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘Port=22’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=root’, ‘-o’, ‘ConnectTimeout=10’, ‘10.0.9.170’, “/bin/sh -c ‘mkdir -p $HOME/.ansible/tmp/ansible-1375287449.19-5095015559057 && echo $HOME/.ansible/tmp/ansible-1375287449.19-5095015559057’”]  
\<10.0.9.170\> REMOTE\_MODULE quantum\_network state=present login\_username=admin login\_password=secret provider\_network\_type=local login\_tenant\_name=admin name=external\_network router\_external=true  
\<10.0.9.170\> PUT /var/folders/t2/h22337c12hn279xwd4s9fk7s8\_088c/T/tmpzgjqhi TO /root/.ansible/tmp/ansible-1375287449.19-5095015559057/quantum\_network  
\<10.0.9.170\> EXEC [‘ssh’, ‘-tt’, ‘-q’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/tmp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘Port=22’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=root’, ‘-o’, ‘ConnectTimeout=10’, ‘10.0.9.170’, “/bin/sh -c ‘/usr/bin/python /root/.ansible/tmp/ansible-1375287449.19-5095015559057/quantum\_network; rm -rf /root/.ansible/tmp/ansible-1375287449.19-5095015559057/ \>/dev/null 2\>&1’”]  
failed: [Linux-OpenStack-Admin] =\> {“failed”: true, “item”: “”}  
msg: Error in listing quantum networks: [Errno 111] Connection refused

I believe it is a problem with the quantum\_network module and i’m trying to set up debugging right now so i can investigate further.  
The error above could come from any of the following:

kbroughton:cloud$ grep -RH “Error in listing quantum networks” .  
./quantum\_floating\_ip: module.fail\_json(“Error in listing quantum networks: %s” % e.message)  
./quantum\_network: module.fail\_json(msg = “Error in listing quantum networks: %s” % e.message)  
./quantum\_router\_gateway: module.fail\_json(“Error in listing quantum networks: %s” % e.message)  
./quantum\_subnet: module.fail\_json(“Error in listing quantum networks: %s” % e.message)

---

<div class="post-metadata">

**Author:** ![Phuc\_Nguyen](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@Phuc\_Nguyen](https://forum.ansible.com/u/Phuc_Nguyen)\
**Post date:** [April 15, 2015, 7:03am UTC](https://forum.ansible.com/t/ansible-openstack-deploy-fails-with-mysql-error/13138/9 "2015-04-15T07:03:11Z")

</div>

i have prplem, when i login openstck dashboad , i have errror on keystone.log : WARNING keystone.common.wsgi [-] Authorization failed. The request you have made requires authentication. from 127.0.0.1 .

can you help me fix error.

Vào 04:50:58 UTC+7 Thứ Ba, ngày 30 tháng 7 năm 2013, kesten broughton đã viết:
