Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.7.2
-
None
Description
using jclouds-example compute-basic: https://github.com/jclouds/jclouds-examples/tree/master/compute-basics
with command line:
java \
-Dopenstack-nova.image-id=RegionOne/<image ID> \
-Dopenstack-nova.login-user=ubuntu \
-Djclouds.trust-all-certs=true \
-Djclouds.keystone.credential-type=passwordCredentials \
-Dopenstack-nova.endpoint=https://<openstack endpoint host>/v2.0 \
-jar target/compute-basics-jar-with-dependencies.jar \
openstack-nova <tenant>:<username> <password> mygroup add
Command fails with exception:
- no jclouds.zones configured for provider openstack-nova - >> invoking server:list - Sending request 811507394: GET http://<host>/v2/<stuff>/servers/detail HTTP/1.1 - >> GET http://<host>/v2/<stuff>/servers/detail HTTP/1.1 - >> Accept: application/json - >> X-Auth-Token: <redacted> - Receiving response 811507394: HTTP/1.1 200 OK - << HTTP/1.1 200 OK - << Date: Sat, 03 May 2014 05:36:11 GMT - << Connection: keep-alive - << X-Compute-Request-Id: req-30c4d178-ac5f-4f86-8fc3-9dbd10f593ab - << Content-Type: application/json - << Content-Length: 1503 - << "{"servers": [{"status": "ACTIVE", "updated": "2014-05-03T00:45:10Z", "hostId": "cfcfe7bbd3568725754d4cbf500668e0c3890c3f722d322b219559bd", "addresses": {"<tenantid>": [{"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", "version": 4, "addr": "10.10.3.2", "OS-EXT-IPS:type": "fixed"}, {"OS-EXT-IPS-MAC:mac_addr": "fa:16:3e:46:45:df", "version": 4, "addr": "<ipaddr>", "OS-EXT-IPS:type": "floating"}]}, "links": [{"href": "http://<hostandport>/v2/<stuff>/servers/6aa6bb89-d9ef-4647-982a-803eee53f573", "rel": "self"}, {"href": "http://<hostandport>/<Stuff>/servers/6aa6bb89-d9ef-4647-982a-803eee53f573", "rel": "bookmark"}], "key_name": "foo-test", "image": "", "OS-EXT-STS:task_state": null, "OS-EXT-STS:vm_state": "active", "OS-SRV-USG:launched_at": "2014-05-03T00:45:09.000000", "flavor": {"id": "3", "links": [{"href": "http://<hostandport>/<stuff>/flavors/3", "rel": "bookmark"}]}, "id": "6aa6bb89-d9ef-4647-982a-803eee53f573", "security_groups": [{"name": "default"}], "OS-SRV-USG:terminated_at": null, "OS-EXT-AZ:availability_zone": "FOO", "user_id": "<username>", "name": "<hostname>", "created": "2014-05-03T00:44:12Z", "tenant_id": "<stuff>", "OS-DCF:diskConfig": "MANUAL", "os-extended-volumes:volumes_attached": [{"id": "<stuff>"}], "accessIPv4": "", "accessIPv6": "", "progress": 0, "OS-EXT-STS:power_state": 1, "config_drive": "", "metadata": {}}]}" - Error parsing input com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:181) ~[compute-basics-jar-with-dependencies.jar:na] at org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263) ~[compute-basics-jar-with-dependencies.jar:na] at org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:175) ~[compute-basics-jar-with-dependencies.jar:na] at com.google.gson.Gson.fromJson(Gson.java:803) ~[compute-basics-jar-with-dependencies.jar:na] at com.google.gson.Gson.fromJson(Gson.java:868) ~[compute-basics-jar-with-dependencies.jar:na] at com.google.gson.Gson$1.deserialize(Gson.java:126) ~[compute-basics-jar-with-dependencies.jar:na] at org.jclouds.openstack.nova.v2_0.config.NovaParserModule$ServerAdapter.deserialize(NovaParserModule.java:129) ~[compute-basics-jar-with-dependencies.jar:na] at org.jclouds.openstack.nova.v2_0.config.NovaParserModule$ServerAdapter.deserialize(NovaParserModule.java:124) ~[compute-basics-jar-with-dependencies.jar:na] at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58) ~[compute-basics-jar-with-dependencies.jar:na] at org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.readAndBuild(NullFilteringTypeAdapterFactories.java:92) ~[compute-basics-jar-with-dependencies.jar:na] at org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.read(NullFilteringTypeAdapterFactories.java:84) ~[compute-basics-jar-with-dependencies.jar:na] at org.jclouds.json.internal.NullFilteringTypeAdapterFactories$IterableTypeAdapter.read(NullFilteringTypeAdapterFactories.java:63) ~[compute-basics-jar-with-dependencies.jar:na] at org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$ParameterReader.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:263) ~[compute-basics-jar-with-dependencies.jar:na] at org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:175) ~[compute-basics-jar-with-dependencies.jar:na] at com.google.gson.Gson.fromJson(Gson.java:803) ~[compute-basics-jar-with-dependencies.jar:na] at com.google.gson.Gson.fromJson(Gson.java:768) ~[compute-basics-jar-with-dependencies.jar:na] at com.google.gson.Gson.fromJson(Gson.java:717) ~[compute-basics-jar-with-dependencies.jar:na] at org.jclouds.json.internal.GsonWrapper.fromJson(GsonWrapper.java:45) ~[compute-basics-jar-with-dependencies.jar:na] at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:84) [compute-basics-jar-with-dependencies.jar:na] at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:78) [compute-basics-jar-with-dependencies.jar:na] at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:64) [compute-basics-jar-with-dependencies.jar:na] at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:44) [compute-basics-jar-with-dependencies.jar:na] at com.google.common.base.Functions$FunctionComposition.apply(Functions.java:216) [compute-basics-jar-with-dependencies.jar:na] at org.jclouds.rest.internal.InvokeSyncToAsyncHttpMethod.invoke(InvokeSyncToAsyncHttpMethod.java:129) [compute-basics-jar-with-dependencies.jar:na] at org.jclouds.rest.internal.InvokeSyncToAsyncHttpMethod.apply(InvokeSyncToAsyncHttpMethod.java:95) [compute-basics-jar-with-dependencies.jar:na] at org.jclouds.rest.internal.InvokeSyncToAsyncHttpMethod.apply(InvokeSyncToAsyncHttpMethod.java:56) [compute-basics-jar-with-dependencies.jar:na] at org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117) [compute-basics-jar-with-dependencies.jar:na] at com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87) [compute-basics-jar-with-dependencies.jar:na] at com.sun.proxy.$Proxy80.listInDetail(Unknown Source) [na:na] at org.jclouds.openstack.nova.v2_0.compute.NovaComputeServiceAdapter.listNodes(NovaComputeServiceAdapter.java:205) [compute-basics-jar-with-dependencies.jar:na] at org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies.listDetailsOnNodesMatching(AdaptingComputeServiceStrategies.java:123) [compute-basics-jar-with-dependencies.jar:na] at org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies.listNodes(AdaptingComputeServiceStrategies.java:113) [compute-basics-jar-with-dependencies.jar:na] at org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.getNextNames(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:194) [compute-basics-jar-with-dependencies.jar:na] at org.jclouds.compute.strategy.impl.CreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(CreateNodesWithGroupEncodedIntoNameThenAddToSet.java:123) [compute-basics-jar-with-dependencies.jar:na] at org.jclouds.openstack.nova.v2_0.compute.strategy.ApplyNovaTemplateOptionsCreateNodesWithGroupEncodedIntoNameThenAddToSet.execute(ApplyNovaTemplateOptionsCreateNodesWithGroupEncodedIntoNameThenAddToSet.java:148) [compute-basics-jar-with-dependencies.jar:na] at org.jclouds.compute.internal.BaseComputeService.createNodesInGroup(BaseComputeService.java:215) [compute-basics-jar-with-dependencies.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_55] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_55] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_55] at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_55] at com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37) [compute-basics-jar-with-dependencies.jar:na] at com.sun.proxy.$Proxy59.createNodesInGroup(Unknown Source) [na:na] at org.jclouds.examples.compute.basics.MainApp.main(MainApp.java:169) [compute-basics-jar-with-dependencies.jar:na] Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at com.google.gson.internal.bind.JsonTreeReader.expect(JsonTreeReader.java:139) ~[compute-basics-jar-with-dependencies.jar:na] at com.google.gson.internal.bind.JsonTreeReader.beginObject(JsonTreeReader.java:70) ~[compute-basics-jar-with-dependencies.jar:na] at org.jclouds.json.internal.DeserializationConstructorAndReflectiveTypeAdapterFactory$DeserializeIntoParameterizedConstructor.read(DeserializationConstructorAndReflectiveTypeAdapterFactory.java:167) ~[compute-basics-jar-with-dependencies.jar:na] ... 42 common frames omitted
It looks like the JSON schema is not appropriate? This version of OpenStack seems pretty old.. am I doing something wrong?