Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-784

jclouds-docker throws ISE when getting list of containers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.1
    • None
    • jclouds-compute
    • None
    • docker 1.2

    Description

      ISE is thrown trying to list nodes (getComputeService().listNodes()) for docker:

      2014-11-24 11:57:24,670 DEBUG [org.jclouds.rest.internal.InvokeHttpMethod] [main] >> invoking containers:list
      2014-11-24 11:57:24,674 DEBUG [org.jclouds.http.internal.JavaUrlHttpCommandExecutorService] [main] Sending request 994691047: GET http://sdrelnx150:2375/containers/json?all=true HTTP/1.1
      2014-11-24 11:57:24,674 DEBUG [jclouds.headers] [main] >> GET http://sdrelnx150:2375/containers/json?all=true HTTP/1.1
      2014-11-24 11:57:24,675 DEBUG [jclouds.headers] [main] >> Accept: application/json
      2014-11-24 11:57:24,740 DEBUG [org.jclouds.http.internal.JavaUrlHttpCommandExecutorService] [main] Receiving response 994691047: HTTP/1.1 200 OK
      2014-11-24 11:57:24,740 DEBUG [jclouds.headers] [main] << HTTP/1.1 200 OK
      2014-11-24 11:57:24,740 DEBUG [jclouds.headers] [main] << Date: Mon, 24 Nov 2014 16:57:24 GMT
      2014-11-24 11:57:24,741 DEBUG [jclouds.headers] [main] << Content-Type: application/json
      2014-11-24 11:57:24,741 DEBUG [jclouds.headers] [main] << Content-Length: 1373
      2014-11-24 11:57:24,747 DEBUG [jclouds.wire] [main] << "[{"Command":"/app/controller","Created":1416520265,"Id":"5e9ad9b9c1202f5d4d7a111b672327b497de89d29d16a51390ecce0003cebbf6","Image":"shipyard/shipyard:latest","Names":["/shipyard-controller"],"Ports":[

      {"IP":"0.0.0.0","PrivatePort":8080,"PublicPort":8080,"Type":"tcp"}

      ],"Status":"Up 3 days"}[\n]"
      2014-11-24 11:57:24,747 DEBUG [jclouds.wire] [main] << ",{"Command":"/usr/bin/rethinkdb --bind all","Created":1416520234,"Id":"376d8e768c59530c6a09c9708bc1040da655d41ba1c9ddc2554ee644a8a9bec5","Image":"shipyard/rethinkdb:latest","Names":["/shipyard-controller/rethinkdb","/shipyard-rethinkdb"],"Ports":[

      {"IP":"0.0.0.0","PrivatePort":29015,"PublicPort":49200,"Type":"tcp"}

      ,

      {"IP":"0.0.0.0","PrivatePort":8080,"PublicPort":49201,"Type":"tcp"}

      ,

      {"IP":"0.0.0.0","PrivatePort":28015,"PublicPort":49199,"Type":"tcp"}

      ],"Status":"Up 3 days"}[\n]"
      2014-11-24 11:57:24,747 DEBUG [jclouds.wire] [main] << ",{"Command":"/bin/bash -l","Created":1416520232,"Id":"854d39bc3ff098b114bf47792491f47ddfb2645fd7c48d1b785ac78ca5afddec","Image":"shipyard/rethinkdb:latest","Names":["/shipyard-rethinkdb-data"],"Ports":[

      {"PrivatePort":28015,"Type":"tcp"}

      ,

      {"PrivatePort":29015,"Type":"tcp"}

      ,

      {"PrivatePort":8080,"Type":"tcp"}

      ],"Status":"Up 3 days"}[\n]"
      2014-11-24 11:57:24,747 DEBUG [jclouds.wire] [main] << ",{"Command":"docker-registry","Created":1416434443,"Id":"c10e264b18d9a91fa18e3d55faceb14fa0deff50e203f73e7ccf7ed4e6ede13b","Image":"registry:latest","Names":["/docker-registry"],"Ports":[

      {"IP":"0.0.0.0","PrivatePort":5000,"PublicPort":5000,"Type":"tcp"}

      ],"Status":"Up 4 days"}[\n]"
      2014-11-24 11:57:24,747 DEBUG [jclouds.wire] [main] << "]"
      2014-11-24 11:57:24,798 DEBUG [org.jclouds.rest.internal.InvokeHttpMethod] [main] >> invoking container:inspect
      2014-11-24 11:57:24,799 DEBUG [org.jclouds.http.internal.JavaUrlHttpCommandExecutorService] [main] Sending request -10292711: GET http://sdrelnx150:2375/containers/5e9ad9b9c1202f5d4d7a111b672327b497de89d29d16a51390ecce0003cebbf6/json HTTP/1.1
      2014-11-24 11:57:24,799 DEBUG [jclouds.headers] [main] >> GET http://sdrelnx150:2375/containers/5e9ad9b9c1202f5d4d7a111b672327b497de89d29d16a51390ecce0003cebbf6/json HTTP/1.1
      2014-11-24 11:57:24,799 DEBUG [jclouds.headers] [main] >> Accept: application/json
      2014-11-24 11:57:24,816 DEBUG [org.jclouds.http.internal.JavaUrlHttpCommandExecutorService] [main] Receiving response -10292711: HTTP/1.1 200 OK
      2014-11-24 11:57:24,816 DEBUG [jclouds.headers] [main] << HTTP/1.1 200 OK
      2014-11-24 11:57:24,817 DEBUG [jclouds.headers] [main] << Transfer-Encoding: chunked
      2014-11-24 11:57:24,817 DEBUG [jclouds.headers] [main] << Date: Mon, 24 Nov 2014 16:57:24 GMT
      2014-11-24 11:57:24,817 DEBUG [jclouds.headers] [main] << Content-Type: application/json
      2014-11-24 11:57:24,818 DEBUG [jclouds.wire] [main] << "{"Args":[],"Config":{"AttachStderr":true,"AttachStdin":false,"AttachStdout":true,"Cmd":[],"CpuShares":0,"Cpuset":"","Domainname":"","Entrypoint":["/app/controller"],"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"ExposedPorts":{"8080/tcp":{}},"Hostname":"5e9ad9b9c120","Image":"shipyard/shipyard","Memory":0,"MemorySwap":0,"NetworkDisabled":false,"OnBuild":null,"OpenStdin":false,"PortSpecs":null,"StdinOnce":false,"Tty":true,"User":"","Volumes":null,"WorkingDir":"/app"},"Created":"2014-11-20T21:51:05.152266981Z","Driver":"devicemapper","ExecDriver":"native-0.2","HostConfig":{"Binds":null,"CapAdd":null,"CapDrop":null,"ContainerIDFile":"","Devices":[],"Dns":null,"DnsSearch":null,"Links":["/shipyard-rethinkdb:/shipyard-controller/rethinkdb"],"LxcConf":[],"NetworkMode":"bridge","PortBindings":{"8080/tcp":[

      {"HostIp":"","HostPort":"8080"}

      ]},"Privileged":false,"PublishAllPorts":false,"RestartPolicy":

      {"MaximumRetryCount":0,"Name":""}

      ,"VolumesFrom":null},"HostnamePath":"/var/lib/docker/containers/5e9ad9b9c1202f5d4d7a111b672327b497de89d29d16a51390ecce0003cebbf6/hostname","HostsPath":"/var/lib/docker/containers/5e9ad9b9c1202f5d4d7a111b672327b497de89d29d16a51390ecce0003cebbf6/hosts","Id":"5e9ad9b9c1202f5d4d7a111b672327b497de89d29d16a51390ecce0003cebbf6","Image":"fefba6922b84eeb0db42893a4c7482523812a824a0f36efc8a8a2c07e8a061af","MountLabel":"system_u:object_r:svirt_sandbox_file_t:s0:c181,c431","Name":"/shipyard-controller","NetworkSettings":{"Bridge":"docker0","Gateway":"172.17.42.1","IPAddress":"172.17.0.74","IPPrefixLen":16,"PortMapping":null,"Ports":{"8080/tcp":[

      {"HostIp":"0.0.0.0","HostPort":"8080"}

      ]}},"Path":"/app/controller","ProcessLabel":"system_u:system_r:svirt_lxc_net_t:s0:c181,c431","ResolvConfPath":"/var/lib/docker/containers/5e9ad9b9c1202f5d4d7a111b672327b497de89d29d16a51390ecce0003cebbf6/resolv.conf","State":

      {"ExitCode":0,"FinishedAt":"0001-01-01T00:00:00Z","Paused":false,"Pid":21832,"Restarting":false,"Running":true,"StartedAt":"2014-11-20T21:51:05.770050031Z"}

      ,"Volumes":{},"VolumesRW":{}}[\n]"
      2014-11-24 11:57:24,833 ERROR [org.jclouds.http.functions.ParseJson] [main] Error parsing input
      com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected STRING but was BEGIN_ARRAY
      at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:176) ~[gson-2.2.4.jar:na]
      at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) ~[gson-2.2.4.jar:na]
      at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) ~[gson-2.2.4.jar:na]
      at com.google.gson.Gson.fromJson(Gson.java:803) ~[gson-2.2.4.jar:na]
      at com.google.gson.Gson.fromJson(Gson.java:868) ~[gson-2.2.4.jar:na]
      at com.google.gson.Gson.fromJson(Gson.java:841) ~[gson-2.2.4.jar:na]
      at org.jclouds.docker.config.DockerParserModule$ContainerTypeAdapter.deserialize(DockerParserModule.java:58) ~[docker-1.8.1.jar:1.8.1]
      at org.jclouds.docker.config.DockerParserModule$ContainerTypeAdapter.deserialize(DockerParserModule.java:51) ~[docker-1.8.1.jar:1.8.1]
      at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58) ~[gson-2.2.4.jar:na]
      at com.google.gson.Gson.fromJson(Gson.java:803) ~[gson-2.2.4.jar:na]
      at com.google.gson.Gson.fromJson(Gson.java:768) ~[gson-2.2.4.jar:na]
      at com.google.gson.Gson.fromJson(Gson.java:717) ~[gson-2.2.4.jar:na]
      at org.jclouds.json.internal.GsonWrapper.fromJson(GsonWrapper.java:42) ~[jclouds-core-1.8.1.jar:1.8.1]
      at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:82) [jclouds-core-1.8.1.jar:1.8.1]
      at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:76) [jclouds-core-1.8.1.jar:1.8.1]
      at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:62) [jclouds-core-1.8.1.jar:1.8.1]
      at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:42) [jclouds-core-1.8.1.jar:1.8.1]
      at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90) [jclouds-core-1.8.1.jar:1.8.1]
      at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73) [jclouds-core-1.8.1.jar:1.8.1]
      at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44) [jclouds-core-1.8.1.jar:1.8.1]
      at org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117) [jclouds-core-1.8.1.jar:1.8.1]
      at com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87) [guava-18.0.jar:na]
      at com.sun.proxy.$Proxy49.inspectContainer(Unknown Source) [na:na]
      at org.jclouds.docker.compute.strategy.DockerComputeServiceAdapter.listNodes(DockerComputeServiceAdapter.java:187) [docker-1.8.1.jar:1.8.1]
      at org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies.listDetailsOnNodesMatching(AdaptingComputeServiceStrategies.java:122) [jclouds-compute-1.8.1.jar:1.8.1]
      at org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies.listNodes(AdaptingComputeServiceStrategies.java:112) [jclouds-compute-1.8.1.jar:1.8.1]
      at org.jclouds.compute.internal.BaseComputeService.listNodes(BaseComputeService.java:335) [jclouds-compute-1.8.1.jar:1.8.1]
      at com.pega.pegarules.cloudutils.client.CloudAdministratorImpl.getNodeInfo(CloudAdministratorImpl.java:385) [bin/:na]
      at com.pega.pegarules.dancc.testing.TestingPRCloudUtils.main(TestingPRCloudUtils.java:26) [bin/:na]
      Caused by: java.lang.IllegalStateException: Expected STRING but was BEGIN_ARRAY
      at com.google.gson.internal.bind.JsonTreeReader.nextString(JsonTreeReader.java:154) ~[gson-2.2.4.jar:na]
      at com.google.gson.internal.bind.TypeAdapters$13.read(TypeAdapters.java:358) ~[gson-2.2.4.jar:na]
      at com.google.gson.internal.bind.TypeAdapters$13.read(TypeAdapters.java:346) ~[gson-2.2.4.jar:na]
      at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) ~[gson-2.2.4.jar:na]
      at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) ~[gson-2.2.4.jar:na]
      ... 28 common frames omitted
      Exception in thread "main" java.lang.IllegalStateException: Expected STRING but was BEGIN_ARRAY
      at com.google.gson.internal.bind.JsonTreeReader.nextString(JsonTreeReader.java:154)
      at com.google.gson.internal.bind.TypeAdapters$13.read(TypeAdapters.java:358)
      at com.google.gson.internal.bind.TypeAdapters$13.read(TypeAdapters.java:346)
      at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
      at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
      at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
      at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
      at com.google.gson.Gson.fromJson(Gson.java:803)
      at com.google.gson.Gson.fromJson(Gson.java:868)
      at com.google.gson.Gson.fromJson(Gson.java:841)
      at org.jclouds.docker.config.DockerParserModule$ContainerTypeAdapter.deserialize(DockerParserModule.java:58)
      at org.jclouds.docker.config.DockerParserModule$ContainerTypeAdapter.deserialize(DockerParserModule.java:51)
      at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:58)
      at com.google.gson.Gson.fromJson(Gson.java:803)
      at com.google.gson.Gson.fromJson(Gson.java:768)
      at com.google.gson.Gson.fromJson(Gson.java:717)
      at org.jclouds.json.internal.GsonWrapper.fromJson(GsonWrapper.java:42)
      at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:82)
      at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:76)
      at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:62)
      at org.jclouds.http.functions.ParseJson.apply(ParseJson.java:42)
      at org.jclouds.rest.internal.InvokeHttpMethod.invoke(InvokeHttpMethod.java:90)
      at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:73)
      at org.jclouds.rest.internal.InvokeHttpMethod.apply(InvokeHttpMethod.java:44)
      at org.jclouds.reflect.FunctionalReflection$FunctionalInvocationHandler.handleInvocation(FunctionalReflection.java:117)
      at com.google.common.reflect.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:87)
      at com.sun.proxy.$Proxy49.inspectContainer(Unknown Source)
      at org.jclouds.docker.compute.strategy.DockerComputeServiceAdapter.listNodes(DockerComputeServiceAdapter.java:187)
      at org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies.listDetailsOnNodesMatching(AdaptingComputeServiceStrategies.java:122)
      at org.jclouds.compute.strategy.impl.AdaptingComputeServiceStrategies.listNodes(AdaptingComputeServiceStrategies.java:112)
      at org.jclouds.compute.internal.BaseComputeService.listNodes(BaseComputeService.java:335)
      at com.pega.pegarules.cloudutils.client.CloudAdministratorImpl.getNodeInfo(CloudAdministratorImpl.java:385)
      at com.pega.pegarules.dancc.testing.TestingPRCloudUtils.main(TestingPRCloudUtils.java:26)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dancc@pega.com Christopher Dancy
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: