https://rancher.com/ logo
Title
h

helpful-butcher-75556

10/03/2022, 2:40 PM
On M1 Mac, to start an existing container, I always have to call start twice. The first time I get an error, and the second time always succeeds. This is for any container. Here is the output from starting
swaggergen
and
plantuml
> docker start swaggergen
FATA[0000] failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: time="2022-10-03T14:35:34Z" level=fatal msg="failed to call cni.Setup: plugin type=\"bridge\" failed (add): failed to allocate for range 0: 10.4.0.223 has been allocated to default-5bc005115dca3ab9857e16c6c3dbf3f219269ea65628c7b974f0d98f1c7b5755, duplicate allocation is not allowed"
Failed to write to log, write /var/lib/nerdctl/dbb19c5e/containers/default/5bc005115dca3ab9857e16c6c3dbf3f219269ea65628c7b974f0d98f1c7b5755/oci-hook.createRuntime.log: file already closed: unknown
> docker start swaggergen
swaggergen

> docker start plantuml
FATA[0000] failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: time="2022-10-03T14:39:17Z" level=fatal msg="failed to call cni.Setup: plugin type=\"bridge\" failed (add): failed to allocate for range 0: 10.4.0.43 has been allocated to default-92f1c588f142c0f2457ad20b4aef575227a8c3ee85d9d53f1aef2f31ba158826, duplicate allocation is not allowed"
Failed to write to log, write /var/lib/nerdctl/dbb19c5e/containers/default/92f1c588f142c0f2457ad20b4aef575227a8c3ee85d9d53f1aef2f31ba158826/oci-hook.createRuntime.log: file already closed: unknown
> docker start plantuml
plantuml
No one else has this issue?
j

jolly-forest-99711

10/27/2022, 4:58 PM
Hi, are you still having this problem? If so, could you create an issue on github? That way we can get the detail needed to debug the problem
h

helpful-butcher-75556

10/27/2022, 5:16 PM
It appears to have gone away with 1.6.0 or 1. Btw, when I migrated to 1.6.1 I couldn't restart my sqledge container and had to rebuild it. It would get a similar error but a second try didn't help. You can see I have the container, then try to start it. (Mac M1)
nerdctl ps -a
CONTAINER ID    IMAGE                                       COMMAND                   CREATED           STATUS     PORTS                                             NAMES
cae064719108    <http://mcr.microsoft.com/azure-sql-edge:latest|mcr.microsoft.com/azure-sql-edge:latest>     "/opt/mssql/bin/perm…"    3 months ago      Created    0.0.0.0:1433->1433/tcp                            sqledge
nerdctl start sqledge
FATA[0000] failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/var/lib/nerdctl/dbb19c5e/volumes/default/01d2561c214100328fe36a76c5727495a70cb504014d75c59fb1e67f5972df46/_data" to rootfs at "/var/opt/mssql-extensibility/data": stat /var/lib/nerdctl/dbb19c5e/volumes/default/01d2561c214100328fe36a76c5727495a70cb504014d75c59fb1e67f5972df46/_data: no such file or directory: unknown
j

jolly-forest-99711

10/28/2022, 3:58 PM
It appears to have gone away with 1.6.0 or 1.
That's great 😄
Btw, when I migrated to 1.6.1 I couldn't restart my sqledge container and had to rebuild it.
That's odd. Is this still a problem? Can you reproduce it? If the answer to either of those questions is yes, it would be great if you could create an issue
h

helpful-butcher-75556

10/28/2022, 4:01 PM
Since I re-created the containers, I haven't seen it again. If I get time I can try downgrading to test the scenario, but I haven't heard others mention it.
j

jolly-forest-99711

10/31/2022, 4:51 PM
Ok, well let us know if you see it again!
h

helpful-butcher-75556

11/02/2022, 12:57 PM
It's baaaack. I restarted Rancher and when starting stopped containers I had to do it two or three times.
> docker start sqledge
time="2022-11-02T12:49:48Z" level=fatal msg="cannot access containerd socket \"/run/k3s/containerd/containerd.sock\": no such file or directory"
FATA[0000] cannot access containerd socket "/run/k3s/containerd/containerd.sock": no such file or directory
> docker start sqledge
FATA[0000] failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: time="2022-11-02T12:50:50Z" level=fatal msg="failed to call cni.Setup: plugin type=\"bridge\" failed (add): failed to allocate for range 0: 10.4.0.56 has been allocated to default-ca265bf4ef4cac3f93938ac4def55b8f238ce1ba0cc8eb961d086c081ad678ac, duplicate allocation is not allowed"
Failed to write to log, write /var/lib/nerdctl/dbb19c5e/containers/default/ca265bf4ef4cac3f93938ac4def55b8f238ce1ba0cc8eb961d086c081ad678ac/oci-hook.createRuntime.log: file already closed: unknown
> docker start sqledge
sqledge

> docker start azuresqledge
FATA[0000] failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: time="2022-11-02T12:51:41Z" level=fatal msg="failed to call cni.Setup: plugin type=\"bridge\" failed (add): failed to allocate for range 0: 10.4.0.55 has been allocated to default-cea2e8e137a0d2039055b00814174843c3cc260f90417dffd98aa2a2d9faa255, duplicate allocation is not allowed"
Failed to write to log, write /var/lib/nerdctl/dbb19c5e/containers/default/cea2e8e137a0d2039055b00814174843c3cc260f90417dffd98aa2a2d9faa255/oci-hook.createRuntime.log: file already closed: unknown
> docker start azuresqledge
azuresqledge
(docker alias for nerdctl) This on on Mac M1 R 1.6.1
After the errors on the first start and RD restart, I can stop and start ok.
j

jolly-forest-99711

11/02/2022, 4:28 PM
failed to allocate for range 0: 10.4.0.56 has been allocated to default-ca265bf4ef4cac3f93938ac4def55b8f238ce1ba0cc8eb961d086c081ad678ac, duplicate allocation is not allowed
Sounds like something isn't getting deleted. Either that, or you have something else running that is trying to use this address range? That doesn't seem likely though. Are you running Docker Desktop, or any other container software?
@proud-jewelry-46860 does this sound familiar? I wonder if it's related to the refactoring we've been doing
p

proud-jewelry-46860

11/02/2022, 4:29 PM
Hmm, no, doesn't sound familiar to me…
j

jolly-forest-99711

11/02/2022, 4:29 PM
@helpful-butcher-75556 does this issue occur on 1.5.1? I know it's intermittent, but if you don't need the features in 1.6.1 you could try running 1.5.1 for a while. Might help us narrow down what is causing the problem
h

helpful-butcher-75556

11/02/2022, 4:33 PM
I'm pretty sure it was on 1.5.1 since I thought it went away with 1.6.0
I can try 1.5.1 again if you think it'd help.
j

jolly-forest-99711

11/02/2022, 5:40 PM
Hmm it doesn't seem likely that that would turn up any new info then. I think it would be best to just create an issue in github. I'm stumped
h

helpful-butcher-75556

11/02/2022, 5:57 PM
Ok, thanks. I'll add an issue to RD and try to watch for a consistent way to reproduce it
👍 1