Problems with Amazon API

Asked by Diego Lalo

       Hi everyone, it's me again!!! This time the issue I'm having is with the Amazon API, when I try to execute euca-describe-images I get the following error, I updated nova packages to the latest version and I also restarted the service several times:

euca-describe-images -a -A a51b818e-5f3b-4a3b-9145-70897d95597f:caqui -S 166011db-ab6f-4831-80b8-719e62376553 -U http://192.168.1.208:8773/services/Cloud
Warning: failed to parse error message from AWS: <unknown>:1:0: syntax error
BotoServerError: 500 Internal Server Error
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/eventlet/wsgi.py", line 336, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/pymodules/python2.6/paste/urlmap.py", line 203, in __call__
    return app(environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/pymodules/python2.6/nova/api/ec2/__init__.py", line 59, in __call__
    rv = req.get_response(self.application)
  File "/usr/lib/pymodules/python2.6/webob/request.py", line 919, in get_response
    application, catch_exc_info=False)
  File "/usr/lib/pymodules/python2.6/webob/request.py", line 887, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/pymodules/python2.6/nova/api/ec2/__init__.py", line 169, in __call__
    req.path)
  File "/usr/lib/pymodules/python2.6/nova/auth/manager.py", line 269, in authenticate
    user = self.get_user_from_access_key(access_key)
  File "/usr/lib/pymodules/python2.6/nova/auth/manager.py", line 615, in get_user_from_access_key
    user_dict = drv.get_user_from_access_key(access_key)
  File "/usr/lib/pymodules/python2.6/nova/auth/dbdriver.py", line 53, in get_user_from_access_key
    user = db.user_get_by_access_key(context.get_admin_context(), access)
  File "/usr/lib/pymodules/python2.6/nova/db/api.py", line 956, in user_get_by_access_key
    return IMPL.user_get_by_access_key(context, access_key)
  File "/usr/lib/pymodules/python2.6/nova/db/sqlalchemy/api.py", line 98, in wrapper
    return f(*args, **kwargs)
  File "/usr/lib/pymodules/python2.6/nova/db/sqlalchemy/api.py", line 1996, in user_get_by_access_key
    filter_by(deleted=can_read_deleted(context)).\
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1496, in first
    ret = list(self[0:1])
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1405, in __getitem__
    return list(res)
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1565, in __iter__
    return self._execute_and_instances(context)
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1570, in _execute_and_instances
    mapper=self._mapper_zero_or_none())
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/session.py", line 735, in execute
    clause, params or {})
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1157, in execute
    params)
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1237, in _execute_clauseelement
    return self.__execute_context(context)
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1268, in __execute_context
    context.parameters[0], context=context)
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1367, in _cursor_execute
    context)
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1360, in _cursor_execute
    context)
  File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/default.py", line 288, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (OperationalError) no such table: users u'SELECT users.created_at AS users_created_at, users.updated_at AS users_updated_at, users.deleted_at AS users_deleted_at, users.deleted AS users_deleted, users.id AS users_id, users.name AS users_name, users.access_key AS users_access_key, users.secret_key AS users_secret_key, users.is_admin AS users_is_admin \nFROM users \nWHERE users.access_key = ? AND users.deleted = ? \n LIMIT 1 OFFSET 0' ('a51b818e-5f3b-4a3b-9145-70897d95597f', False)

           I checked nova database and the table users is present, I also executed nova-manage db sync

Cheers
Diego

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
Vish Ishaya (vishvananda) said :
#1

It looks like one of the nova-*** (probably nova-api) is connecting to the wrong db. Is it possible they aren't all loading the same flagfile?
On Apr 20, 2011, at 6:35 AM, Diego Lalo wrote:

> New question #153593 on OpenStack Compute (nova):
> https://answers.launchpad.net/nova/+question/153593
>
> Hi everyone, it's me again!!! This time the issue I'm having is with the Amazon API, when I try to execute euca-describe-images I get the following error, I updated nova packages to the latest version and I also restarted the service several times:
>
> euca-describe-images -a -A a51b818e-5f3b-4a3b-9145-70897d95597f:caqui -S 166011db-ab6f-4831-80b8-719e62376553 -U http://192.168.1.208:8773/services/Cloud
> Warning: failed to parse error message from AWS: <unknown>:1:0: syntax error
> BotoServerError: 500 Internal Server Error
> Traceback (most recent call last):
> File "/usr/lib/pymodules/python2.6/eventlet/wsgi.py", line 336, in handle_one_response
> result = self.application(self.environ, start_response)
> File "/usr/lib/pymodules/python2.6/paste/urlmap.py", line 203, in __call__
> return app(environ, start_response)
> File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__
> resp = self.call_func(req, *args, **self.kwargs)
> File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
> return self.func(req, *args, **kwargs)
> File "/usr/lib/pymodules/python2.6/nova/api/ec2/__init__.py", line 59, in __call__
> rv = req.get_response(self.application)
> File "/usr/lib/pymodules/python2.6/webob/request.py", line 919, in get_response
> application, catch_exc_info=False)
> File "/usr/lib/pymodules/python2.6/webob/request.py", line 887, in call_application
> app_iter = application(self.environ, start_response)
> File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__
> resp = self.call_func(req, *args, **self.kwargs)
> File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
> return self.func(req, *args, **kwargs)
> File "/usr/lib/pymodules/python2.6/nova/api/ec2/__init__.py", line 169, in __call__
> req.path)
> File "/usr/lib/pymodules/python2.6/nova/auth/manager.py", line 269, in authenticate
> user = self.get_user_from_access_key(access_key)
> File "/usr/lib/pymodules/python2.6/nova/auth/manager.py", line 615, in get_user_from_access_key
> user_dict = drv.get_user_from_access_key(access_key)
> File "/usr/lib/pymodules/python2.6/nova/auth/dbdriver.py", line 53, in get_user_from_access_key
> user = db.user_get_by_access_key(context.get_admin_context(), access)
> File "/usr/lib/pymodules/python2.6/nova/db/api.py", line 956, in user_get_by_access_key
> return IMPL.user_get_by_access_key(context, access_key)
> File "/usr/lib/pymodules/python2.6/nova/db/sqlalchemy/api.py", line 98, in wrapper
> return f(*args, **kwargs)
> File "/usr/lib/pymodules/python2.6/nova/db/sqlalchemy/api.py", line 1996, in user_get_by_access_key
> filter_by(deleted=can_read_deleted(context)).\
> File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1496, in first
> ret = list(self[0:1])
> File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1405, in __getitem__
> return list(res)
> File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1565, in __iter__
> return self._execute_and_instances(context)
> File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/query.py", line 1570, in _execute_and_instances
> mapper=self._mapper_zero_or_none())
> File "/usr/lib/python2.6/dist-packages/sqlalchemy/orm/session.py", line 735, in execute
> clause, params or {})
> File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1157, in execute
> params)
> File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1237, in _execute_clauseelement
> return self.__execute_context(context)
> File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1268, in __execute_context
> context.parameters[0], context=context)
> File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1367, in _cursor_execute
> context)
> File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/base.py", line 1360, in _cursor_execute
> context)
> File "/usr/lib/python2.6/dist-packages/sqlalchemy/engine/default.py", line 288, in do_execute
> cursor.execute(statement, parameters)
> OperationalError: (OperationalError) no such table: users u'SELECT users.created_at AS users_created_at, users.updated_at AS users_updated_at, users.deleted_at AS users_deleted_at, users.deleted AS users_deleted, users.id AS users_id, users.name AS users_name, users.access_key AS users_access_key, users.secret_key AS users_secret_key, users.is_admin AS users_is_admin \nFROM users \nWHERE users.access_key = ? AND users.deleted = ? \n LIMIT 1 OFFSET 0' ('a51b818e-5f3b-4a3b-9145-70897d95597f', False)
>
> I checked nova database and the table users is present, I also executed nova-manage db sync
>
>
> Cheers
> Diego
>
> --
> 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
Diego Lalo (diego-lalo) said :
#2

Here is the flagfile which is in /etc/nova/nova.conf

--dhcpbridge_flagfile=/etc/nova/nova.conf
--dhcpbridge=/usr/bin/nova-dhcpbridge
--logdir=/var/log/nova
--state_path=/var/lib/nova
--verbose
--s3_host=192.168.1.208
--rabbit_host=192.168.1.208
--cc_host=192.168.1.208
--ec2_url=http://192.168.1.208:8773/services/Cloud
--fixed_range=10.0.0.0/12
--network_size=8
--FAKE_subdomain=ec2
--routing_source_ip=192.168.1.208
--sql_connection=mysql://root:nova@192.168.1.208/nova

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

and you are specifying that flagfile when you start nova?
either with:
nova-api --flagfile=/etc/nova/nova.conf
or from packages:
start nova-api

Vish

On Apr 20, 2011, at 7:57 AM, Diego Lalo wrote:

> Question #153593 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/153593
>
> Status: Answered => Open
>
> Diego Lalo is still having a problem:
> Here is the flagfile which is in /etc/nova/nova.conf
>
> --dhcpbridge_flagfile=/etc/nova/nova.conf
> --dhcpbridge=/usr/bin/nova-dhcpbridge
> --logdir=/var/log/nova
> --state_path=/var/lib/nova
> --verbose
> --s3_host=192.168.1.208
> --rabbit_host=192.168.1.208
> --cc_host=192.168.1.208
> --ec2_url=http://192.168.1.208:8773/services/Cloud
> --fixed_range=10.0.0.0/12
> --network_size=8
> --FAKE_subdomain=ec2
> --routing_source_ip=192.168.1.208
> --sql_connection=mysql://root:nova@192.168.1.208/nova
>
> --
> 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
Diego Lalo (diego-lalo) said :
#4

         I tried executing: nova-api --flagfile=/etc/nova/nova.conf but I still having the same problem. What do you mean with specify the flagfile from packages? Should I specify the flagfile in nova.conf file?

cheers
Diego

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

if you run from ubuntu packages the upstart scripts take care of setting the flagfile for you.

On Apr 20, 2011, at 8:44 AM, Diego Lalo wrote:

> Question #153593 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/153593
>
> Status: Answered => Open
>
> Diego Lalo is still having a problem:
> I tried executing: nova-api --flagfile=/etc/nova/nova.conf but
> I still having the same problem. What do you mean with specify the
> flagfile from packages? Should I specify the flagfile in nova.conf file?
>
>
> cheers
> Diego
>
> --
> 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
Diego Lalo (diego-lalo) said :
#6

  How can I run from ubuntu packages? What I always did was: service nova-xxxx restart, is that what you mean?

Cheers and thanx for your quick answers :)
Diego

Revision history for this message
Monty Taylor (mordred) said :
#7

service XXXX restart

is the redhat way of running init scripts. Ubuntu uses upstart, which uses the commands start and stop. So:

start nova-api

should get you going

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

Yes, service nova-xxx restart is the same as restart nova-xxx

On Apr 20, 2011, at 9:22 AM, Diego Lalo wrote:

> Question #153593 on OpenStack Compute (nova) changed:
> https://answers.launchpad.net/nova/+question/153593
>
> Status: Answered => Open
>
> Diego Lalo is still having a problem:
> How can I run from ubuntu packages? What I always did was: service
> nova-xxxx restart, is that what you mean?
>
>
> Cheers and thanx for your quick answers :)
> Diego
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Can you help with this problem?

Provide an answer of your own, or ask Diego Lalo for more information if necessary.

To post a message you must log in.