Jersey UniformInterfaceException when doing a POST with docker-client

When trying to post a RESTful Service via docker-client to my private docker registry i get that error. The confusing thing about that is that the input stream changes itself as you can see here. Its made somewhere in the background of jersey but i cannot find the cause for it. I guess the problem occurs somewhere inside the jersey logic

Method

  • Deleting images from a private docker registry
  • How to run GUI application from linux container in Window using Docker?
  • Run Node.js forked processes in Docker containers
  • How stop containers run with `docker-compose run`
  • Are etcdctl client connections to etcd atomic?
  • docker nodejs container cant connect mysql container
  • public static Service initService(String imageId) {
    
            final com.spotify.docker.client.DockerClient docker = new DefaultDockerClient(
                    "http://10.###.###.143:2375");
            String s = null;
    
            try {
    
                s = ("10.###.###.143:5000/user/ipatest&tag=latest");
    
                docker.pull(s);
    
                System.out.println(docker.toString());
    
            } catch (DockerException | InterruptedException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
    

    Exception

    com.spotify.docker.client.DockerRequestException: Request error: POST http://10.###.###.143:2375/v1.12/images/create?fromImage=10.###.###.143%3A5000%2Fuser%2Fipatest%26tag%3Dlatest: 500
                at com.spotify.docker.client.DefaultDockerClient.propagate(DefaultDockerClient.java:563)
                at com.spotify.docker.client.DefaultDockerClient.request(DefaultDockerClient.java:544)
                at com.spotify.docker.client.DefaultDockerClient.pull(DefaultDockerClient.java:345)
                at com.spotify.docker.client.DefaultDockerClient.pull(DefaultDockerClient.java:329)
                at de.fhg.ipa.vfk.eapps.commoniaas.docker.DockerServiceMgmt.initService(DockerServiceMgmt.java:43)
                at de.fhg.ipa.vfk.eapps.commoniaas.docker.DockerServiceMgmt.main(DockerServiceMgmt.java:163)
            Caused by: com.sun.jersey.api.client.UniformInterfaceException: POST http://10.###.###.143:2375/v1.12/images/create?fromImage=10.###.###.143%3A5000%2Fuser%2Fipatest%26tag%3Dlatest returned a response status of 500 Internal Server Error
                at com.sun.jersey.api.client.WebResource.handle(WebResource.java:688)
                at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
                at com.sun.jersey.api.client.WebResource$Builder.method(WebResource.java:623)
                at com.spotify.docker.client.DefaultDockerClient.request(DefaultDockerClient.java:540)
                ... 4 more
    

    It must have something to do with queryParams(String params) which belongs to WebResource (jersey)

  • Cron jobs using Whenever with VM, Docker & Dokku
  • Issues getting Ansible to work with Boot2Docker
  • What shall I give the ip adress of redis container to which tomcat will connect through source code Docker volume
  • Can docker containers be used for live migration of a group of running applications?
  • How to get stdin from php for java docker container at runtime
  • Why is the Kafka distributed connector dying when the node I created it on is killed?
  • One Solution collect form web for “Jersey UniformInterfaceException when doing a POST with docker-client”

    The image name you’re passing to pull isn’t valid. The format for an image name is name:tag. Do this instead:

    docker.pull("10.###.###.143:5000/user/ipatest:latest");
    

    Alternatively, you can ommit the :latest, since it is implied when no other tag is specified.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.