Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error validating CNI config fileError validating CNI config file #752

Open
bagusa4 opened this issue Aug 25, 2023 · 3 comments
Open

Error validating CNI config fileError validating CNI config file #752

bagusa4 opened this issue Aug 25, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@bagusa4
Copy link

bagusa4 commented Aug 25, 2023

Describe the bug
Error validating CNI config file....

To Reproduce
Steps to reproduce the behavior:

  1. what is the content of the current working directory (docker-compose.yml, .env, Dockerfile,)
  2. what is the sequence of commands you typed podman-compose up -d

please use minimal reproducible example for example give me a small busybox-based compose yaml

Expected behavior
the podman container should up

Actual behavior
cannot run podaman compose

Output
$ podman-compose version

podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 3.4.4
podman-compose version 1.0.6
podman --version 
podman version 3.4.4
exit code: 0

$ podman-compose up

$ podman-compose up -d
podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 3.4.4
** excluding:  set()
['podman', 'ps', '--filter', 'label=io.podman.compose.project=beasiswa', '-a', '--format', '{{ index .Labels "io.podman.compose.config-hash"}}']
WARN[0000] Error validating CNI config file /home/bagusa4/.config/cni/net.d/beasiswa_default.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] 
['podman', 'network', 'exists', 'beasiswa_default']
WARN[0000] Error validating CNI config file /home/bagusa4/.config/cni/net.d/beasiswa_default.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] 
podman run --name=php -d --label io.podman.compose.config-hash=e7c38e9b1c04559ba8d11a6b05b5480eea2fedc01cd78409ea99dc49fc6c20ca --label io.podman.compose.project=beasiswa --label io.podman.compose.version=1.0.6 --label PODMAN_SYSTEMD_UNIT=podman-compose@beasiswa.service --label com.docker.compose.project=beasiswa --label com.docker.compose.project.working_dir=/mnt/sdb1/Workspaces/PHP/serkom/beasiswa --label com.docker.compose.project.config_files=docker-compose.yml --label com.docker.compose.container-number=1 --label com.docker.compose.service=php -v /mnt/sdb1/Workspaces/PHP/serkom/beasiswa:/var/www/html --net beasiswa_default --network-alias php -p 8000:80 php:8.0-apache
WARN[0000] Error validating CNI config file /home/bagusa4/.config/cni/net.d/beasiswa_default.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] 
Error: error creating container storage: the container name "php" is already in use by "f929321753cba30e603826521130ca3376fc3ddb3a0bc35394cf7fd460e25eb8". You have to remove that container to be able to reuse that name.: that name is already in use
exit code: 125
podman start php
WARN[0000] Error validating CNI config file /home/bagusa4/.config/cni/net.d/beasiswa_default.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] 
WARN[0000] Error validating CNI config file /home/bagusa4/.config/cni/net.d/beasiswa_default.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] 
ERRO[0000] error loading cached network config: network "beasiswa_default" not found in CNI cache 
WARN[0000] falling back to loading from existing plugins on disk 
WARN[0000] Error validating CNI config file /home/bagusa4/.config/cni/net.d/beasiswa_default.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] 
ERRO[0000] Error tearing down partially created network namespace for container f929321753cba30e603826521130ca3376fc3ddb3a0bc35394cf7fd460e25eb8: CNI network "beasiswa_default" not found 
Error: unable to start container "f929321753cba30e603826521130ca3376fc3ddb3a0bc35394cf7fd460e25eb8": error configuring network namespace for container f929321753cba30e603826521130ca3376fc3ddb3a0bc35394cf7fd460e25eb8: CNI network "beasiswa_default" not found
exit code: 125
['podman', 'network', 'exists', 'beasiswa_default']
WARN[0000] Error validating CNI config file /home/bagusa4/.config/cni/net.d/beasiswa_default.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] 
podman run --name=mysql -d --label io.podman.compose.config-hash=e7c38e9b1c04559ba8d11a6b05b5480eea2fedc01cd78409ea99dc49fc6c20ca --label io.podman.compose.project=beasiswa --label io.podman.compose.version=1.0.6 --label PODMAN_SYSTEMD_UNIT=podman-compose@beasiswa.service --label com.docker.compose.project=beasiswa --label com.docker.compose.project.working_dir=/mnt/sdb1/Workspaces/PHP/serkom/beasiswa --label com.docker.compose.project.config_files=docker-compose.yml --label com.docker.compose.container-number=1 --label com.docker.compose.service=mysql -e MYSQL_ROOT_PASSWORD=password --net beasiswa_default --network-alias mysql -p 3306:3306 mysql:8.0
WARN[0000] Error validating CNI config file /home/bagusa4/.config/cni/net.d/beasiswa_default.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] 
Error: error creating container storage: the container name "mysql" is already in use by "7493cc5202f1253e9dc4793e639dd01028f52f882949dcf5b562cdc4ef6bd6a3". You have to remove that container to be able to reuse that name.: that name is already in use
exit code: 125
podman start mysql
WARN[0000] Error validating CNI config file /home/bagusa4/.config/cni/net.d/beasiswa_default.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] 
WARN[0000] Error validating CNI config file /home/bagusa4/.config/cni/net.d/beasiswa_default.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] 
ERRO[0000] error loading cached network config: network "beasiswa_default" not found in CNI cache 
WARN[0000] falling back to loading from existing plugins on disk 
WARN[0000] Error validating CNI config file /home/bagusa4/.config/cni/net.d/beasiswa_default.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] 
ERRO[0000] Error tearing down partially created network namespace for container 7493cc5202f1253e9dc4793e639dd01028f52f882949dcf5b562cdc4ef6bd6a3: CNI network "beasiswa_default" not found 
Error: unable to start container "7493cc5202f1253e9dc4793e639dd01028f52f882949dcf5b562cdc4ef6bd6a3": error configuring network namespace for container 7493cc5202f1253e9dc4793e639dd01028f52f882949dcf5b562cdc4ef6bd6a3: CNI network "beasiswa_default" not found
exit code: 125
['podman', 'network', 'exists', 'beasiswa_default']
WARN[0000] Error validating CNI config file /home/bagusa4/.config/cni/net.d/beasiswa_default.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] 
podman run --name=phpmyadmin -d --label io.podman.compose.config-hash=e7c38e9b1c04559ba8d11a6b05b5480eea2fedc01cd78409ea99dc49fc6c20ca --label io.podman.compose.project=beasiswa --label io.podman.compose.version=1.0.6 --label PODMAN_SYSTEMD_UNIT=podman-compose@beasiswa.service --label com.docker.compose.project=beasiswa --label com.docker.compose.project.working_dir=/mnt/sdb1/Workspaces/PHP/serkom/beasiswa --label com.docker.compose.project.config_files=docker-compose.yml --label com.docker.compose.container-number=1 --label com.docker.compose.service=phpmyadmin -e PMA_HOST=mysql -e PMA_USER=root -e PMA_PASSWORD=password --net beasiswa_default --network-alias phpmyadmin -p 8080:80 phpmyadmin
WARN[0000] Error validating CNI config file /home/bagusa4/.config/cni/net.d/beasiswa_default.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] 
Error: error creating container storage: the container name "phpmyadmin" is already in use by "06186624552e084f51d7760407eb5f4bd6afed32755eff2be40613d55197600f". You have to remove that container to be able to reuse that name.: that name is already in use
exit code: 125
podman start phpmyadmin
WARN[0000] Error validating CNI config file /home/bagusa4/.config/cni/net.d/beasiswa_default.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] 
WARN[0000] Error validating CNI config file /home/bagusa4/.config/cni/net.d/beasiswa_default.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] 
ERRO[0000] error loading cached network config: network "beasiswa_default" not found in CNI cache 
WARN[0000] falling back to loading from existing plugins on disk 
WARN[0000] Error validating CNI config file /home/bagusa4/.config/cni/net.d/beasiswa_default.conflist: [plugin bridge does not support config version "1.0.0" plugin portmap does not support config version "1.0.0" plugin firewall does not support config version "1.0.0" plugin tuning does not support config version "1.0.0"] 
ERRO[0000] Error tearing down partially created network namespace for container 06186624552e084f51d7760407eb5f4bd6afed32755eff2be40613d55197600f: CNI network "beasiswa_default" not found 
Error: unable to start container "06186624552e084f51d7760407eb5f4bd6afed32755eff2be40613d55197600f": error configuring network namespace for container 06186624552e084f51d7760407eb5f4bd6afed32755eff2be40613d55197600f: CNI network "beasiswa_default" not found
exit code: 125

full error

Environment:

  • OS: Linux
  • podman version: 3.4.4
  • podman compose version: 1.0.6

Additional context

docker-compose.yaml

version: '3.8'
services:
  php:
    image: php:8.0-apache
    container_name: php
    ports:
      - 8000:80
    volumes:
      - ./:/var/www/html
  mysql:
    image: mysql:8.0
    container_name: mysql
    ports:
      - 3306:3306
    environment:
      MYSQL_ROOT_PASSWORD: password
  phpmyadmin:
    image: phpmyadmin
    container_name: phpmyadmin
    ports:
      - 8080:80
    environment:
      PMA_HOST: mysql
      PMA_USER: root
      PMA_PASSWORD: password

Is this bug or another error?

@bagusa4 bagusa4 added the bug Something isn't working label Aug 25, 2023
@mrmac189
Copy link

https://bugs.launchpad.net/ubuntu/+source/libpod/+bug/2024394
I've had the same issue and last comment in this thread has helped me:
I changed cniVersion to 0.4.0 in /etc/cni/net.d/mynet.conflist and ran my podman-compose again

@NarekChang
Copy link

https://bugs.launchpad.net/ubuntu/+source/libpod/+bug/2024394 I've had the same issue and last comment in this thread has helped me: I changed cniVersion to 0.4.0 in /etc/cni/net.d/mynet.conflist and ran my podman-compose again

It's worked for me

@Encephala
Copy link

Encephala commented May 4, 2024

Also ran into this issue, changing cniVersion in the config file didn't fix it.

As a workaround, enabling the podman socket and using docker-compose does work.

Edit: when using docker-compose, podman network ls shows version 0.4.0 for the network, so that seems consistent with the solution above.
https://www.redhat.com/sysadmin/podman-docker-compose for reference on using docker-compose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants