1

I'm installing Openstack Newton on Ubuntu 16.04 manually using the install documentation: https://docs.openstack.org/newton/install-guide-ubuntu/glance-install.html

I missed a few bits in glance-registry.conf before populating the image service database. I then went back and fixed everything, populated DB again (sudo su -s /bin/sh -c "glance-manage db_sync" glance) Restarted service, loaded admin creds and tried creating Cirros image but keep getting the following errors:

user1@controller:~$ openstack image create "cirros" --file cirros-0.3.4-x86_64-disk.img --disk-format qcow2 --container-format bare --public
503 Service Unavailable
The server is currently unavailable. Please try again at a later time.
    (HTTP 503)

glance-registry.log seems fine: (Note not entire log)

2017-03-29 11:33:39.073 2084 INFO glance.common.wsgi [-] Starting 6 workers
2017-03-29 11:33:39.083 2084 INFO glance.common.wsgi [-] Started child 2119
2017-03-29 11:33:39.084 2119 INFO eventlet.wsgi.server [-] (2119) wsgi starting up on http://0.0.0.0:9191
2017-03-29 11:33:39.086 2084 INFO glance.common.wsgi [-] Started child 2120
2017-03-29 11:33:39.087 2120 INFO eventlet.wsgi.server [-] (2120) wsgi starting up on http://0.0.0.0:9191
2017-03-29 11:33:39.090 2084 INFO glance.common.wsgi [-] Started child 2121
2017-03-29 11:33:39.091 2121 INFO eventlet.wsgi.server [-] (2121) wsgi starting up on http://0.0.0.0:9191
2017-03-29 11:33:39.093 2084 INFO glance.common.wsgi [-] Started child 2122
2017-03-29 11:33:39.094 2122 INFO eventlet.wsgi.server [-] (2122) wsgi starting up on http://0.0.0.0:9191
2017-03-29 11:33:39.096 2084 INFO glance.common.wsgi [-] Started child 2123
2017-03-29 11:33:39.097 2123 INFO eventlet.wsgi.server [-] (2123) wsgi starting up on http://0.0.0.0:9191
2017-03-29 11:33:39.100 2084 INFO glance.common.wsgi [-] Started child 2124
2017-03-29 11:33:39.101 2124 INFO eventlet.wsgi.server [-] (2124) wsgi starting up on http://0.0.0.0:9191

glance-api.log has some errors: (Note not entire log)

2017-03-29 11:33:39.326 2088 INFO glance.common.wsgi [-] Started child 2127
2017-03-29 11:33:39.327 2127 INFO eventlet.wsgi.server [-] (2127) wsgi starting up on http://0.0.0.0:9292
2017-03-29 11:33:39.330 2088 INFO glance.common.wsgi [-] Started child 2128
2017-03-29 11:33:39.330 2128 INFO eventlet.wsgi.server [-] (2128) wsgi starting up on http://0.0.0.0:9292
2017-03-29 11:33:39.334 2088 INFO glance.common.wsgi [-] Started child 2129
2017-03-29 11:33:39.334 2129 INFO eventlet.wsgi.server [-] (2129) wsgi starting up on http://0.0.0.0:9292
2017-03-29 11:33:39.338 2088 INFO glance.common.wsgi [-] Started child 2130
2017-03-29 11:33:39.339 2130 INFO eventlet.wsgi.server [-] (2130) wsgi starting up on http://0.0.0.0:9292
2017-03-29 11:36:44.200 2126 WARNING keystonemiddleware.auth_token [-] Identity response: {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}
2017-03-29 11:36:44.322 2126 WARNING keystonemiddleware.auth_token [-] Identity response: {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}
2017-03-29 11:36:44.323 2126 CRITICAL keystonemiddleware.auth_token [-] Unable to validate token: Identity server rejected authorization necessary to fetch token data
2017-03-29 11:36:44.326 2126 INFO eventlet.wsgi.server [-] 192.168.10.11 - - [29/Mar/2017 11:36:44] "GET /v2/schemas/image HTTP/1.1" 503 259 2.551519

admin-openrc

export OS_PROJECT_DOMAIN_NAME=Default
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=PASSWORDHERE
export OS_AUTH_URL=http://controller:35357/v3
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2

Any suggestions?


/var/log/apache2/error.log

[Wed Mar 29 09:09:24.843764 2017] [wsgi:warn] [pid 1689:tid 139998635640704] mod_wsgi: Compiled for Python/2.7.11.
[Wed Mar 29 09:09:24.852363 2017] [wsgi:warn] [pid 1689:tid 139998635640704] mod_wsgi: Runtime using Python/2.7.12.
[Wed Mar 29 09:09:24.855349 2017] [mpm_event:notice] [pid 1689:tid 139998635640704] AH00489: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12 configured -- resuming normal operations
[Wed Mar 29 09:09:24.855369 2017] [core:notice] [pid 1689:tid 139998635640704] AH00094: Command line: '/usr/sbin/apache2'
[Wed Mar 29 10:20:52.529214 2017] [mpm_event:notice] [pid 1689:tid 139998635640704] AH00491: caught SIGTERM, shutting down
[Wed Mar 29 10:22:50.037927 2017] [wsgi:warn] [pid 1571:tid 140332865791872] mod_wsgi: Compiled for Python/2.7.11.
[Wed Mar 29 10:22:50.068187 2017] [wsgi:warn] [pid 1571:tid 140332865791872] mod_wsgi: Runtime using Python/2.7.12.
[Wed Mar 29 10:22:50.070975 2017] [mpm_event:notice] [pid 1571:tid 140332865791872] AH00489: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12 configured -- resuming normal operations
[Wed Mar 29 10:22:50.071001 2017] [core:notice] [pid 1571:tid 140332865791872] AH00094: Command line: '/usr/sbin/apache2'
[Wed Mar 29 11:31:31.911160 2017] [mpm_event:notice] [pid 1571:tid 140332865791872] AH00491: caught SIGTERM, shutting down
[Wed Mar 29 11:33:34.967332 2017] [wsgi:warn] [pid 1559:tid 139850139666304] mod_wsgi: Compiled for Python/2.7.11.
[Wed Mar 29 11:33:34.979608 2017] [wsgi:warn] [pid 1559:tid 139850139666304] mod_wsgi: Runtime using Python/2.7.12.
[Wed Mar 29 11:33:34.982567 2017] [mpm_event:notice] [pid 1559:tid 139850139666304] AH00489: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12 configured -- resuming normal operations
[Wed Mar 29 11:33:34.982589 2017] [core:notice] [pid 1559:tid 139850139666304] AH00094: Command line: '/usr/sbin/apache2'
[Wed Mar 29 12:03:56.366665 2017] [mpm_event:notice] [pid 1559:tid 139850139666304] AH00491: caught SIGTERM, shutting down
[Thu Mar 30 13:10:43.749039 2017] [wsgi:warn] [pid 1682:tid 139702919534464] mod_wsgi: Compiled for Python/2.7.11.
[Thu Mar 30 13:10:43.764797 2017] [wsgi:warn] [pid 1682:tid 139702919534464] mod_wsgi: Runtime using Python/2.7.12.
[Thu Mar 30 13:10:43.768481 2017] [mpm_event:notice] [pid 1682:tid 139702919534464] AH00489: Apache/2.4.18 (Ubuntu) mod_wsgi/4.3.0 Python/2.7.12 configured -- resuming normal operations
[Thu Mar 30 13:10:43.768511 2017] [core:notice] [pid 1682:tid 139702919534464] AH00094: Command line: '/usr/sbin/apache2'

/var/log/glance/glance-api.log

2017-03-29 11:33:39.326 2088 INFO glance.common.wsgi [-] Started child 2127
2017-03-29 11:33:39.327 2127 INFO eventlet.wsgi.server [-] (2127) wsgi starting up on http://0.0.0.0:9292
2017-03-29 11:33:39.330 2088 INFO glance.common.wsgi [-] Started child 2128
2017-03-29 11:33:39.330 2128 INFO eventlet.wsgi.server [-] (2128) wsgi starting up on http://0.0.0.0:9292
2017-03-29 11:33:39.334 2088 INFO glance.common.wsgi [-] Started child 2129
2017-03-29 11:33:39.334 2129 INFO eventlet.wsgi.server [-] (2129) wsgi starting up on http://0.0.0.0:9292
2017-03-29 11:33:39.338 2088 INFO glance.common.wsgi [-] Started child 2130
2017-03-29 11:33:39.339 2130 INFO eventlet.wsgi.server [-] (2130) wsgi starting up on http://0.0.0.0:9292
2017-03-29 11:36:44.200 2126 WARNING keystonemiddleware.auth_token [-] Identity response: {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}
2017-03-29 11:36:44.322 2126 WARNING keystonemiddleware.auth_token [-] Identity response: {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}
2017-03-29 11:36:44.323 2126 CRITICAL keystonemiddleware.auth_token [-] Unable to validate token: Identity server rejected authorization necessary to fetch token data
2017-03-29 11:36:44.326 2126 INFO eventlet.wsgi.server [-] 192.168.10.11 - - [29/Mar/2017 11:36:44] "GET /v2/schemas/image HTTP/1.1" 503 259 2.551519

/var/log/glance/glance-registry.log

2017-03-29 11:33:39.073 2084 INFO glance.common.wsgi [-] Starting 6 workers
2017-03-29 11:33:39.083 2084 INFO glance.common.wsgi [-] Started child 2119
2017-03-29 11:33:39.084 2119 INFO eventlet.wsgi.server [-] (2119) wsgi starting up on http://0.0.0.0:9191
2017-03-29 11:33:39.086 2084 INFO glance.common.wsgi [-] Started child 2120
2017-03-29 11:33:39.087 2120 INFO eventlet.wsgi.server [-] (2120) wsgi starting up on http://0.0.0.0:9191
2017-03-29 11:33:39.090 2084 INFO glance.common.wsgi [-] Started child 2121
2017-03-29 11:33:39.091 2121 INFO eventlet.wsgi.server [-] (2121) wsgi starting up on http://0.0.0.0:9191
2017-03-29 11:33:39.093 2084 INFO glance.common.wsgi [-] Started child 2122
2017-03-29 11:33:39.094 2122 INFO eventlet.wsgi.server [-] (2122) wsgi starting up on http://0.0.0.0:9191
2017-03-29 11:33:39.096 2084 INFO glance.common.wsgi [-] Started child 2123
2017-03-29 11:33:39.097 2123 INFO eventlet.wsgi.server [-] (2123) wsgi starting up on http://0.0.0.0:9191
2017-03-29 11:33:39.100 2084 INFO glance.common.wsgi [-] Started child 2124
2017-03-29 11:33:39.101 2124 INFO eventlet.wsgi.server [-] (2124) wsgi starting up on http://0.0.0.0:9191
KrayzieGSX
  • 11
  • 1
  • 3

6 Answers6

1

I met same trouble before.

The log show user want to get token from keystone, but keystone refused because wsgi, authentication something like this. Just like your password is wrong, but your password is definitely right.

  • check your /etc/keystone/keystone-paste.ini is exist or not
  • check your keystone version
  • check you yum source is matched form you openstack version

    for example:

    if my openstack version is ocata, but I use this

    yum install centos-release-openstack-liberty
    

    if I did that, my keystone is definitely working

ChrisF
  • 134,786
  • 31
  • 255
  • 325
chy
  • 41
  • 4
1

I had exactly the same issue. same log file entries and so on. I found out that I had a wrong password for user glance. I reset it by using

(openstack user list .. to find out the user id)

openstack user set --password GLANCE_PWD  (user id)
Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
Oliver
  • 11
  • 1
1

I have found this issue and rectified the same using these steps :

  1. Check the password which you have set in the openrc file or in glance-api.conf
  2. Update the openstack image user password with the same password. 3 restart the service of image and apache. Hope it will work.
Deepak Mourya
  • 340
  • 2
  • 10
1

Look like your glance-api.conf/glance-registry.conf file has typo in one or more parameters.

Revisit the config file line by line & check any issues.

I remember, in my case, I had a typo in project_name variable which caused a similar issue.

nickl-
  • 8,417
  • 4
  • 42
  • 56
0

Your glance API and glance registry seem to be fine but both work in WSGI mode, so you need to have some Apache or other httpd server which will take API calls, send them over WSGI to your galnce servers, get response and send it back to client. I would recommend looking into your apache/httpd server logs, you can probably find more info why you getting 500 error.

  • 1
    Thanks for your help. I've had a look at the Apache2 logs. I see some SIGTERM warnings, appears to be shutting down a lot but not sure why. The glance-api.log has some authentication errors. glance-registry seems ok but does seem to use wsgi. According to the documentation, it is supposed to run Apache2 with the wsgi mod. I've added the new logs to my original post. – KrayzieGSX Apr 02 '17 at 15:46
  • 1
    2017-03-29 11:36:44.200 2126 WARNING keystonemiddleware.auth_token [-] Identity response: {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}} 2017-03-29 11:36:44.322 2126 WARNING keystonemiddleware.auth_token [-] Identity response: {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}} 2017-03-29 11:36:44.323 2126 CRITICAL keystonemiddleware.auth_token [-] Unable to validate token: Identity server rejected authorization necessary to fetch token data – Radosław Śmigielski Apr 03 '17 at 11:35
0

Below error may indicate that your glance is missing keystone credentials, in your glance config file you should have:

[keystone_authtoken]
admin_user=glance
admin_password=___SOME_SECRET_PASSWORD_GOES_HERE___
admin_tenant_name=service

2017-03-29 11:36:44.200 2126 WARNING keystonemiddleware.auth_token [-] Identity response: {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}} 2017-03-29 11:36:44.322 2126 WARNING keystonemiddleware.auth_token [-] Identity response: {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}} 2017-03-29 11:36:44.323 2126 CRITICAL keystonemiddleware.auth_token [-] Unable to validate token: Identity server rejected authorization necessary to fetch token data