Hi All:
I run into the following problem using the openstack-nova api with
jclouds 1.5.0 (alpha3 or SNAPSHOT) against an OpenStack Nova Essex
installation.
The listServersInDetail operation fails with JsonSyntaxException
(listServers works fine).
Below are the traces with the json payload returned from nova.
Any idea what's going wrong ?
12:45:55.744 [i/o thread 0] DEBUG jclouds.headers - >> GET
http://nova:8774/v1.1/8d10e6646d5d4585937395b04839a353/servers/detail
HTTP/1.112:45:55.744 [i/o thread 0] DEBUG jclouds.headers - >> Accept:
application/json12:45:55.744 [i/o thread 0] DEBUG jclouds.headers - >>
X-Auth-Token: 60635f0e631d435fb6dbbc91857a1efb12:45:55.843 [i/o thread
0] DEBUG o.j.h.i.JavaUrlHttpCommandExecutorService - Receiving
response -1486759839: HTTP/1.1 200 OK12:45:55.844 [i/o thread 0] DEBUG
jclouds.headers - << HTTP/1.1 200 OK12:45:55.844 [i/o thread 0] DEBUG
jclouds.headers - << Date: Wed, 18 Apr 2012 10:45:55 GMT12:45:55.844
[i/o thread 0] DEBUG jclouds.headers - << Connection: keep-
alive12:45:55.844 [i/o thread 0] DEBUG jclouds.headers - << X-Compute-
Request-Id: req-f378b224-bdac-4a78-8862-38a623fd031412:45:55.844 [i/o
thread 0] DEBUG jclouds.headers - << Content-Type: application/
json12:45:55.844 [i/o thread 0] DEBUG jclouds.headers - << Content-
Length: 419112:45:55.845 [i/o thread 0] DEBUG jclouds.wire - <<
"{"servers": [{"OS-EXT-STS:task_state": null, "addresses": {"Net
TenantA Front-Middle": [{"version": 4, "addr": "172.16.11.5"}],
"Public network": [{"version": 4, "addr": "172.16.1.13"}, {"version":
4, "addr": "10.193.112.119"}]}, "links": [{"href": "
http://nova:8774/
v1.1/8d10e6646d5d4585937395b04839a353/servers/0c80b392-db30-4736-
ae02-4480090f1207", "rel": "self"}, {"href": "
http://nova:
8774/8d10e6646d5d4585937395b04839a353/servers/0c80b392-db30-4736-
ae02-4480090f1207", "rel": "bookmark"}], "image": {"id":
"416af940-2d3c-4a7c-977c-a9030685ad5e", "links": [{"href": "http://
nova:8774/8d10e6646d5d4585937395b04839a353/images/
416af940-2d3c-4a7c-977c-a9030685ad5e", "rel": "bookmark"}]}, "OS-EXT-
STS:vm_state": "active", "flavor": {"id": "1", "links": [{"href":
"
http://nova:8774/8d10e6646d5d4585937395b04839a353/flavors/1", "rel":
"bookmark"}]}, "id": "0c80b392-db30-4736-ae02-4480090f1207",
"user_id": "df13814f6c354d00a8acf66502836323", "OS-DCF:diskConfig":
"MANUAL", "accessIPv4": "", "accessIPv6": "", "progress": 0, "OS-EXT-
STS:power_state": 1, "config_drive": "", "status": "ACTIVE",
"updated": "2012-04-12T11:21:33Z", "hostId":
"03d796ebb52b1b555e5f6d9262f7dbd52b3f7c181e3aa89b34ca5408",
"key_name": "", "name": "VM proxy", "created": "2012-04-12T11:21:23Z",
"tenant_id": "8d10e6646d5d4585937395b04839a353", "metadata": {}}, {"OS-
EXT-STS:task_state": null, "addresses": {"Net TenantA Front-Middle":
[{"version": 4, "addr": "172.16.11.4"}], "Net TenantA Middle-Back":
[{"version": 4, "addr": "172.16.12.5"}]}, "links": [{"href": "http://
nova:8774/v1.1/8d10e6646d5d4585937395b04839a353/servers/
b332b5cd-535e-4677-b68e-fc8badc13236", "rel": "self"}, {"href":
"
http://nova:8774/8d10e6646d5d4585937395b04839a353/servers/
b332b5cd-535e-4677-b68e-fc8badc13236", "rel": "bookmark"}], "image":
{"id": "416af940-2d3c-4a7c-977c-a9030685ad5e", "links": [{"href":
"
http://nova:8774/8d10e6646d5d4585937395b04839a353/images/
416af940-2d3c-4a7c-977c-a9030685ad5e", "rel": "bookmark"}]}, "OS-EXT-
STS:vm_state": "active", "fl
avor": {"id": "1", "links": [{"href": "
http://nova:
8774/8d10e6646d5d4585937395b04839a353/flavors/1", "rel":
"bookmark"}]}, "id": "b332b5cd-535e-4677-b68e-fc8badc13236",
"user_id": "df13814
f6c354d00a8acf66502836323", "OS-DCF:diskConfig": "MANUAL",
"accessIPv4": "", "accessIPv6": "", "progress": 0, "OS-EXT-
STS:power_state": 1, "config_drive": "", "status": "ACTIVE", "updated"
: "2012-04-12T11:18:58Z", "hostId":
"e5bbff80bebacfe1db63951e787b5341427060a602d33abfefb6a1bc",
"key_name": "", "name": "VM blog", "created": "2012-04-12T11:18:48Z",
"tenant_id": "8d10e664
6d5d4585937395b04839a353", "metadata": {}}, {"OS-EXT-STS:task_state":
null, "addresses": {"Net TenantA Middle-Back": [{"version": 4, "addr":
"172.16.12.4"}]}, "links": [{"href": "
http://no
va:8774/v1.1/8d10e6646d5d4585937395b04839a353/servers/
f9d43436-4572-4c9b-9b74-5fa6890a2f21", "rel": "self"}, {"href":
"
http://nova:8774/8d10e6646d5d4585937395b04839a353/servers/f9d43436-45
72-4c9b-9b74-5fa6890a2f21", "rel": "bookmark"}], "image": {"id":
"416af940-2d3c-4a7c-977c-a9030685ad5e", "links": [{"href": "http://
nova:8774/8d10e6646d5d4585937395b04839a353/images/416af9
40-2d3c-4a7c-977c-a9030685ad5e", "rel": "bookmark"}]}, "OS-EXT-
STS:vm_state": "active", "flavor": {"id": "1", "links": [{"href":
"
http://nova:8774/8d10e6646d5d4585937395b04839a353/flavors/
1", "rel": "bookmark"}]}, "id":
"f9d43436-4572-4c9b-9b74-5fa6890a2f21", "user_id":
"df13814f6c354d00a8acf66502836323", "OS-DCF:diskConfig": "MANUAL",
"accessIPv4": "", "accessIPv6": "", "p
rogress": 0, "OS-EXT-STS:power_state": 1, "config_drive": "",
"status": "ACTIVE", "updated": "2012-04-12T11:15:09Z", "hostId":
"03d796ebb52b1b555e5f6d9262f7dbd52b3f7c181e3aa89b34ca5408", "
key_name": "", "name": "VM MySQL", "created": "2012-04-12T11:14:56Z",
"tenant_id": "8d10e6646d5d4585937395b04839a353", "metadata": {}}]}"
Exception in thread "main" com.google.gson.JsonSyntaxException:
duplicate key: UNRECOGNIZED
at com.google.gson.internal.bind.MapTypeAdapterFactory
$Adapter.read(MapTypeAdapterFactory.java:191)
at com.google.gson.internal.bind.MapTypeAdapterFactory
$Adapter.read(MapTypeAdapterFactory.java:146)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory
$1.read(ReflectiveTypeAdapterFactory.java:93)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory
$Adapter.read(ReflectiveTypeAdapterFactory.java:176)
at
com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:
40)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory
$Adapter.read(CollectionTypeAdapterFactory.java:81)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory
$Adapter.read(CollectionTypeAdapterFactory.java:60)
at com.google.gson.Gson.fromJson(Gson.java:755)
at
org.jclouds.http.functions.ParseFirstJsonValueNamed.apply(ParseFirstJsonValueNamed.java:
81)
at
org.jclouds.http.functions.ParseFirstJsonValueNamed.apply(ParseFirstJsonValueNamed.java:
48)
at com.google.common.util.concurrent.Futures
$3.apply(Futures.java:380)
at com.google.common.util.concurrent.Futures
$ChainingListenableFuture.run(Futures.java:522)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)