Ask Your Question
0

can not get Glance RESTful to work.

asked 2011-04-25 21:30:12 -0600

steve-chu gravatar image

I installed Glance to Fedora and I am be able to upload images by CLI add command. The CLI interface works fine but the RESTful interface does not. I am expecting to view image meta data by typing http://my-glance-api-server-ip/images/ in a browser window. I am getting connection timeout error. It seems neither port 9292 nor 9191 are opened up.

I can ping the IP but I cannot connect to port by command "telnet my-glance-api-server-ip 9292".

Running netstat -a on the host does not show these two ports (9191 or 9292) either.

Please help!

edit retag flag offensive close merge delete

19 answers

Sort by ยป oldest newest most voted
0

answered 2011-04-26 15:20:28 -0600

jaypipes gravatar image

Hi again, Steve :) Please do enable logging and post output from the API log and registry log. We'll go from there.

Cheers! jay

edit flag offensive delete link more
0

answered 2011-04-26 21:41:15 -0600

steve-chu gravatar image

This is API log 2011-04-26 06:07:04 DEBUG [glance-api] ************************* 2011-04-26 06:07:04 DEBUG [glance-api] Configuration options gathered from config file: 2011-04-26 06:07:04 DEBUG [glance-api] /usr/etc/glance.conf 2011-04-26 06:07:04 DEBUG [glance-api] ================================================ 2011-04-26 06:07:04 DEBUG [glance-api] bind_host 0.0.0.0 2011-04-26 06:07:04 DEBUG [glance-api] bind_port 9292 2011-04-26 06:07:04 DEBUG [glance-api] debug True 2011-04-26 06:07:04 DEBUG [glance-api] default_store file 2011-04-26 06:07:04 DEBUG [glance-api] filesystem_store_datadir /var/lib/glance/images/ 2011-04-26 06:07:04 DEBUG [glance-api] log_file /var/log/glance/api.log 2011-04-26 06:07:04 DEBUG [glance-api] registry_host 0.0.0.0 2011-04-26 06:07:04 DEBUG [glance-api] registry_port 9191 2011-04-26 06:07:04 DEBUG [glance-api] swift_store_auth_address 127.0.0.1:8080/v1.0/ 2011-04-26 06:07:04 DEBUG [glance-api] swift_store_container glance 2011-04-26 06:07:04 DEBUG [glance-api] swift_store_create_container_on_put False 2011-04-26 06:07:04 DEBUG [glance-api] swift_store_key a86850deb2742ec3cb41518e26aa2d89 2011-04-26 06:07:04 DEBUG [glance-api] swift_store_user jdoe 2011-04-26 06:07:04 DEBUG [glance-api] verbose True 2011-04-26 06:07:04 DEBUG [glance-api] ************************* 2011-04-26 06:07:04 DEBUG [routes.middleware] Initialized with method overriding = True, and path info altering = True 2011-04-26 06:07:04 DEBUG [eventlet.wsgi.server] (1990) wsgi starting up on http://0.0.0.0:9292/ 2011-04-26 06:07:06 DEBUG [routes.middleware] Matched GET /images 2011-04-26 06:07:06 DEBUG [routes.middleware] Route path: '/images', defaults: {'action': u'index', 'controller': } 2011-04-26 06:07:06 DEBUG [routes.middleware] Match dict: {'action': u'index', 'controller': } 2011-04-26 06:07:06 DEBUG [eventlet.wsgi.server] 127.0.0.1 - - [26/Apr/2011 06:07:06] "GET /images HTTP/1.1" 200 130 0.014728 2011-04-26 06:07:13 DEBUG [routes.middleware] Matched GET /images 2011-04-26 06:07:13 DEBUG [routes.middleware] Route path: '/images', defaults: {'action': u'index', 'controller': } 2011-04-26 06:07:13 DEBUG [routes.middleware] Match dict: {'action': u'index', 'controller': } 2011-04-26 06:07:13 DEBUG [eventlet.wsgi.server] 127.0.0.1 - - [26/Apr/2011 06:07:13] "GET /images HTTP/1.1" 200 130 0.006719 2011-04-26 06:07:26 DEBUG [routes.middleware] Matched GET /images 2011-04-26 06:07:26 DEBUG [routes.middleware] Route path: '/images', defaults: {'action': u'index', 'controller': } 2011-04-26 06:07:26 DEBUG [routes.middleware] Match dict: {'action': u'index', 'controller': } 2011-04-26 06:07:26 DEBUG [eventlet.wsgi.server] 127.0.0.1 - - [26/Apr/2011 06:07:26] "GET /images HTTP/1.1" 200 130 0.005924 2011-04-26 06:07:57 DEBUG [glance-api] ************************* 2011-04-26 06:07:57 DEBUG [glance-api] Configuration options gathered from config file: 2011-04-26 06:07:57 DEBUG [glance-api] /usr/etc/glance.conf 2011-04-26 06:07:57 DEBUG [glance-api] ================================================ 2011-04-26 06:07:57 DEBUG [glance-api] bind_host 0.0.0.0 2011-04-26 06:07:57 DEBUG [glance-api] bind_port 9292 2011-04-26 06:07:57 DEBUG [glance-api] debug True 2011-04-26 06:07:57 DEBUG [glance-api] default_store file 2011-04-26 06:07:57 DEBUG [glance-api] filesystem_store_datadir /var/lib/glance/images/ 2011-04-26 06:07:57 DEBUG [glance-api] log_file /var/log/glance/api.log 2011-04-26 06 ... (more)

edit flag offensive delete link more
0

answered 2011-04-26 21:41:27 -0600

steve-chu gravatar image

This is API log 2011-04-26 06:07:04 DEBUG [glance-api] ************************* 2011-04-26 06:07:04 DEBUG [glance-api] Configuration options gathered from config file: 2011-04-26 06:07:04 DEBUG [glance-api] /usr/etc/glance.conf 2011-04-26 06:07:04 DEBUG [glance-api] ================================================ 2011-04-26 06:07:04 DEBUG [glance-api] bind_host 0.0.0.0 2011-04-26 06:07:04 DEBUG [glance-api] bind_port 9292 2011-04-26 06:07:04 DEBUG [glance-api] debug True 2011-04-26 06:07:04 DEBUG [glance-api] default_store file 2011-04-26 06:07:04 DEBUG [glance-api] filesystem_store_datadir /var/lib/glance/images/ 2011-04-26 06:07:04 DEBUG [glance-api] log_file /var/log/glance/api.log 2011-04-26 06:07:04 DEBUG [glance-api] registry_host 0.0.0.0 2011-04-26 06:07:04 DEBUG [glance-api] registry_port 9191 2011-04-26 06:07:04 DEBUG [glance-api] swift_store_auth_address 127.0.0.1:8080/v1.0/ 2011-04-26 06:07:04 DEBUG [glance-api] swift_store_container glance 2011-04-26 06:07:04 DEBUG [glance-api] swift_store_create_container_on_put False 2011-04-26 06:07:04 DEBUG [glance-api] swift_store_key a86850deb2742ec3cb41518e26aa2d89 2011-04-26 06:07:04 DEBUG [glance-api] swift_store_user jdoe 2011-04-26 06:07:04 DEBUG [glance-api] verbose True 2011-04-26 06:07:04 DEBUG [glance-api] ************************* 2011-04-26 06:07:04 DEBUG [routes.middleware] Initialized with method overriding = True, and path info altering = True 2011-04-26 06:07:04 DEBUG [eventlet.wsgi.server] (1990) wsgi starting up on http://0.0.0.0:9292/ 2011-04-26 06:07:06 DEBUG [routes.middleware] Matched GET /images 2011-04-26 06:07:06 DEBUG [routes.middleware] Route path: '/images', defaults: {'action': u'index', 'controller': } 2011-04-26 06:07:06 DEBUG [routes.middleware] Match dict: {'action': u'index', 'controller': } 2011-04-26 06:07:06 DEBUG [eventlet.wsgi.server] 127.0.0.1 - - [26/Apr/2011 06:07:06] "GET /images HTTP/1.1" 200 130 0.014728 2011-04-26 06:07:13 DEBUG [routes.middleware] Matched GET /images 2011-04-26 06:07:13 DEBUG [routes.middleware] Route path: '/images', defaults: {'action': u'index', 'controller': } 2011-04-26 06:07:13 DEBUG [routes.middleware] Match dict: {'action': u'index', 'controller': } 2011-04-26 06:07:13 DEBUG [eventlet.wsgi.server] 127.0.0.1 - - [26/Apr/2011 06:07:13] "GET /images HTTP/1.1" 200 130 0.006719 2011-04-26 06:07:26 DEBUG [routes.middleware] Matched GET /images 2011-04-26 06:07:26 DEBUG [routes.middleware] Route path: '/images', defaults: {'action': u'index', 'controller': } 2011-04-26 06:07:26 DEBUG [routes.middleware] Match dict: {'action': u'index', 'controller': } 2011-04-26 06:07:26 DEBUG [eventlet.wsgi.server] 127.0.0.1 - - [26/Apr/2011 06:07:26] "GET /images HTTP/1.1" 200 130 0.005924 2011-04-26 06:07:57 DEBUG [glance-api] ************************* 2011-04-26 06:07:57 DEBUG [glance-api] Configuration options gathered from config file: 2011-04-26 06:07:57 DEBUG [glance-api] /usr/etc/glance.conf 2011-04-26 06:07:57 DEBUG [glance-api] ================================================ 2011-04-26 06:07:57 DEBUG [glance-api] bind_host 0.0.0.0 2011-04-26 06:07:57 DEBUG [glance-api] bind_port 9292 2011-04-26 06:07:57 DEBUG [glance-api] debug True 2011-04-26 06:07:57 DEBUG [glance-api] default_store file 2011-04-26 06:07:57 DEBUG [glance-api] filesystem_store_datadir /var/lib/glance/images/ 2011-04-26 06:07:57 DEBUG [glance-api] log_file /var/log/glance/api.log 2011-04-26 06 ... (more)

edit flag offensive delete link more
0

answered 2011-04-26 21:46:01 -0600

steve-chu gravatar image

Hi Jay,

I am sorry for adding the above two lengthy log files. One is api.log and the other one is registry.log file. The following URL does not return me any thing, "http://10.3.40.22/images/". Instead, it gives me "Connection timeout" error!

The RESTful interface is critical for our application. Please help!

Steve

edit flag offensive delete link more
0

answered 2011-04-26 22:14:51 -0600

jaypipes gravatar image

Hi!

Everything looks fine with your setup. It looks like you may have added the image as a non-public image?

Could you post the glance add command you executed? BTW, Does http://10.3.40.22/images/1 give anything?

-jay

edit flag offensive delete link more
0

answered 2011-04-26 22:51:36 -0600

steve-chu gravatar image

Add command syntax : sudo glance add -v name="My Image 1" is_public=true < /tmp/glance-2011.2.tar.gz --host=10.3.40.22

Index command syntax : sudo glance index --host=10.3.40.22

Index command output : Found 2 public images... ID Name Disk Format Container Format Size


1 my image raw ovf 1844532 6 My Image 1 raw ovf 120313

http://10.3.40.22/images/6 give the following error. The connection has timed out
The server at 10.3.40.22 is taking too long to respond.

edit flag offensive delete link more
0

answered 2011-04-26 22:53:46 -0600

jaypipes gravatar image

If you do:

glance show 6

do you get output?

-jay

edit flag offensive delete link more
0

answered 2011-04-26 22:54:39 -0600

steve-chu gravatar image

Add command syntax : sudo glance add -v name="My Image 1" is_public=true < /tmp/glance-2011.2.tar.gz --host=10.3.40.22

Index command syntax : sudo glance index --host=10.3.40.22

Index command output : Found 2 public images... ID Name Disk Format Container Format Size


1 my image raw ovf 1844532 6 My Image 1 raw ovf 120313

http://10.3.40.22/images/6 give the following error. The connection has timed out
The server at 10.3.40.22 is taking too long to respond.

edit flag offensive delete link more
0

answered 2011-04-26 23:24:36 -0600

steve-chu gravatar image

In the folder where the image is stored, I can see only one image file as the following: -rw-r--r--. 1 root root 120313 2011-04-26 08:07 1 -rw-r--r--. 1 root root 7168 2011-04-26 08:07 glance.sqlite

but "sudo glance index --host=10.3.40.22" shows two images as the following. Found 2 public images... ID Name Disk Format Container Format Size


1 my image raw ovf 1844532 6 My Image 1 raw ovf 120313

Command "sudo glance show 6 --host=10.3.40.22" shows image 6 as the following: URI: http://10.3.40.22/images/6 Id: 6 Public: Yes Name: My Image 1 Size: 120313 Location: file:///var/lib/glance/images/6 Disk format: raw Container format: ovf

edit flag offensive delete link more
0

answered 2011-04-27 02:33:03 -0600

steve-chu gravatar image

The image mata data is out of sych with image files. This is not the real problem. The real problem is that the RESTful interface is not consumable. Please help!

Steve Chu

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: 2011-04-25 21:30:12 -0600

Seen: 501 times

Last updated: Jun 17 '14