title: Jenkins with Docker plugin java.lang.NullPointerException: uri was not specified
body: <p>I'm trying to use the Docker plugin with Jenkins. But Jenkins cannot access the REST API.</p>
  
  <p>In the Jenkins configuration I put the Docker REST URL: <code>http://127.0.0.1:4243</code> and when clicking on test connection it gives me <code>Something went wrong, cannot connect to http://127.0.0.1:4243, cause: null</code></p>
  
  <pre><code>Jul 21, 2016 8:57:52 AM WARNING org.jenkinsci.plugins.dockerbuildstep.DockerBuilder$DescriptorImpl doTestConnection
  
  uri was not specified
  java.lang.NullPointerException: uri was not specified
  at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204)
  at com.github.dockerjava.core.DockerClientConfig$DockerClientConfigBuilder.withUri(DockerClientConfig.java:406)
  at org.jenkinsci.plugins.dockerbuildstep.DockerBuilder$DescriptorImpl.createDockerClient(DockerBuilder.java:120)
  at org.jenkinsci.plugins.dockerbuildstep.DockerBuilder$DescriptorImpl.getDockerClient(DockerBuilder.java:204)
  at org.jenkinsci.plugins.dockerbuildstep.DockerBuilder$DescriptorImpl.doTestConnection(DockerBuilder.java:138)
  at sun.reflect.GeneratedMethodAccessor235.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  </code></pre>
  
  <p>But when I login to user jenkins <code>su jenkins</code> and do a <code>curl 127.0.0.1:4243/info</code> everything works as expected. I started Docker with <code>-H tcp://127.0.0.1:4243 -H unix:///var/run/docker.sock</code>.</p>
  
  <p>What am I doing wrong?</p>