Can you run docker commands without setting -H ? In this case docker will use /var/run/docker.sock unix socket and not rely on TLS for security, which is the default behavior for access to local daemon. docker plugins will work the same in such a setup, and you don't have to set a docker host in your jenkins configuration but just let plugin access local daemon.
2015-10-18 20:30 GMT+02:00 Irfan Sayed <[email protected]>: > further update : > > here is the docker process and running and it's PID > > [root@localhost docker]# ps -ef | grep docker > root 1623 1 0 12:11 ? 00:00:28 /usr/bin/docker -d > --selinux-enabled > root 3480 3415 0 12:54 ? 00:00:00 bash -c cd > "/tmp/workspace/docker" && java -jar slave.jar > root 12299 11158 0 23:00 pts/2 00:00:00 grep --color=auto docker > > further, if i run following command: > > [root@localhost docker]# docker -H=tcp://192.168.102.28:22 images > Get http://192.168.102.28:22/v1.19/images/json: malformed HTTP response > "SSH-2.0-OpenSSH_6.4". Are you trying to connect to a TLS-enabled daemon > without TLS? > > regards > > > > > On Sun, Oct 18, 2015 at 11:39 PM, Irfan Sayed <[email protected]> > wrote: > >> i have just ssh (using port 22) to connect to docker host which is >> nothing but slave box >> this is what i have done. >> >> i haven't specified any docker URL. In job configuration, i have just >> given the path of Dockerfile and trying to build the image from that >> Dockerfile >> >> please suggest >> >> Regards >> >> >> On Sun, Oct 18, 2015 at 11:31 PM, Richard Bywater <[email protected]> >> wrote: >> >>> Have you specified the port 22 from that Docker URL or are the plug-ins >>> doing that as port 22 isn't right for Docker. >>> >>> Richard >>> >>> On Sun, 18 Oct 2015 11:22 pm Irfan Sayed <[email protected]> wrote: >>> >>>> >>>> hi all, >>>> >>>> I am trying to provision the build containers dynamically using docker >>>> . i have installed jenkins master along with docker plugins . build slave >>>> is docker host and all are running on unix setup : centos : 6.5 >>>> >>>> here is my setup: >>>> >>>> Jenkins master : 1.633 >>>> cloudbees docker build and publish plugin : 1.0.1 >>>> cloudbees docker custom build env plugin : 1.6.1 >>>> docker commons plugin : 1.2 >>>> docker build step : 1.31 >>>> kubernetes plugin : 0.4.1 >>>> >>>> I have deployed the docker host and created Dockerfile. i am able to >>>> build docker image using Dockerfile on the docker host and run in the >>>> container >>>> however, from jenkins master , whenever i am trying to connect to >>>> docker host and build docker image using docker plugin , i am getting >>>> following error >>>> >>>> Started by user anonymous <http://115.113.226.194:2003/user/null> >>>> Building remotely on 192.168.102.28 >>>> <http://115.113.226.194:2003/computer/192.168.102.28> in workspace >>>> /tmp/workspace/docker >>>> $ docker inspect 43728998fde0187a1f0b526fef5e2db9b02796a3 >>>> [] >>>> Build Docker image from /tmp/workspace/docker/Dockerfile ... >>>> $ docker build --tag 43728998fde0187a1f0b526fef5e2db9b02796a3 --file >>>> Dockerfile /tmp/workspace/docker >>>> Sending build context to Docker daemon 497.2 kB >>>> >>>> Sending build context to Docker daemon >>>> Post >>>> http://192.168.102.28:22/v1.19/build?cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&memory=0&memswap=0&rm=1&t=43728998fde0187a1f0b526fef5e2db9b02796a3: >>>> malformed HTTP response "SSH-2.0-OpenSSH_6.4". Are you trying to connect >>>> to a TLS-enabled daemon without TLS? >>>> FATAL: Failed to build docker image from project >>>> Dockerfilejava.lang.RuntimeException >>>> <http://stacktrace.jenkins-ci.org/search?query=java.lang.RuntimeException>: >>>> Failed to build docker image from project Dockerfile >>>> at >>>> com.cloudbees.jenkins.plugins.docker_build_env.Docker.buildImage(Docker.java:121) >>>> >>>> <http://stacktrace.jenkins-ci.org/search/?query=com.cloudbees.jenkins.plugins.docker_build_env.Docker.buildImage&entity=method> >>>> at >>>> com.cloudbees.jenkins.plugins.docker_build_env.DockerfileImageSelector.prepareDockerImage(DockerfileImageSelector.java:41) >>>> >>>> <http://stacktrace.jenkins-ci.org/search/?query=com.cloudbees.jenkins.plugins.docker_build_env.DockerfileImageSelector.prepareDockerImage&entity=method> >>>> at >>>> com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.setUp(DockerBuildWrapper.java:152) >>>> >>>> <http://stacktrace.jenkins-ci.org/search/?query=com.cloudbees.jenkins.plugins.docker_build_env.DockerBuildWrapper.setUp&entity=method> >>>> at hudson.model.Build$BuildExecution.doRun(Build.java:156) >>>> <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Build$BuildExecution.doRun&entity=method> >>>> at >>>> hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:537) >>>> >>>> <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.run&entity=method> >>>> at hudson.model.Run.execute(Run.java:1741) >>>> <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Run.execute&entity=method> >>>> at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) >>>> <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.FreeStyleBuild.run&entity=method> >>>> at hudson.model.ResourceController.execute(ResourceController.java:98) >>>> <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.ResourceController.execute&entity=method> >>>> at hudson.model.Executor.run(Executor.java:408) >>>> <http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Executor.run&entity=method> >>>> Finished: FAILURE >>>> >>>> i am not getting what is the triggering point for : >>>> >>>> >>>> *Are you trying to connect to a TLS-enabled daemon without TLS?* >>>> >>>> can someone please suggest >>>> >>>> Regards >>>> >>>> Irfan >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Jenkins Users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/jenkinsci-users/CACGLCJZxveD-sjASD5-oFtE8B%2BXY3xavbz9C0SLur0_dT3xaOQ%40mail.gmail.com >>>> <https://groups.google.com/d/msgid/jenkinsci-users/CACGLCJZxveD-sjASD5-oFtE8B%2BXY3xavbz9C0SLur0_dT3xaOQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Jenkins Users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/jenkinsci-users/CAMui9447zbD3yn9ZEqSOti5%2Bz_yENjn%2BRNTL%2Brv6SXSe85_sbw%40mail.gmail.com >>> <https://groups.google.com/d/msgid/jenkinsci-users/CAMui9447zbD3yn9ZEqSOti5%2Bz_yENjn%2BRNTL%2Brv6SXSe85_sbw%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/CACGLCJaNdy4fnboB%3DiMzGPhTKQTxgiUMJmNgrdtccf3C2CuEmQ%40mail.gmail.com > <https://groups.google.com/d/msgid/jenkinsci-users/CACGLCJaNdy4fnboB%3DiMzGPhTKQTxgiUMJmNgrdtccf3C2CuEmQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANMVJzmTRB%3DoLcoYS0vhoM0LfNH4kyUD8xF3qumC7EwU0P%2BF9w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
