Bug: Cannot connect to the Docker daemon in last updated plugins/docker
I've been using Gitness for months and haven't had any problems. Since yesterday this error started occurring. I noticed that the plugin was updated and I can't solve it.
Last run with error
Last run successfully
docker-compose.yml
services:
gitness:
image: harness/harness:3.0.1
container_name: gitness
privileged: true
restart: always
environment:
GITNESS_DATABASE_DRIVER: "postgres"
GITNESS_DATABASE_DATASOURCE: "host=postgres port=5432 sslmode=disable dbname=gitness user=$DB_USER password=$DB_PASSWORD"
GITNESS_PRINCIPAL_ADMIN_EMAIL: "**********"
GITNESS_URL_BASE: ""**********"
GITNESS_USER_SIGNUP_ENABLED: "false"
GITNESS_CI_PARALLEL_WORKERS: 3
GITNESS_URL_REGISTRY: ""**********"
networks:
- public
ports:
- 3000:3000
- 3022:3022
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- .data:/data
networks:
public:
external: true
Hey @AGPDev, thanks for bringing up the issue.
We had multiple people try to reproduce the error, but no success. The latest plugins/docker image seems to be working fine in our setups. Could you provide some more information about your pipeline and setup?
@johannesHarness
Hey @AGPDev, thanks for bringing up the issue. We had multiple people try to reproduce the error, but no success. The latest
plugins/dockerimage seems to be working fine in our setups. Could you provide some more information about your pipeline and setup?
course, see some pipelines we use.
version: 1
kind: pipeline
options:
clone:
depth: 1
spec:
stages:
- name: build_deploy
desc: "Build image with spiders and Deploy"
type: ci
when: |
build.event == "manual"
or
build.target == "main"
spec:
platform:
arch: amd64
os: linux
steps:
- name: build
type: plugin
spec:
name: docker
inputs:
compress: true
registry: "*********.com"
username: ${{ secrets.get("DOCKER_REGISTRY_USER") }}
password: ${{ secrets.get("DOCKER_REGISTRY_PASSWORD") }}
repo: "********.com/spiders"
context: "."
dockerfile: "./Dockerfile"
tags: latest
All others pipelines use the same pattern.
Bellow is the last change trying make work.
version: 1
kind: pipeline
options:
clone:
depth: 1
spec:
stages:
- name: build-base
desc: "Build Base image with dependencies"
type: ci
spec:
platform:
arch: amd64
os: linux
steps:
- spec:
inputs:
{
compress: true,
force_tag: true,
insecure: true,
launch_debug: true,
daemon_off: true,
experimental: true,
platform: linux/amd64,
registry: ****.com,
username: '${{ secrets.get("DOCKER_REGISTRY_USER") }}',
password: '${{ secrets.get("DOCKER_REGISTRY_PASSWORD") }}',
repo: ****.com/spiders-base,
context: .,
dockerfile: ./Dockerfile.base,
tags: latest
}
name: docker
# image: "plugins/docker:20.17.4"
type: plugin
Hey, @AGPDev
Can you try the following:
- Share the Docker runtime you are using and version. Colima? Docker Desktop? Rancher?
- Can you run 'docker info' to ensure that Docker daemon is running?
- Can you run the auto generated 'hello world' pipeline on this instance?
- Can you add a 'wait' to the pipeline to allow you to ssh into the container of the plugin and get 'docker info'
Regards, Patrick
@pwolf-harness
-
i'm using Linux VPS
Client: Docker Engine - Community
Version: 27.3.1
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.17.1
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.29.7
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 12
Running: 9
Paused: 0
Stopped: 3
Images: 58
Server Version: 27.3.1
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 7f7fdf5fed64eb6a7caf99b3e12efcf9d60e311c
runc version: v1.1.14-0-g2c9f560
init version: de40ad0
Security Options:
seccomp
Profile: builtin
Kernel Version: 3.10.0
Operating System: AlmaLinux 9.4 (Seafoam Ocelot)
OSType: linux
Architecture: x86_64
CPUs: 11
Total Memory: 8GiB
Name: *********
ID: c266008e-3436-4094-975a-03b960bef18e
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
- Yes, results:
Pipeline
version: 1
kind: pipeline
spec:
stages:
- name: build
type: ci
spec:
steps:
- name: build
type: run
spec:
container: alpine
script: echo "hello world"
- Can you give me a example?
Hi @AGPDev are you still experiencing this issue?
the best solution is to config private docker registry on the system settings
but no one impl yet
Hi @Talbot3 are you seeing the same error that @AGPDev reported? Could you pls share details?
Due to inactivity, we're closing this issue.