devtron-labs / devtron

Tool integration platform for Kubernetes
https://devtron.ai
Apache License 2.0
4.33k stars 477 forks source link

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

Closed emoxam closed 8 months ago

emoxam commented 10 months ago

πŸ“œ Description

I'm trying to build docker image with my jar file at the devtron log i see an error that docker is not running

πŸ‘Ÿ Reproduction steps

My pipeline getting source and docker file from bitbucket then i want it to build docker image and upload it to my nexus docker registry i guess on the build step it's failing

πŸ‘ Expected behavior

it builds well

πŸ‘Ž Actual Behavior

here's a log

21
Login Succeeded

22
2023/12/12 12:10:39 Starting docker build :  docker build  -f Dockerfile --network host -t addressbook .

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

24
2023/12/12 12:10:39 exit status 1

25
END_OF_STREAM

☸ Kubernetes version

1.24.4

Cloud provider

on premises

🌍 Browser

Chrome

🧱 Your Environment

docker file is

FROM openjdk:17-jdk-slim
COPY target/addressBook-0.0.1-SNAPSHOT.jar addressBook.jar
WORKDIR /
EXPOSE 8080
CMD java -Denv=prod -jar addressBook.jar

βœ… Proposed Solution

No idea

πŸ‘€ Have you spent some time to check if this issue has been raised before?

🏒 Have you read the Code of Conduct?

AB#7443

emoxam commented 10 months ago

1-ci-1-5gcz-1-4z65q PODs logs

2023/12/12 12:10:28 DEVTRON SIGTERM listener started!
2023/12/12 12:10:28 DEVTRON  cache-pull
2023/12/12 12:10:28 ignoring cache as storage module not configured ... 
2023/12/12 12:10:28 DEVTRON  /cache-pull
2023/12/12 12:10:28 DEVTRON  git
2023/12/12 12:10:28 -----> git cloning https://bitbucket.integris.ru/scm/dss2/addressbook.git
2023/12/12 12:10:28 DEVTRON git fetch  location /devtroncd
2023/12/12 12:10:28 DEVTRON fetch output root /devtroncd opt From https://bitbucket.integris.ru/scm/dss2/addressbook * [new branch]      dss2-18    -> origin/dss2-18 * [new branch]      master     -> origin/master errMsg  error <nil>
2023/12/12 12:10:28 checkout commit in branch fix :  8f4985b3adfdea264fa217ca9b1c4732846f8a1e
2023/12/12 12:10:28 DEVTRON git checkout  location /devtroncd
2023/12/12 12:10:28 DEVTRON checkout output root /devtroncd opt Note: switching to '8f4985b3adfdea264fa217ca9b1c4732846f8a1e'.You are in 'detached HEAD' state. You can look around, make experimentalchanges and commit them, and you can discard any commits you make in thisstate without impacting any branches by switching back to a branch.If you want to create a new branch to retain commits you create, you maydo so (now or later) by using -c with the switch command. Example:  git switch -c <new-branch-name>Or undo this operation with:  git switch -Turn off this advice by setting config variable advice.detachedHead to falseHEAD is now at 8f4985b values.yaml edited online with Bitbucket errMsg  error <nil>
2023/12/12 12:10:28 DEVTRON  fetchSubmodules  false  authMode  USERNAME_PASSWORD
2023/12/12 12:10:28 DEVTRON  /git
2023/12/12 12:10:28 DEVTRON  docker-build
2023/12/12 12:10:28 
------------------------------------------------------------------------------------------------------------------------
STAGE:  Insecure Registry
------------------------------------------------------------------------------------------------------------------------
2023/12/12 12:10:28 
time="2023-12-12T12:10:36.707Z" level=info msg="/argo/podmetadata/annotations updated"
addressbook,./,master,8f4985b3adfdea264fa217ca9b1c4732846f8a1e|
Docker login successful with username  jenkins-to-gitlab  on docker registry URL  nexus.integris.ru
2023/12/12 12:10:38 DEVTRON devtron-ci yaml location  
2023/12/12 12:10:38 file not found devtron-ci.yaml
2023/12/12 12:10:38 
------------------------------------------------------------------------------------------------------------------------
STAGE:  Build
------------------------------------------------------------------------------------------------------------------------
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
2023/12/12 12:10:39 DEVTRON  docker file location:  
2023/12/12 12:10:39 Starting docker build :  docker build  -f Dockerfile --network host -t addressbook .
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
2023/12/12 12:10:39 exit status 1
2023/12/12 12:10:39 DEVTRONci complete event notification done
2023/12/12 12:10:39 DEVTRON housekeeping done. exiting now
2023/12/12 12:10:39 DEVTRON ci complete event notification done
2023/12/12 12:10:39 DEVTRON  housekeeping done. exiting now
2023/12/12 12:10:39 DEVTRON false exit status 1
2023/12/12 12:10:39 DEVTRON not going to upload artifact as storage module not configured...
2023/12/12 12:10:39 DEVTRON exit status 1
2023/12/12 12:10:39 DEVTRON  CI-Runner cleanup executed with exit Code 2 Source_Defer
2023/12/12 12:10:39 DEVTRON  blob storage configured  false
2023/12/12 12:10:39 DEVTRON  in app logging enabled  false
2023/12/12 12:10:39 DEVTRON not uploading logs from app
2023/12/12 12:10:39 DEVTRON  Exiting with exit code  2
time="2023-12-12T12:10:39.415Z" level=info msg="Main container completed"
time="2023-12-12T12:10:39.415Z" level=info msg="No Script output reference in workflow. Capturing script output ignored"
time="2023-12-12T12:10:39.415Z" level=info msg="Capturing script exit code"
time="2023-12-12T12:10:39.415Z" level=info msg="Getting exit code of main"
time="2023-12-12T12:10:39.419Z" level=info msg="Get pods 200"
time="2023-12-12T12:10:39.420Z" level=info msg="No output parameters"
time="2023-12-12T12:10:39.420Z" level=info msg="No output artifacts"
time="2023-12-12T12:10:39.420Z" level=info msg="Annotating pod with output"
time="2023-12-12T12:10:39.427Z" level=info msg="Patch pods 200"
time="2023-12-12T12:10:39.436Z" level=info msg="Killing sidecars []"
time="2023-12-12T12:10:39.437Z" level=info msg="Alloc=7723 TotalAlloc=24862 Sys=73297 NumGC=7 Goroutines=10"
emoxam commented 10 months ago

any comments ?

pawan-mehta-dt commented 10 months ago

Hi @emoxam which provider are you using to setup devtron? Are there any security policies on host?

emoxam commented 10 months ago

Hi @prakarsh-dt helm install devtron devtron/devtron-operator --create-namespace --namespace devtroncd --set installer.modules={cicd} --set argo-cd.enabled=true

What is 'security policies' ?

pawan-mehta-dt commented 10 months ago

@emoxam How did you set the cluster? Any tool you are using for same?

emoxam commented 10 months ago

@prakarsh-dt Via kubeadm. No such tool at cluster i guess. But we can check, what info do you need ? deployments ? helm charts ?

emoxam commented 9 months ago

@prakarsh-dt Any updates or i can delete devtron ?

prakarsh-dt commented 9 months ago

@prakarsh-dt Any updates or i can delete devtron ?

Will it be possible for you to get on a call with us for us to figure out the underlying issue you're facing? Please join our discord server at https://discord.devtron.ai and drop us a message in #setup-and-installation channel. Feel free to quote me there @raj.prakarsh

abhibhaw commented 8 months ago

Duplicate of #719 fixed with https://github.com/devtron-labs/ci-runner/pull/121