Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

Hi, im having trouble with the glance service, after following the Docs to install glance. https://docs.openstack.org/glance/queens/install/install-debian.html im getting the following error when trying to create or list images.

root@controller02:~/# openstack image list
(http://controller02:35357/v3/v2/images): The resource could not be found. (HTTP 404) (Request-ID: req-d4876a12-c82e-40e0-b1af-cdd5df0113f0)

even though glance-api is running and listening on the 9292 port, and keystone on 5000 and 35357

root@controller02:~/# netstat -tnlp
...
tcp        0      0 0.0.0.0:9292            0.0.0.0:*               LISTEN      21727/python2
tcp6       0      0 :::35357                :::*                    LISTEN      11850/apache2
tcp6       0      0 :::5000                 :::*                    LISTEN      11850/apache2
tcp6       0      0 :::5000                 :::*                    LISTEN      11850/apache2
tcp6       0      0 :::5000                 :::*                    LISTEN      11850/apache2
tcp6       0      0 :::5000                 :::*                    LISTEN      11850/apache2

i created the service and the endpoints

root@controller02:~/# openstack service show glance
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | OpenStack Image                  |
| enabled     | True                             |
| id          | dd420cc446bd4cd891baf5732460811a |
| name        | glance                           |
| type        | image                            |
+-------------+----------------------------------+
root@controller02:~/# openstack endpoint list
+----------------------------------+-----------+--------------+--------------+---------+-----------+--------------------------+
| ID                               | Region    | Service Name | Service Type | Enabled | Interface | URL                      |
+----------------------------------+-----------+--------------+--------------+---------+-----------+--------------------------+
| 13595f0f483c428eaf4432afbfae9760 | RegionOne | glance       | image        | True    | public    | http://controller02:9292 |
| 2a790d5c7f3b43ff8d0ea3d62a28eced | RegionOne | glance       | image        | True    | internal  | http://controller02:9292 |
| 4e79eaccc12f4855b1b66c7c43d802e9 | RegionOne | glance       | image        | True    | admin     | http://controller02:9292 |
+----------------------------------+-----------+--------------+--------------+---------+-----------+--------------------------+

i'm not sure what's the problem, is it authentication ? any help is apreciated. Thanks.

@MheniMerz

This comment has been minimized.

Copy link
Owner Author

MheniMerz commented Jan 19, 2019

openstack --debug image list output

c7admin@controller02:~$ openstack --debug image list
START with options: [u'--debug', u'image', u'list']
options: Namespace(access_key='', access_secret='***', access_token='***', access_token_endpoint='', access_token_type='', application_credential_id='', application_credential_name='', application_credential_secret='***', auth_type='', auth_url='', cacert=None, cert='', client_id='', client_secret='***', cloud='', code='', consumer_key='', consumer_secret='***', debug=True, default_domain='default', default_domain_id='', default_domain_name='', deferred_help=False, discovery_endpoint='', domain_id='', domain_name='', endpoint='', identity_provider='', identity_provider_url='', insecure=None, interface='', key='', log_file=None, openid_scope='', os_beta_command=False, os_compute_api_version='', os_identity_api_version='3', os_image_api_version='', os_key_manager_api_version='1', os_network_api_version='', os_object_api_version='', os_orchestration_api_version='1', os_project_id=None, os_project_name=None, os_volume_api_version='', passcode='', password='***', profile='', project_domain_id='', project_domain_name='', project_id='', project_name='', protocol='', redirect_uri='', region_name='', remote_project_domain_id='', remote_project_domain_name='', remote_project_id='', remote_project_name='', service_provider='', service_provider_endpoint='', service_provider_entity_id='', system_scope='', timing=False, token='***', trust_id='', url='http://controller02:35357/v3', user_domain_id='', user_domain_name='', user_id='', username='', verbose_level=3, verify=None)
Auth plugin token_endpoint selected
auth_config_hook(): {'auth_type': 'token_endpoint', 'beta_command': False, u'compute_api_version': u'2', u'orchestration_api_version': '1', u'database_api_version': u'1.0', u'metering_api_version': u'2', u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'verify': True, u'dns_api_version': u'2', u'object_store_api_version': u'1', u'status': u'active', u'container_infra_api_version': u'1', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, u'baremetal_api_version': u'1', 'auth': {'token': '***'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', 'key': None, 'timing': False, u'application_catalog_api_version': u'1', 'cacert': None, u'key_manager_api_version': '1', u'workflow_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', u'volume_api_version': u'2', 'url': 'http://controller02:35357/v3', 'cert': None, u'secgroup_source': u'neutron', 'debug': True, u'interface': None, u'disable_vendor_agent': {}}
defaults: {u'auth_type': 'token_endpoint', u'status': u'active', u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', 'api_timeout': None, u'baremetal_api_version': u'1', u'image_api_version': u'2', u'container_infra_api_version': u'1', u'metering_api_version': u'2', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', 'cacert': None, u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', u'application_catalog_api_version': u'1', u'key_manager_api_version': u'v1', u'workflow_api_version': u'2', 'verify': True, u'identity_api_version': u'2.0', u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron', u'container_api_version': u'1', u'dns_api_version': u'2', u'object_store_api_version': u'1', u'interface': None, u'disable_vendor_agent': {}}
cloud cfg: {'auth_type': 'token_endpoint', 'beta_command': False, u'compute_api_version': u'2', u'orchestration_api_version': '1', u'database_api_version': u'1.0', u'metering_api_version': u'2', u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'verify': True, u'dns_api_version': u'2', u'object_store_api_version': u'1', u'status': u'active', u'container_infra_api_version': u'1', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, u'baremetal_api_version': u'1', 'auth': {'token': '***'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', 'key': None, 'timing': False, u'application_catalog_api_version': u'1', 'cacert': None, u'key_manager_api_version': '1', u'workflow_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', u'volume_api_version': u'2', 'url': 'http://controller02:35357/v3', 'cert': None, u'secgroup_source': u'neutron', 'debug': True, u'interface': None, u'disable_vendor_agent': {}}
compute API version 2, cmd group openstack.compute.v2
network API version 2, cmd group openstack.network.v2
image API version 2, cmd group openstack.image.v2
volume API version 2, cmd group openstack.volume.v2
identity API version 3, cmd group openstack.identity.v3
object_store API version 1, cmd group openstack.object_store.v1
neutronclient API version 2, cmd group openstack.neutronclient.v2
orchestration API version 1, cmd group openstack.orchestration.v1
key_manager API version 1, cmd group openstack.key_manager.v1
Auth plugin token_endpoint selected
auth_config_hook(): {'auth_type': 'token_endpoint', 'beta_command': False, u'compute_api_version': u'2', u'orchestration_api_version': '1', u'database_api_version': u'1.0', u'metering_api_version': u'2', u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'verify': True, u'dns_api_version': u'2', u'object_store_api_version': u'1', u'status': u'active', u'container_infra_api_version': u'1', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, u'baremetal_api_version': u'1', 'auth': {'token': '***'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', 'key': None, 'timing': False, u'application_catalog_api_version': u'1', 'cacert': None, u'key_manager_api_version': '1', u'workflow_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', u'volume_api_version': u'2', 'url': 'http://controller02:35357/v3', 'cert': None, u'secgroup_source': u'neutron', 'debug': True, u'interface': None, u'disable_vendor_agent': {}}
Auth plugin token_endpoint selected
auth_config_hook(): {'auth_type': 'token_endpoint', 'beta_command': False, u'compute_api_version': u'2', u'orchestration_api_version': '1', u'database_api_version': u'1.0', u'metering_api_version': u'2', u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'verify': True, u'dns_api_version': u'2', u'object_store_api_version': u'1', u'status': u'active', u'container_infra_api_version': u'1', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, u'baremetal_api_version': u'1', 'auth': {'token': '***'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', 'key': None, 'timing': False, u'application_catalog_api_version': u'1', 'cacert': None, u'key_manager_api_version': '1', u'workflow_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', u'volume_api_version': u'2', 'url': 'http://controller02:35357/v3', 'cert': None, u'secgroup_source': u'neutron', 'debug': True, u'interface': None, u'disable_vendor_agent': {}}
command: image list -> openstackclient.image.v2.image.ListImage (auth=True)
Auth plugin token_endpoint selected
auth_config_hook(): {'auth_type': 'token_endpoint', 'beta_command': False, u'compute_api_version': u'2', u'orchestration_api_version': '1', u'database_api_version': u'1.0', u'metering_api_version': u'2', u'network_api_version': u'2', u'message': u'', u'image_format': u'qcow2', 'networks': [], u'image_api_version': u'2', 'verify': True, u'dns_api_version': u'2', u'object_store_api_version': u'1', u'status': u'active', u'container_infra_api_version': u'1', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, u'baremetal_api_version': u'1', 'auth': {'token': '***'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', 'key': None, 'timing': False, u'application_catalog_api_version': u'1', 'cacert': None, u'key_manager_api_version': '1', u'workflow_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', u'volume_api_version': u'2', 'url': 'http://controller02:35357/v3', 'cert': None, u'secgroup_source': u'neutron', 'debug': True, u'interface': None, u'disable_vendor_agent': {}}
Using auth plugin: admin_token
Using parameters {'token': '***', 'endpoint': 'http://controller02:35357/v3'}
Get auth_ref
run(Namespace(columns=[], fit_width=False, formatter='table', limit=None, long=False, marker=None, max_width=0, name=None, noindent=False, page_size=None, print_empty=False, private=False, property=None, public=False, quote_mode='nonnumeric', shared=False, sort='name:asc', sort_columns=[], status=None))
Instantiating image client: <class 'glanceclient.v2.client.Client'>
Get auth_ref
Instantiating image api: <class 'openstackclient.api.image_v2.APIv2'>
Get auth_ref
REQ: curl -g -i -X GET "http://controller02:35357/v3/v2/images?marker=None" -H "User-Agent: osc-lib/1.9.0 keystoneauth1/3.4.0 python-requests/2.18.4 CPython/2.7.12" -H "X-Auth-Token: {SHA1}7b060912da4e7aefff190e6da8fcf19199c5a174"
Starting new HTTP connection (1): controller02
http://controller02:35357 "GET /v3/v2/images HTTP/1.1" 404 135
RESP: [404] Date: Sat, 19 Jan 2019 23:12:24 GMT Server: Apache/2.4.18 (Ubuntu) Vary: X-Auth-Token X-Distribution: Ubuntu x-openstack-request-id: req-e2410df3-bebd-4657-9bff-c50a0b354b76 Content-Length: 135 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: application/json
RESP BODY: {"error": {"message": "(http://controller02:35357/v3/v2/images): The resource could not be found.", "code": 404, "title": "Not Found"}}

GET call to None for http://controller02:35357/v3/v2/images used request id req-e2410df3-bebd-4657-9bff-c50a0b354b76
Request returned failure status: 404
(http://controller02:35357/v3/v2/images): The resource could not be found. (HTTP 404) (Request-ID: req-e2410df3-bebd-4657-9bff-c50a0b354b76)
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 116, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/dist-packages/openstackclient/image/v2/image.py", line 564, in take_action
    page = image_client.api.image_list(marker=marker, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openstackclient/api/image_v2.py", line 74, in image_list
    return self.list(url, **filter)['images']
  File "/usr/lib/python2.7/dist-packages/openstackclient/api/api.py", line 198, in list
    params=params,
  File "/usr/lib/python2.7/dist-packages/openstackclient/api/api.py", line 84, in _request
    return session.request(url, method, **kwargs)
  File "/usr/lib/python2.7/dist-packages/osc_lib/session.py", line 40, in request
    resp = super(TimingSession, self).request(url, method, **kwargs)
  File "/usr/lib/python2.7/dist-packages/keystoneauth1/session.py", line 737, in request
    raise exceptions.from_response(resp, method, url)
NotFound: (http://controller02:35357/v3/v2/images): The resource could not be found. (HTTP 404) (Request-ID: req-e2410df3-bebd-4657-9bff-c50a0b354b76)
clean_up ListImage: (http://controller02:35357/v3/v2/images): The resource could not be found. (HTTP 404) (Request-ID: req-e2410df3-bebd-4657-9bff-c50a0b354b76)
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/osc_lib/shell.py", line 134, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 279, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/dist-packages/osc_lib/shell.py", line 169, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 116, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/dist-packages/openstackclient/image/v2/image.py", line 564, in take_action
    page = image_client.api.image_list(marker=marker, **kwargs)
  File "/usr/lib/python2.7/dist-packages/openstackclient/api/image_v2.py", line 74, in image_list
    return self.list(url, **filter)['images']
  File "/usr/lib/python2.7/dist-packages/openstackclient/api/api.py", line 198, in list
    params=params,
  File "/usr/lib/python2.7/dist-packages/openstackclient/api/api.py", line 84, in _request
    return session.request(url, method, **kwargs)
  File "/usr/lib/python2.7/dist-packages/osc_lib/session.py", line 40, in request
    resp = super(TimingSession, self).request(url, method, **kwargs)
  File "/usr/lib/python2.7/dist-packages/keystoneauth1/session.py", line 737, in request
    raise exceptions.from_response(resp, method, url)
NotFound: (http://controller02:35357/v3/v2/images): The resource could not be found. (HTTP 404) (Request-ID: req-e2410df3-bebd-4657-9bff-c50a0b354b76)

END return value: 1
@MheniMerz

This comment has been minimized.

Copy link
Owner Author

MheniMerz commented Jan 19, 2019

errors in /var/log/glance/*

c7admin@controller02:~$ grep 'ERROR' /var/log/glance/*

warnings in /var/log/glance/*

c7admin@controller02:~$ grep 'WARNING' /var/log/glance/*
/var/log/glance/glance-api.log.1:2019-01-17 21:22:22.019 21383 WARNING keystonemiddleware._common.config [-] The option "__file__" in conf is not known to auth_token
/var/log/glance/glance-api.log.1:2019-01-17 21:22:22.020 21383 WARNING keystonemiddleware._common.config [-] The option "here" in conf is not known to auth_token
/var/log/glance/glance-api.log.1:2019-01-17 21:22:22.022 21383 WARNING keystonemiddleware.auth_token [-] AuthToken middleware is set with keystone_authtoken.service_token_roles_required set to False. This is backwards compatible but deprecated behaviour. Please set this to True.
/var/log/glance/glance-api.log.1:2019-01-17 21:22:22.026 21383 WARNING oslo_config.cfg [-] Option "auth_uri" from group "keystone_authtoken" is deprecated. Use option "www_authenticate_uri" from group "keystone_authtoken".
/var/log/glance/glance-api.log.1:2019-01-17 21:45:22.958 21727 WARNING keystonemiddleware._common.config [-] The option "__file__" in conf is not known to auth_token
/var/log/glance/glance-api.log.1:2019-01-17 21:45:22.958 21727 WARNING keystonemiddleware._common.config [-] The option "here" in conf is not known to auth_token
/var/log/glance/glance-api.log.1:2019-01-17 21:45:22.961 21727 WARNING keystonemiddleware.auth_token [-] AuthToken middleware is set with keystone_authtoken.service_token_roles_required set to False. This is backwards compatible but deprecated behaviour. Please set this to True.
/var/log/glance/glance-api.log.1:2019-01-17 21:45:22.964 21727 WARNING oslo_config.cfg [-] Option "auth_uri" from group "keystone_authtoken" is deprecated. Use option "www_authenticate_uri" from group "keystone_authtoken".
/var/log/glance/glance-registry.log.1:2019-01-17 21:22:15.427 21355 WARNING keystonemiddleware._common.config [-] The option "__file__" in conf is not known to auth_token
/var/log/glance/glance-registry.log.1:2019-01-17 21:22:15.427 21355 WARNING keystonemiddleware._common.config [-] The option "here" in conf is not known to auth_token
/var/log/glance/glance-registry.log.1:2019-01-17 21:22:15.429 21355 WARNING keystonemiddleware.auth_token [-] AuthToken middleware is set with keystone_authtoken.service_token_roles_required set to False. This is backwards compatible but deprecated behaviour. Please set this to True.
/var/log/glance/glance-registry.log.1:2019-01-17 21:22:15.432 21355 WARNING oslo_config.cfg [-] Option "auth_uri" from group "keystone_authtoken" is deprecated. Use option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.