2012/04/29

Warning: failed to parse error message from AWS: :1:0: syntax error

Ref>
http://www.vpsee.com/2011/12/how-to-solve-failed-to-parse-error-message-from-aws-problem/

解决 Warning: failed to parse error message from AWS: :1:0: syntax error 问题

2011年12月6日 | 标签: openstack nova | 作者:vpsee

Warning: failed to parse error message from AWS: :1:0: syntax error 是个常见问题,很多朋友都在 Ubuntu 上安装和配置 OpenStack Nova 的时候遇到,100楼,120和120楼都遇到这个问题。引起这个问题的原因很多。如果遇到 nova-manage service list 服务都正常而 euca-describe-availability-zones verbose 报错的情况通常都是因为 novarc 这个文件捣鬼,nova 不能正确读取 novarc 里面的权限设置使得认证失败,认证失败当然也就不能正确执行命令了。
# nova-manage service list
Binary           Host      Zone        Status     State Updated_At
nova-scheduler   vpsee     nova        enabled    :-)   2011-12-05 13:26:51
nova-volume      vpsee     nova        enabled    :-)   2011-12-05 13:26:49
nova-network     vpsee     nova        enabled    :-)   2011-12-05 13:26:51
nova-compute     vpsee     nova        enabled    :-)   2011-12-05 13:26:52

# euca-describe-availability-zones verbose
Warning: failed to parse error message from AWS: :1:0: syntax error
None: None
修改 nova.conf 文件,在末尾明确加上 –use_deprecated_auth=true 这行(这个设置本来是默认的,以前版本的 OpenStack Nova 是不需要的),然后重启 nova 服务并重新生成 novacreds.zip,记得一定要 source novarc 哟:
# vi /etc/nova/nova.conf
...
--use_deprecated_auth=true

# restart libvirt-bin; restart nova-network; restart nova-compute;
restart nova-api; restart nova-objectstore; restart nova-scheduler;
restart nova-volume; restart glance-api; restart glance-registry

# nova-manage project zipfile mycloud vpsee /home/vpsee/creds/novacreds.zip
# cd /home/vpsee/creds
# unzip novacreds.zip
# chown -R vpsee:vpsee /home/vpsee/creds/

# source /home/vpsee/creds/novarc

# euca-describe-availability-zones verbose
AVAILABILITYZONE nova available
AVAILABILITYZONE |- vpsee
AVAILABILITYZONE | |- nova-scheduler enabled :-) 2011-12-05 13:32:44
AVAILABILITYZONE | |- nova-volume enabled :-) 2011-12-05 13:32:43
AVAILABILITYZONE | |- nova-network enabled :-) 2011-12-05 13:32:44
AVAILABILITYZONE | |- nova-compute enabled :-) 2011-12-05 13:32:47
再附带一句,OpenStack 正在飞速发展中,这样或那样的问题也许在新版本里就不存在了,以前没有的问题也可能第一次出现在新版本中。


沒有留言:

張貼留言