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

  • nginx in docker how to disable http redirects to https
  • Dynamic default.conf of nginx in docker
  • What is the difference between the size and the virtual size of the docker images?
  • How to get a docker history from an image that has not been pulled yet?
  • Inconsistency in running docker-build on different environment
  • Why “docker attach” not working and blocking my konsole on ubuntu
  • 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)

  • Docker receiving multicast traffic
  • How to copy folders to docker image from Dockerfile?
  • Docker container from docker cloud on windows
  • How to refer to directory contains Dockerfile in building?
  • Permission Denied for SO_DEBUG socket option inside docker
  • Do not download all Maven dependencies on a Docker build
  • 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.