Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

192 views
Skip to first unread message

anilkumar panditi

unread,
May 28, 2021, 1:36:24 PM5/28/21
to Jenkins Users
Hi,
sorry for asking repeated question,
Earlier i had worked on a Jenkins instance which is a docker docker container which uses the docker inside container like below.
-v /var/run/docker.sock:/var/run/docker.sock --privileged="true" --user="root"

But , my Jenkins instance is running on Openshift as pod ,now and i wanted to reuse the same Jenkinsfile which has docker commands , and failing with 
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Please help.

anilkumar panditi

unread,
May 31, 2021, 3:54:46 AM5/31/21
to jenkins...@googlegroups.com
Hi Could you please help.

--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/afc6f6ad-63f1-40a0-86d3-24486b0b321dn%40googlegroups.com.

amila...@gmail.com

unread,
May 31, 2021, 5:28:07 AM5/31/21
to Jenkins Users
Hi,

check first if openshift jenkins pod using its container engine  asweather docker or containerd or something else in your Openshift server. 
This error indicates docker daemon not running or cannot connect to docker daemon.   
<systemctl status docker>

<journalctl -u docker.service>

<vi /etc/docker/daemon.json>


not much idea about openshift docker for me.

AMila
Devops Eng



Richard Bywater

unread,
May 31, 2021, 7:37:51 AM5/31/21
to jenkins...@googlegroups.com
Which version of Openshift are you using? AFAIK Openshift 4 doesn't support use of the Docker socket anymore (or at least not by default)

Richard.

--
Reply all
Reply to author
Forward
0 new messages