Unable to run euca-describe-images/use cloud-publish commands

Asked by Daniel Nelson

I installed OpenStack manually on an Ubuntu 11.10 64bit desktop edition using the most recent (11/11/11) starter guide (http://docs.openstack.org/diablo/openstack-compute/starter/content/). While I have a server2 and client1 set up, I'm doing all this on server1 just while I'm testing/evaluating.

I am trying to upload the basic starter image included in the OpenStack documentation (http://docs.openstack.org/cactus/openstack-compute/admin/content/starting-images.html) and I'm getting the following error:

cloud-publish-tarball ubuntu1010-UEC-localuser-image.tar.gz dub-bucket x86_64
Unable to run euca-describe-images. Is environment for euca- set up?

I have sourced the novarc file, and other euca commands (such as euca-describe-availability-zones verbose) still work. However, when I run euca-describe-images, I get this

euca-describe-images
UnknownError: An unknown error has occurred. Please try your request again.

I'm getting another problem when I try to upload my own serverfinal.img (also from the starter guide).

cloud-publish-image x86_64 serverfinal.img bucket1
failed to check for existing manifest

Nothing is showing up in the logs I'm looking at (/var/log/nova/*, /var/log/glance/*, /var/sys/syslog).

Right now I'm using a single-system install, though I've tried using a separate compute as a client only to get the same problem. I have re-installed from scratch once already to now avail. All the other processes seem to be working.

euca-describe-availability-zones verbose
AVAILABILITYZONE nova available
AVAILABILITYZONE |- openstack
AVAILABILITYZONE | |- nova-network enabled :-) 2011-11-16 19:07:39.292915
AVAILABILITYZONE | |- nova-scheduler enabled :-) 2011-11-16 19:07:33.657253
AVAILABILITYZONE | |- nova-compute enabled :-) 2011-11-16 19:07:33.857399
AVAILABILITYZONE | |- nova-volume enabled :-) 2011-11-16 19:07:33.748850

Any help would be much appreciated, and if you need any more info, please let me know.

Question information

Language:
English Edit question
Status:
Answered
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
dipak (dipak87) said :
#1

Hi,

i am having exactly the same problem. I had a fully working openstack installation of Cactus and wanted to migrate to Diablo. After the migration everything seems to be working apart from the euca-describe-images. Because of which I am not able to publish/upload any new images. I have sourced a number of times but no use. It always says that I not set up euca. Waiting for someone to show a way here !

Revision history for this message
Vish Ishaya (vishvananda) said :
#2

do you have --use_deprecated_auth set to true (definitely needed when you export the rc file)?

also, you should check the rc file that you are sourcing and make sure that the ip looks correct in EC2_URL

Vish

On Nov 29, 2011, at 6:30 AM, dipak wrote:

> Question #179016 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/179016
>
> dipak posted a new comment:
> Hi,
>
> i am having exactly the same problem. I had a fully working openstack
> installation of Cactus and wanted to migrate to Diablo. After the
> migration everything seems to be working apart from the euca-describe-
> images. Because of which I am not able to publish/upload any new images.
> I have sourced a number of times but no use. It always says that I not
> set up euca. Waiting for someone to show a way here !
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Revision history for this message
jjrp78 (jjrp78) said :
#3

Same here, have you found a walk around?

Revision history for this message
Michael Still (mikal) said :
#4

I was getting this too. Looking at my /var/lib/nova/ log files, I was getting:

2011-12-30 15:07:13,022 ERROR nova.api [xxx mikal default_project] Unexpected error raised: Unable to connect to server. Got error: [Errno 111] ECONNREFUSED
(nova.api): TRACE: Traceback (most recent call last):
(nova.api): TRACE: File "/usr/lib/python2.7/dist-packages/nova/api/ec2/__init__.py", line 348, in __call__
(nova.api): TRACE: result = api_request.invoke(context)
(nova.api): TRACE: File "/usr/lib/python2.7/dist-packages/nova/api/ec2/apirequest.py", line 78, in invoke
(nova.api): TRACE: result = method(context, **args)
(nova.api): TRACE: File "/usr/lib/python2.7/dist-packages/nova/api/ec2/cloud.py", line 1561, in describe_images
(nova.api): TRACE: images = self.image_service.detail(context)
(nova.api): TRACE: File "/usr/lib/python2.7/dist-packages/nova/image/s3.py", line 78, in detail
(nova.api): TRACE: return self.service.detail(context)
(nova.api): TRACE: File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 161, in detail
(nova.api): TRACE: for image_meta in image_metas:
(nova.api): TRACE: File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 190, in _fetch_images
(nova.api): TRACE: images = fetch_func(**kwargs)
(nova.api): TRACE: File "/usr/lib/python2.7/dist-packages/glance/client.py", line 69, in get_images_detailed
(nova.api): TRACE: res = self.do_request("GET", "/images/detail", params=params)
(nova.api): TRACE: File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 140, in do_request
(nova.api): TRACE: method, action, body=body, headers=headers, params=params)
(nova.api): TRACE: File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 238, in _do_request
(nova.api): TRACE: "server. Got error: %s" % e)
(nova.api): TRACE: ClientConnectionError: Unable to connect to server. Got error: [Errno 111] ECONNREFUSED
(nova.api): TRACE:

Most of that trace is irrelevant, except that its saying that the connection to the glance service failed. This is because the instructions forgot to mention installing glance.

apt-get install glance

fixed the problem for me.

Cheers,
Mikal

Revision history for this message
Toshiharu Harada (haradats) said :
#5

I experienced exactly the same problem and I found that it happens when glance cannot connect the DB.

Find and check the line "sql_connection" in /etc/glance/glance-registry.conf.

If you are using MySQL,

  you should see the line something like:
  sql_connection = mysql://glancedbadmin:glancesecret@10.10.10.2/glance
  then try connecting the mysqld with the user and pairs described in the line.
  (mysql -uglancedbadmin -pglancesecret)

Hope this helps.

Cheers,
Toshi

Revision history for this message
freakalad (freakalad) said :
#6

I'm caught up at exactly the same place, via the official Ubuntu Server Guide (on a brand new machine): https://help.ubuntu.com/12.04/serverguide/ubuntucloud.html#ubuntu-cloud-running-instances

I've tried with distro=lucid & lucid=precise, followed by (as per guide):
`sudo cloud-publish-tarball "$distro"-server-cloudimg-amd64.tar.gz "$distro"_amd64`

but I still get:
Unable to run euca--describe-images. Is environment for euca- set up?

The MySQL auth defined in /etc/glance/glance-registry.conf works OK when I manually log in as per the suggestion @ the previous post.

/me digging now @ IRC for a possible cause/solution.
Seems most likely that the guide/post is incomplete or inaccurate

Revision history for this message
manish (manishnegi) said :
#7

Try this solution this worked for me -

distro=precise
wget http://cloud-images.ubuntu.com/$distro/current/$distro-server-cloudimg-amd64.tar.gz

Extract the Ubuntu package and go inside the extracted folder and type the following command:-

sudo glance add name="Ubuntu 12.04 cloudimg amd64" is_public=true container_format=ovf disk_format=qcow2 < precise-server-cloudimg-amd64.img

To see the uploaded image type -
 glance image-list

Can you help with this problem?

Provide an answer of your own, or ask Daniel Nelson for more information if necessary.

To post a message you must log in.