Jenkins docker build Failed to exec start:java.net.SocketException: Broken pipe (Write failed)

6/9/2021

My system: OS Ubuntu 20.04 Jenkins 2.289.1 Docker - 19.03.15 NodeJs - 14 (try to Build project) Kubernetes - Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.7", GitCommit:"132a687512d7fb058d0f5890f07d4121b3f0a2e2", GitTreeState:"clean", BuildDate:"2021-05-12T12:40:09Z", GoVersion:"go1.15.12", Compiler:"gc", Platform:"linux/amd64"}

Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.7", GitCommit:"132a687512d7fb058d0f5890f07d4121b3f0a2e2", GitTreeState:"clean", BuildDate:"2021-05-12T12:32:49Z", GoVersion:"go1.15.12", Compiler:"gc", Platform:"linux/amd64"}

I deployed Jenkins on K8S and try to build Docker Image and push on local Docker registry. In Jenkins I created - Freestyle Project. Where Jenkins is cloned on Git and Build a NodeJS project. But I see evreytime a Error.

enter image description here

P.S I have a goal - Clone project NodeJS on Git and deploy on K8S. Maybe I have a some misstake ?

-- Inv0k-er
devops
github
jenkins
kubernetes

1 Answer

6/11/2021

Problem with docker socket. He was absent. So I deplyed Jenkins with Docker socket.

volumeMounts:
   - mountPath: /var/run/docker.sock
          name: docker-sock-volume
          readOnly: true



- name: docker-sock-volume
      hostPath:
        path: /var/run/docker.sock
        type: Socket
-- Inv0k-er
Source: StackOverflow