Connecting to Eucalyptus Walrus (S3) with Boto and socket.gaierror

If you are trying to perform any bucket operations on Eucalyptus Walrus (S3) service from boto and are getting “socket.gaierror: Errno -2 Name or service not known”, it’s because you did not specify the proper calling_format when creating your S3Connection object.

Default calling format is SubdomainCallingFormat which will attempt to send your requests to “{bucketname}.{s3_service_host}” - in case of Walrus, most likely it won’t resolve.

What you need for Walrus is OrdinaryCallingFormat. This is actually well documented at http://open.eucalyptus.com/wiki/ToolsEcosystem_boto. You can find corresponding code here.

Categories: cloud-computing | python |