What does the circleci 'error connecting build-agent container to ephemeral network: "Invalid name or ID supplied:"' mean? - docker

I'm attempting to use the circleci cli tool to test my build configurations locally but whatever I do I keep getting the error:
$ circleci local execute --job test
Fetching latest build environment...
Docker image digest: sha256:0d6c17bb09da8707eabad913d61a68b28028906d48c176d6bd60ebd36cce222e
====>> Spin up environment
Build-agent version ()
System information:
Server Version: 20.10.20
Storage Driver: overlay2
Backing Filesystem: extfs
Cgroup Driver: systemd
Cgroup Version: 2
Kernel Version: 5.15.74-1-lts
Operating System: Arch Linux
OSType: linux
Architecture: x86_64
Error:
Unexpected environment preparation error: error connecting build-agent to ephemeral network: error connecting build-agent container to ephemeral network: Error response from daemon: invalid name or ID supplied: ""
Step failed
Task failed
Error: Unhandled prepare executor error: error connecting build-agent to ephemeral network: error connecting build-agent container to ephemeral network: Error response from daemon: invalid name or ID supplied: ""
I get this error for any job in any project on my machine indicating that it's something wrong with my system not the project. I can even run these commands fine on other machines. It something wrong with this machine but I have no idea what this error means. "invalid name or ID" to what? What is the thing with name or ID ""?
Update
Checking the docker systemctl logs I can see where circleci is getting the error:
Oct 27 13:36:46 myhost dockerd[1238]: time="2022-10-27T13:36:46.455536188-05:00" level=error msg="Handler for POST /v1.41/networks/a878ce01450ef752f4610bca358d4bf6b590385f1300ddac605b475ed8536985/disconnect returned error: invalid name: "
Oct 27 13:36:46 myhost dockerd[1238]: time="2022-10-27T13:36:46.763284410-05:00" level=info msg="ignoring event" container=5276cac204527a25344183be31abef0592a91ce6c36c2160e16d4d5d59bde7c3 module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"
so it looks like an error when trying to disconnect from a docker network with no name?

Related

process_linux.go:458: setting cgroup config for procHooks process caused: can't load program: operation not permitted: unknown (Docker))

I'm trying to deploy a docker container to perform some testings with gitlab runners but when I'm doing the docker-compose up command I get the following output:
admin#runners-test:~/runner-test$ sudo docker-compose up -d
Starting gitlab-runner ... error
ERROR: for gitlab-runner Cannot start service gitlab-runner: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: process_linux.go:458: setting cgroup config for procHooks process caused: can't load program: operation not permitted: unknown
ERROR: for gitlab-runner Cannot start service gitlab-runner: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: process_linux.go:458: setting cgroup config for procHooks process caused: can't load program: operation not permitted: unknown
ERROR: Encountered errors while bringing up the project.
Abd this is the output of journalctl:
Sep 23 07:23:24 runners-test dockerd[231]: time="2022-09-23T07:23:24.560275437Z" level=error msg="stream copy error: reading from a closed fifo"
Sep 23 07:23:24 runners-test dockerd[231]: time="2022-09-23T07:23:24.577270402Z" level=error msg="stream copy error: reading from a closed fifo"
Sep 23 07:23:24 runners-test dockerd[231]: time="2022-09-23T07:23:24.675282811Z" level=error msg="0cd3bbb779a947012c9059921f092b569eb088bb2fe0bf99a8ae3266ec43abbd cleanup: failed to delete container from containerd: no such container"
Sep 23 07:23:24 runners-test dockerd[231]: time="2022-09-23T07:23:24.675625496Z" level=error msg="Handler for POST /v1.25/containers/0cd3bbb779a947012c9059921f092b569eb088bb2fe0bf99a8ae3266ec43abbd/start returned error: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: process_linux.go:458: setting cgroup config for procHooks process caused: can't load program: operation not permitted: unknown"
And the docker-compose file:
version: '3'
services:
gitlab-runner:
container_name: gitlab-runner
image: 'gitlab/gitlab-runner:latest'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./config:/etc/gitlab-runner
restart:
unless-stopped
This error occurs with any container I try to lift, even doing a simple docker run hello-world...
I also take a look to this post on proxmox forum but I don't know how to add kernel command line parameters for a lxc container, I'v been trying editing the /etc/default/grub file but update-grub command doesn't work as I want inside the lxc, I get the following output:
admin#runners-test:/$ sudo update-grub
[sudo] password for admin:
/usr/sbin/grub-probe: error: failed to get canonical path of `/dev/mapper/pve-vm--1010118--disk--0'.
I'm really stuck with this, so any kind of help would be welcome :) Thanks!
I referenced many other links when finally discovering doing a (on CentOS) update did the trick. So:
yum update -y
reboot
After the reboot, the system came back online and I proceeded to run my docker container, in this case a docker registry:
[root#server ~]# docker run -d --name registry registry:2
c40941bf42c853709bcca05bad4e8914df1f4932a355607f37b55f7e0ed01e60
[root#server ~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
NAMES
c40941bf42c8 registry:2 "/entrypoint.sh /e..." 3 seconds ago Up 2 seconds 5000/tcp
The docker container booted up fine.
So, also here are reference pages I checked out, and I did not have to change anything in /boot/boot.txt as this one references, but is good info:
https://my-take-on.tech/2021/05/07/fix-docker-cgroup-errors-after-systemd-248-update/
and this one, which after I read it, it had me finally trying to do a yum update for fix:
docker-compose throws errors by starting mariadb for an private nextcloud installation

Unable to join Docker swarm because control.sock is missing?

I have an existing Docker swarm consisting of three machines. I am trying to add a new manager to this swarm. I run the command
docker swarm join --token SWMTKN-1-<...> 192.168.200.200:2377
After a while I get the error
Error response from daemon: manager stopped: can't initialize raft node: rpc error: code = Unknown desc = could not connect to prospective new cluster member using its advertised address: rpc error: code = DeadlineExceeded desc = context deadline exceeded
I view the daemon logs using tail -f /var/log/messages | grep docker, I see this:
Mar 17 17:07:48 UAT-Blockchain dockerd: time="2021-03-17T17:07:48.575024542+08:00" level=warning msg="grpc: addrConn.createTransport failed to connect to {/var/run/docker/swarm/control.sock <nil> 0 <nil>}. Err :connection error: desc= \"transport: Error while dialing dial unix /var/run/docker/swarm/control.sock: connect: no such file or directory\". Reconnecting..." module=grpc
A quick check shows that /var/run/docker/swarm/control.sock is indeed missing on this machine, but is present on the machines in the existing swarm.
What is this control.sock? How should I go about enabling/reinstating it on this current machine? Is this a problem of faulty installation?

Hyperledger - container_linux.go:349 starting container process caused "no such file or directory": unknown

I have installed Hyperledger Fabric (2.0.0-alpha) in Docker (2.2.0.5) running on Windows (Linux containers) and am trying to start the first-network example. When running the command ./byfn.sh -m up I am getting the following error:
OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused
"no such file or directory": unknown ERROR !!!! Test failed
From the Docker Dashboard, cli and peers have started, instead of orderer. When checking the logs of the orderer I see the following error:
2020-05-04 20:29:04.492 UTC [orderer.common.cluster] loadVerifier -> ERRO 003 Channel byfn-sys-channel has no blocks, skipping it
2020-05-04 20:29:04.500 UTC [orderer.common.cluster] loadVerifier -> INFO 004 Loaded verifier for channel testchainid from config block at index 0
2020-05-04 20:29:04.520 UTC [orderer.common.server] initializeServerConfig -> INFO 005 Starting orderer with TLS enabled
2020-05-04 20:29:04.521 UTC [orderer.common.server] initializeMultichannelRegistrar -> INFO 006 Not bootstrapping because of existing chains
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xe06ad9]
goroutine 1 [running]:
github.com/hyperledger/fabric/protoutil.GetMetadataFromBlock(0x0, 0x1, 0x0, 0x194, 0x1dad440)
/go/src/github.com/hyperledger/fabric/protoutil/blockutils.go:110 +0x39
github.com/hyperledger/fabric/protoutil.GetLastConfigIndexFromBlock(0x0, 0xc0002f22a0, 0xffffffffffffffff, 0x0)
/go/src/github.com/hyperledger/fabric/protoutil/blockutils.go:130 +0x37
github.com/hyperledger/fabric/orderer/common/multichannel.ConfigBlock(0x7f12cf76eda8, 0xc0002f22a0, 0x7f12cf76eda8)
/go/src/github.com/hyperledger/fabric/orderer/common/multichannel/registrar.go:111 +0x68
github.com/hyperledger/fabric/orderer/common/multichannel.configTx(0x7f12cf76eda8, 0xc0002f22a0, 0xc0002f22a0)
/go/src/github.com/hyperledger/fabric/orderer/common/multichannel/registrar.go:124 +0x35
I've checked for solutions online but no results till now.
Similar question 1 - he does not explain if he installed a new Docker version or did anything else differently.
Similar question 2 - in docker-compose.yml my working_dir for orderer.example.com is /opt/gopath/src/github.com/hyperledger/fabric/orderer and for cli /opt/gopath/src/github.com/hyperledger/fabric/peer
Also, my GO version is go1.8.7
I solved the issue following a few steps:
My scripts were not working well. so I opened file script.sh and utils.sh with notepad++ and set the EOL Conversion to Linux. After this I got the following error:
Error: failed to create deliver client for orderer: orderer client
failed to connect to orderer.example.com:7050: failed to create new
connection: connection error: desc = "transport: error while dialing:
dial tcp: lookup orderer.example.com on 127.0.0.11:53: no such host"
!!!!!!!!!!!!!!! Channel creation failed !!!!!!!!!!!!!!!!
I also cleared all unused images with the following docker rm -f $(docker ps -aq)
Bringing down the network ./byfn.sh down and then start it again solved the issue.

Traefik: Cannot start service: OCI runtime create failed: sysctl "kernel.domainname" is not in a separate kernel namespace: unknown

Tried raising this on GitHub but the Traefik bot doesn't think it is a bug:
What did you do?
Attempted to pull latest Docker image from DockerHub via Docker Compose and bring up the container
Ubuntu 18.04.1 (Kernel 4.15.0-42-generic)
What did you expect to see?
Successful start of Traefik container
What did you see instead?
Failed to start Traefik container
ERROR: for traefik Cannot start service traefik: OCI runtime create failed: sysctl "kernel.domainname" is not in a separate kernel namespace: unknown
Output of traefik version: (What version of Traefik are you using?)
Version: v1.7.6
Codename: maroilles
Go version: go1.11.3
Built: 2018-12-14_06:43:37AM
OS/Arch: linux/amd64
If applicable, please paste the log output in DEBUG level (--logLevel=DEBUG switch)
time="2018-12-16T08:44:09Z" level=error msg="vulcand/oxy/forward/websocket: Error when copying from backend to client: websocket: close 1006 (abnormal closure): unexpected EOF"
time="2018-12-16T09:06:09Z" level=error msg="vulcand/oxy/forward/websocket: Error when copying from backend to client: websocket: close 1006 (abnormal closure): unexpected EOF"
time="2018-12-16T09:28:00Z" level=error msg="vulcand/oxy/forward/websocket: Error when copying from backend to client: websocket: close 1006 (abnormal closure): unexpected EOF"
time="2018-12-17T11:56:28Z" level=error msg="vulcand/oxy/forward/websocket: Error when copying from client to backend: websocket: close 1006 (abnormal closure): unexpected EOF"
It would appear that the latest version of Traefik has deprecated the domainname parameter.
Removing this setting from Docker Compose allowed me to pull the latest image and bring up the container.

can't save docker images

i can't save my docker images, when i try to save a container, it fails:
Error response from daemon: chtimes /var/lib/docker/tmp/docker-export-616188241/947b32c6be7d631920d03730a39f6878b18bd6fad548baf5a0cf8fd59e34ef7f: invalid argument
here is docker log:
time="2016-04-28T11:25:29.819354407+04:30" level=info msg="GET /v1.21/images/get?names=jenkins"
time="2016-04-28T11:25:30.001454111+04:30" level=error msg="Handler for GET /v1.21/images/get returned error: chtimes /var/lib/docker/tmp/docker-export-206252912/2f86385bd2bb77c88bcbefdb8d9b69824b5b16e419fc6023462312df97451b01: invalid argument"
time="2016-04-28T11:25:30.001689438+04:30" level=error msg="HTTP Error" err="chtimes /var/lib/docker/tmp/docker-export-206252912/2f86385bd2bb77c88bcbefdb8d9b69824b5b16e419fc6023462312df97451b01: invalid argument" statusCode=500
the same problem was reported in docker github and the solution was adding validate timestamp, but i don't know how to do that and i can't find a way, my kernel is updated. and docker version is 1.9.1
what is the problem?
Considering issue 20324, try first to:
upgrade docker to 1.11 (on CentOS)
run your container again
try and save it to see if the issue persists

Resources