Ask Your Question
0

Glance image authentication failure

asked 2015-04-07 17:19:25 -0600

Noreen gravatar image

updated 2015-04-08 23:02:25 -0600

RHK gravatar image

Hi, when i do "openstack-status"

== Nova services ==

openstack-nova-api:                     active<br>
openstack-nova-cert:                    active<br>
openstack-nova-compute:                 inactive  (disabled on boot)<br>
openstack-nova-network:                 inactive  (disabled on boot)<br>
openstack-nova-scheduler:               active<br>
openstack-nova-conductor:               active<br>

== Glance services ==

openstack-glance-api:                   active<br>
openstack-glance-registry:              active<br>

== Keystone service ==

openstack-keystone:                     active<br>

== Horizon service ==

openstack-dashboard:                    active<br>

== Support services ==

mysqld:                                 inactive  (disabled on boot)<br>
dbus:                                   active<br>
rabbitmq-server:                        active<br>
memcached:                              active<br>

== Glance images ==

 Authentication failure: The resource could not be found. (HTTP 404)`enter code here`

-> And also i am not able to create image, it give authentication failure: The resources could not be found. (HTTP 404)

*strong text /var/log/glance/api.log

2015-03-18 12:26:34.695 4052 WARNING oslo.db.sqlalchemy.session [-] SQL connection failed. 10 attempts left.
2015-03-18 12:26:44.705 4052 WARNING oslo.db.sqlalchemy.session [-] SQL connection failed. 9 attempts left.
2015-03-18 12:26:54.716 4052 WARNING oslo.db.sqlalchemy.session [-] SQL connection failed. 8 attempts left.
2015-03-18 12:27:04.727 4052 WARNING oslo.db.sqlalchemy.session [-] SQL connection failed. 7 attempts left.
2015-03-18 12:27:14.738 4052 WARNING oslo.db.sqlalchemy.session [-] SQL connection failed. 6 attempts left.
2015-03-18 12:27:24.748 4052 WARNING oslo.db.sqlalchemy.session [-] SQL connection failed. 5 attempts left.
2015-03-18 12:27:34.759 4052 WARNING oslo.db.sqlalchemy.session [-] SQL connection failed. 4 attempts left.
2015-03-18 12:27:44.770 4052 WARNING oslo.db.sqlalchemy.session [-] SQL connection failed. 3 attempts left.
2015-03-18 12:27:54.781 4052 WARNING oslo.db.sqlalchemy.session [-] SQL connection failed. 2 attempts left.
2015-03-18 12:28:04.791 4052 WARNING oslo.db.sqlalchemy.session [-] SQL connection failed. 1 attempts left.
2015-03-18 12:28:14.802 4052 CRITICAL glance [-] DBConnectionError: (OperationalError) (2003, "Can't connect to MySQL server on 'controller' (111)") None None<br>
2015-03-18 12:28:14.802 4052 TRACE glance Traceback (most recent call last):<br>
2015-03-18 12:28:14.802 4052 TRACE glance   File "/usr/bin/glance-manage", line 10, in <module><br>
2015-03-18 12:28:14.802 4052 TRACE glance     sys.exit(main())<br>
2015-03-18 12:28:14.802 4052 TRACE glance   File "/usr/lib/python2.7/site-packages/glance/cmd/manage.py", line 279, in main<br>
2015-03-18 12:28:14.802 4052 TRACE glance     return CONF.command.action_fn()<br>
2015-03-18 12:28:14.802 4052 TRACE glance   File "/usr/lib/python2.7/site-packages/glance/cmd/manage.py", line 157, in sync<br>
2015-03-18 12:28:14.802 4052 TRACE glance     CONF.command.current_version)<br>
2015-03-18 12:28:14.802 4052 TRACE glance   File "/usr/lib/python2.7/site-packages/glance/cmd/manage.py", line 113, in sync<br>
2015-03-18 12:28:14.802 4052 TRACE glance     migration.db_sync(db_api.get_engine(),<br>
2015-03-18 12:28:14.802 4052 TRACE glance   File "/usr/lib/python2.7/site-packages/glance/db/sqlalchemy/api.py", line 92, in get_engine<br>
2015-03-18 12:28:14.802 4052 TRACE glance     facade = _create_facade_lazily()
2015-03-18 12:28:14.802 4052 TRACE glance   File "/usr/lib/python2.7/site-packages ...
(more)
edit retag flag offensive close merge delete

Comments

Some services are not running and disabled on boot like mysqld: inactive (disabled on boot), try restarting mysql service. Make sure that controller's ip in /etc/hosts is correct

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2015-04-08 02:58:25 -0600 )edit

Hi Eduardo,
Can you help how to active mysqld service? I am using mariadb and i tried to restart mariadb server but mysqld is still inactive.

And the controller's ip is correct in /etc/hosts.

Noreen gravatar imageNoreen ( 2015-04-08 13:40:38 -0600 )edit

when i tried to restart mysql servive by using command
sudo service mysql restart
gives error
Failed to issue method call: Unit mysql.service failed to load: No such file or directory.
how to solve?

Noreen gravatar imageNoreen ( 2015-04-08 14:05:31 -0600 )edit

Can you paste glance-api.conf, glance-registry.conf files and provide more information about OS and Openstack version? Regards

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2015-04-09 10:19:44 -0600 )edit

4 answers

Sort by ยป oldest newest most voted
1

answered 2015-04-07 22:39:50 -0600

If you look at the end of error in glance api log you will see :

DBConnectionError: (OperationalError) (2003, "Can't connect to MySQL server on 'controller'

edit flag offensive delete link more
0

answered 2016-04-01 04:53:17 -0600

Hi guys,

Had this same error but different solution:

In my case my hosts file was translating adresses to vlan 30 IP's While my mysqld_openstack.cnf bind address was in vlan 20.

Because all openstack configs used a hostname they all used vlan 30 and could not connect with mysql.

So make sure your hosts file points to the same vlan as your mysql bind address.

hope this helps some of you

edit flag offensive delete link more
0

answered 2015-04-08 02:52:39 -0600

you need to check if glance is abel to connect to db and that the tables are created with proper entries.

edit flag offensive delete link more

Comments

you may also have to delete db tables and recreate them in case you have already created.

rishi gravatar imagerishi ( 2015-04-08 02:53:18 -0600 )edit
0

answered 2015-04-08 16:20:25 -0600

Noreen gravatar image

Hi guys,

I tried all you suggestions but the result is same.

  • Now i don't have SQL error in glance api log.
  • i recreated glance databese and deleted previous. But no success

The mysqld, openstack-nova-compute, openstack-nova-network are "inactive (disabled on boot)". - Mariadb server is running but when i try to check "mysqld" status, it gives error no such a file and directory.

Please help me...i didn't find solution anywhere

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: 2015-04-07 17:19:25 -0600

Seen: 5,955 times

Last updated: Apr 08 '15