skip to Main Content

When I try to create an image, I encounter a problem – The resource could not be found. (HTTP 404)

I do the following steps
edit the /etc/glance/glance-api.conf

[database] 
connection = mysql+pymysql://glance:glance@localhost/glance
[DEFAULT]
rabbit_password = openstack
rabbit_userid = openstack
rabbit_host = localhost
[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = openstack
memcached_servers = controller:11211
[paste_deploy]
flavor = keystone
[glance_store]
stores = file,http
default_store = file
filesystem_store_datadir = /var/lib/glance/images/

Edit the /etc/glance/glance-registry.conf

[database]
connection = mysql+pymysql://glance:glance@localhost/glance
[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = openstack
memcached_servers = controller:11211
[paste_deploy]
flavor = keystone

sync DB
root@controller:~# su -s /bin/sh -c "glance-manage db_sync" glance

And while create image get eror

root@controller:~# openstack image create "cirros-0.4.0-x86_64" --file /tmp/cirros-0.4.0-x86_64-disk.img --disk-format qcow2 --container-format bare --public
(http://controller:35357/v2/schemas/image): The resource could not be found. (HTTP 404)
root@controller:~#

openstack --version
openstack 3.12.2

glance-api --version
15.0.2

2

Answers


  1. Chosen as BEST ANSWER

    Im edit my .rc and it works

    root@controller:~# env | grep ^OS
    OS_REGION_NAME=RegionOne
    OS_USER_DOMAIN_NAME=default
    OS_IMAGE_API_VERSION=2
    OS_PROJECT_NAME=service
    OS_IDENTITY_API_VERSION=3
    OS_PASSWORD=openstack
    OS_DOMAIN_NAME=default
    OS_AUTH_TYPE=password
    OS_AUTH_URL=http://controller:35357/v3
    OS_USERNAME=glance
    OS_URL=http://controller:35357/v3
    OS_PROJECT_DOMAIN_NAME=default
    

  2. The problem is, that you use the wrong port. 35357 is the port of keystone, but openstack image create should trigger the port of glance, which is by default 9292. I think you have not configured the correct ports for the openstack endpoints. These should have been created by the openstack endpoint create command.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search