The request and response to nova-api is as follows:
root@SVCLO-OSS-COMPUTE-VM01:~# telnet localhost 8774
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
POST http://10.1.168.158:8774/v1.1/servers HTTP/1.1
Content-Type:application/xml
Accept:application/xml
X-Auth-Token:59bb0bbfde79a5515af96ab94d3698279d05c43e
<?xml version="1.0" encoding="UTF-8"?><server xmlns="http://docs.rackspacecloud.com/servers/api/v1.0" name="hello" imageId="1389280188" flavorId="1"></server>
HTTP/1.1 500 Internal Server Error
Content-Length: 180
Content-Type: application/xml; charset=UTF-8
Date: Thu, 28 Jul 2011 10:34:44 GMT
<cloudServersFault code="500" xmlns="http://docs.rackspacecloud.com/servers/api/v1.0">
<message>
no element found: line 1, column 0
</message>
</cloudServersFault>
Connection closed by foreign host.
root@SVCLO-OSS-COMPUTE-VM01:~#
root@SVCLO-OSS-COMPUTE-VM01:~#
The nova-api log displays :
2011-07-28 06:34:44,828 DEBUG routes.middleware [-] No route matched for POST /servers from (pid=9629) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:97
2011-07-28 06:34:44,828 DEBUG routes.middleware [-] Matched POST /servers from (pid=9629) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:100
2011-07-28 06:34:44,829 DEBUG routes.middleware [-] Route path: '/servers', defaults: {'action': u'create', 'controller': <nova.api.openstack.servers.ControllerV11 object at 0x25d6390>} from (pid=9629) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:102
2011-07-28 06:34:44,829 DEBUG routes.middleware [-] Match dict: {'action': u'create', 'controller': <nova.api.openstack.servers.ControllerV11 object at 0x25d6390>} from (pid=9629) __call__ /usr/lib/pymodules/python2.6/routes/middleware.py:103
2011-07-28 06:34:44,829 ERROR nova.api.openstack [-] Caught error: no element found: line 1, column 0
(nova.api.openstack): TRACE: Traceback (most recent call last):
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/nova/api/openstack/__init__.py", line 59, in __call__
(nova.api.openstack): TRACE: return req.get_response(self.application)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/request.py", line 919, in get_response
(nova.api.openstack): TRACE: application, catch_exc_info=False)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/request.py", line 887, in call_application
(nova.api.openstack): TRACE: app_iter = application(self.environ, start_response)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
(nova.api.openstack): TRACE: return resp(environ, start_response)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
(nova.api.openstack): TRACE: return resp(environ, start_response)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
(nova.api.openstack): TRACE: return resp(environ, start_response)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/routes/middleware.py", line 131, in __call__
(nova.api.openstack): TRACE: response = self.app(environ, start_response)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
(nova.api.openstack): TRACE: return resp(environ, start_response)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
(nova.api.openstack): TRACE: return resp(environ, start_response)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/routes/middleware.py", line 131, in __call__
(nova.api.openstack): TRACE: response = self.app(environ, start_response)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/dec.py", line 159, in __call__
(nova.api.openstack): TRACE: return resp(environ, start_response)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__
(nova.api.openstack): TRACE: resp = self.call_func(req, *args, **self.kwargs)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
(nova.api.openstack): TRACE: return self.func(req, *args, **kwargs)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/nova/wsgi.py", line 354, in __call__
(nova.api.openstack): TRACE: result = method(**arg_dict)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/nova/api/openstack/servers.py", line 115, in create
(nova.api.openstack): TRACE: env = self._deserialize_create(req)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/nova/api/openstack/servers.py", line 197, in _deserialize_create
(nova.api.openstack): TRACE: return deserializer.deserialize(request.body)
(nova.api.openstack): TRACE: File "/usr/lib/pymodules/python2.6/nova/api/openstack/servers.py", line 665, in deserialize
(nova.api.openstack): TRACE: dom = minidom.parseString(string)
(nova.api.openstack): TRACE: File "/usr/lib/python2.6/xml/dom/minidom.py", line 1928, in parseString
(nova.api.openstack): TRACE: return expatbuilder.parseString(string)
(nova.api.openstack): TRACE: File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 940, in parseString
(nova.api.openstack): TRACE: return builder.parseString(string)
(nova.api.openstack): TRACE: File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 223, in parseString
(nova.api.openstack): TRACE: parser.Parse(string, True)
(nova.api.openstack): TRACE: ExpatError: no element found: line 1, column 0
(nova.api.openstack): TRACE:
The novarcfile is as below:
NOVA_KEY_DIR=$(pushd $(dirname $BASH_SOURCE)>/dev/null; pwd; popd>/dev/null)
export EC2_ACCESS_KEY="b444d0ed-aba8-4a11-8953-db98141aad46:project1"
export EC2_SECRET_KEY="c5e77cec-6340-4ec8-b787-1971df6219ae"
export EC2_URL="http://10.1.168.158:8773/services/Cloud"
export S3_URL="http://10.1.168.158:3333"
export EC2_USER_ID=42 # nova does not use user id, but bundling requires it
export EC2_PRIVATE_KEY=${NOVA_KEY_DIR}/pk.pem
export EC2_CERT=${NOVA_KEY_DIR}/cert.pem
export NOVA_CERT=${NOVA_KEY_DIR}/cacert.pem
export EUCALYPTUS_CERT=${NOVA_CERT} # euca-bundle-image seems to require this set
alias ec2-bundle-image="ec2-bundle-image --cert ${EC2_CERT} --privatekey ${EC2_PRIVATE_KEY} --user 42 --ec2cert ${NOVA_CERT}"
alias ec2-upload-bundle="ec2-upload-bundle -a ${EC2_ACCESS_KEY} -s ${EC2_SECRET_KEY} --url ${S3_URL} --ec2cert ${NOVA_CERT}"
export NOVA_API_KEY="b444d0ed-aba8-4a11-8953-db98141aad46"
export NOVA_USERNAME="admin"
export NOVA_URL="http://10.1.168.158:8774/v1.0/"
~
the nova.conf file is as below:
--dhcpbridge_flagfile=/etc/nova/nova.conf
--dhcpbridge=/usr/bin/nova-dhcpbridge
--logdir=/var/log/nova
--state_path=/var/lib/nova
--lock_path=/var/lock/nova
--verbose
--s3_host=10.1.168.158
--rabbit_host=10.1.168.158
--cc_host=10.1.168.158
--ec2_url=http://10.1.168.158:8773/services/Cloud
--fixed_range=10.0.0.0/12
--network_size=10
--FAKE_subdomain=ec2
--routing_source_ip=10.1.168.158
--verbose
--sql_connection=mysql://root:root@10.1.168.158/nova
--network_manager=nova.network.manager.FlatManager
--allow_admin_api=true
Question :
The request to create instance fails ,but I can create instance from the euca-run-instance command.Kindly guide.