0

When running postgresql alpine image with podman :

podman run --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=test -e POSTGRES_USER=test -d postgres:11-alpine

the result is :

Error: /usr/bin/slirp4netns failed: "open(\"/dev/net/tun\"): No such device\nWARNING: Support for sandboxing is experimental\nchild failed(1)\nWARNING: Support for sandboxing is experimental\n"

The running system is archlinux. Is there a way to fix this error or a turn arround ?

Thanks

1
  • What are the versions of podman and slirp4netns? I recall there was a similar bug with device nodes for unprivileged containers, and it was fixed some time ago... Commented Mar 7, 2020 at 10:13

2 Answers 2

2

I assume you upgraded Arch packages recently. Most likely your system needs a restart.

Sign up to request clarification or add additional context in comments.

2 Comments

After podman 2.2.1 update and system reboot, the problem was fixed. Thx to all.
@Ruddy32 if restart solved your problem, how about accepting the answer?
1
  1. Is slirp4netns correctly installed? Check the project Site for information.

  2. Sometimes the flag order matters. try -d first and -p last (directly infornt of the image) looking like:

    • podman run -d --name postgres -e POSTGRES_PASSWORD=test -e POSTGRES_USER=test -p 5432:5432 postgres:11-alpine
  3. Try only creating the neccessary password, then log into your container and create manually (this always worked for me)

    1. podman run -d --name postgres -e POSTGRES_PASSWORD=test -p 5432:5432 postgres:11-alpline
      1. podman exec -it postgres bash
      2. Create default user postgres
        • su - postgres
      3. start postgres
        • psql
      4. create databases and tables
        • CREATE USER testuser WITH PASSWORD 'testpassword' | Doku
        • CREATE DATABASE testdata WITH OWNER testuser
      5. Check if it worked
        • \l+
    2. Connect to your Database via IP and Port

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.