Error uploading image: (SSLError): [Errno 1] _ssl.c:499: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

Asked by Hugo Kou on 2011-10-26

keystone working for both glance and swift ...
Swift 1.4.4 is working well

but when I try to make glance backend stored by swift ... there's the error

============================================
root@glance:~# glance -v add name="testing" is_public=true < glance.sqlite
Failed to add image. Got error:
Data supplied was not valid.
Details: 400 Bad Request

The server could not comply with the request since it is either malformed or otherwise incorrect.

 Error uploading image: (SSLError): [Errno 1] _ssl.c:499: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Note: Your image metadata may still be in the registry, but the image's status will likely be 'killed'.
Completed in 31.4045 sec.
============================================

glance-api.conf
http://pastebin.com/FBmcGDHJ

glance-registry.conf
http://pastebin.com/DsVJteB4

===========================================

Our swift runs on a normal http port 8888
And auth by keystone , also glance auth by keystone ,
When I upload image which store in glance local FS , it works .
Swift working well when uploading / listing objects for us.
But when I integrate them , this error occurred ....

Does glance must using https protocol to communicate with swift ?

Question information

Language:
English Edit question
Status:
Solved
For:
Glance Edit question
Assignee:
No assignee Edit question
Solved by:
Hugo Kou
Solved:
2011-10-26
Last query:
2011-10-26
Last reply:
2011-10-26
Jay Pipes (jaypipes) said : #1

Hi!

In your glance-api.conf, change this:

swift_store_auth_address = 10.103.0.81:5000/v1.0/

to this:

swift_store_auth_address = http://10.103.0.81:5000/v1.0/

Default is HTTPS for Swift, so need to manually set to HTTP.

Cheers,
-jay

Hugo Kou (tonytkdk) said : #2

As I thought before, thanks for your confirm!
I'll have a try tmr, does any doc note this usage currently?
Or I can note it into openstack-manuals.

Hugo Kuo

Jay Pipes (jaypipes) said : #3

Hey again,

http://glance.openstack.org/configuring.html#configuring-the-swift-storage-backend

Looks like it does NOT mention the HTTPS default. I'll add a bug about that.

Thanks!
-jay

antiError (zhonghuabaima0913) said : #4

Does anyone resolve this question??? I didn't use swift.

Jay Pipes (jaypipes) said : #5

anitError, could you provide specifics of the error you are getting please? Thanks,
-jay

Jay Pipes (jaypipes) said : #6

antiError, please also open a new Question. This one was marked closed quite some time ago.

Best,
-jay

0xff (hoker-ffb) said : #7

I got the same error:

root@pyw:~# glance -v add name="ubuntu" is_public=true<./ubuntu.tar.gz Uploading image 'ubuntu'
===========================================[100%] 116.179371M/s, ETA 0h 0m 0s
Failed to add image. Got error:
Data supplied was not valid.
Details: 400 Bad Request

The server could not comply with the request since it is either malformed or otherwise incorrect.

 Failed to activate image. Got error: Data supplied was not valid. Details: 400 Bad Request The server could not comply with the request since it is either malformed or otherwise incorrect. Failed to update image metadata. Got error: Data supplied was not valid. Details: Invalid disk format 'None' for image.
Note: Your image metadata may still be in the registry, but the image's status will likely be 'killed'.
Completed in 2.1649 sec.

antiError (zhonghuabaima0913) said : #8

dear ,
you should write the value of disk_format and container_format ,

hope to help you .

Hugo Kou (tonytkdk) said : #9

Example as follow :

 glance -v add name="ubuntu" is_public=true disk_format=raw container_format=bare <./ubuntu.tar.gz Uploading image