mozzi
mozzi

Reputation: 75

Error while running "podman run"; error adding pod to CNI network "podman": unexpected end of JSON input

I'm new to podman, and I just trying to run containers on it.
(podman version 3.4.0, installed by brew, intel Core MAC)

However, when I trying to run "podman run {image-name}", below errors were thrown.

$ podman run -ti -d --name web httpd                                                 125 
Error: error configuring network namespace for container b0e70d672cb66005833c0a300c8661b88eab49e942c240d69d17587e0b75c47b: error adding pod web_2_web_2 to CNI network "podman": unexpected end of JSON input

$  podman run centos:7                                        
Error: error preparing container a6d0bc1ad217cd8207935561dc8ff7bd33672da3fa513917f9965cb39520c449 for attach: error configuring network namespace for container a6d0bc1ad217cd8207935561dc8ff7bd33672da3fa513917f9965cb39520c449: error adding pod quirky_snyder_quirky_snyder to CNI network "podman": unexpected end of JSON input

By reading https://issueexplorer.com/issue/containers/podman/11452, I removed ~/.docker/, but the solution doesn't work in my case.

Of course, the error message says there was "unexpected end of JSON input", but I don't know how to fix it. Could anyone guess why podman didn't work even running these base images, or how to debug it?

Thanks in advance.

Upvotes: 1

Views: 7335

Answers (1)

Vojtěch Šalbaba
Vojtěch Šalbaba

Reputation: 101

on macos, current machine version 3.3.1 has this problem. I had this problem on server version 3.3.1 and I do not encounter it on server version 3.4.0. You can check server version with podman version.

Try removing current machine and installing a newer one

podman machine stop
podman machine rm
podman machine init --image-path next
podman machine start

Check server version again with podman version. Try running your image again.

Upvotes: 2

Related Questions