Closed jd-boyd closed 1 month ago
Can you run the same command in the VM, i.e. use podman machine ssh
, this should print a better error I think.
If it works without -p then it most likely means the port is already in use.
Yep, that does print a better error:
[root@JDB-Z4G4-Win ~]# podman pod create -p 5672:5672 -n test_pod
WARN[0000] Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and will be removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.
290d50c4c2c076ee2609f995579c85593639aaf1a0b94ccc5a500011262fab35
[root@JDB-Z4G4-Win ~]# podman run -d -e POSTGRES_USER=test_user -e "POSTGRES_PASSWORD=test_pass" -e POSTGRES_DB=test_db --pod test_pod --name pg_test docker.io/postgres:16
WARN[0000] Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and will be removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning.
ERRO[0000] Starting some container dependencies
ERRO[0000] "cannot listen on the TCP port: listen tcp4 :5672: bind: address already in use"
Error: starting some containers: internal libpod error
[root@JDB-Z4G4-Win ~]#
Netstat shows this:
tcp6 0 0 :::5672 :::* LISTEN -
So the port I'm trying to use is being listened to by the kernel for some reason. This is the first time I've ssh'd into the VM though, and I don't have any pods or containers running currently, so why would something be listening to that port?
Also, should a bug be filed about the better error not being shown by the windows podman command?
Yep, that does print a better error:
[root@JDB-Z4G4-Win ~]# podman pod create -p 5672:5672 -n test_pod WARN[0000] Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and will be removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning. 290d50c4c2c076ee2609f995579c85593639aaf1a0b94ccc5a500011262fab35 [root@JDB-Z4G4-Win ~]# podman run -d -e POSTGRES_USER=test_user -e "POSTGRES_PASSWORD=test_pass" -e POSTGRES_DB=test_db --pod test_pod --name pg_test docker.io/postgres:16 WARN[0000] Using cgroups-v1 which is deprecated in favor of cgroups-v2 with Podman v5 and will be removed in a future version. Set environment variable `PODMAN_IGNORE_CGROUPSV1_WARNING` to hide this warning. ERRO[0000] Starting some container dependencies ERRO[0000] "cannot listen on the TCP port: listen tcp4 :5672: bind: address already in use" Error: starting some containers: internal libpod error [root@JDB-Z4G4-Win ~]#
Netstat shows this:
tcp6 0 0 :::5672 :::* LISTEN -
So the port I'm trying to use is being listened to by the kernel for some reason. This is the first time I've ssh'd into the VM though, and I don't have any pods or containers running currently, so why would something be listening to that port?
use ss -tlpn
to list the ports with the processes
Also, should a bug be filed about the better error not being shown by the windows podman command?
yes sure
@n1hility could this be a case where the socket is being set aside as a group for podman machine?
if you don't see a process associated with it this likely means the process is in another pid namespace, which most likely means its coming from another wsl instance. My recommendation would be to stop podman and shutdown wsl, then restart podman:
podman machine stop
Start-Sleep 5
wsl --shutdown
Start-Sleep 5
podman machine start
A friendly reminder that this issue had no activity for 30 days.
After some rounds of Windows updates, I can't make it fail again on either test system, so I'm going to go ahead and close this. Thank you for the help. At least I learned somethings.
Issue Description
On Windows 11 Pro running a container in a pod that publishes a port prints the error
Error: starting some containers: internal libpod error
.While the steps to reproduce below use a postgres container, I get the same result for any other container I tried (minio, redis, and a custom built one based on python:3.12-slim-bookworm.
Steps to reproduce the issue
Steps to reproduce the issue
podman pod create -p 5672:5672 -n test_pod
podman run -d -e POSTGRES_USER=test_user -e "POSTGRES_PASSWORD=test_pass" -e POSTGRES_DB=test_db --pod test_pod --name pg_test docker.io/postgres:16
Describe the results you received
Error: starting some containers: internal libpod error
Also,podman ps
does not show the container running.Describe the results you expected
The postgres container to be running, named pg_test, and to be able to connect to it.
podman info output
Podman in a container
No
Privileged Or Rootless
Privileged
Upstream Latest Release
Yes
Additional environment details
While I selected Privileged above, I originally ran into this while trying to use rootless, so I don't think this setting effects the issue.
This is running on Windows 11 Pro, systeminfo shows the version as:
Additional information
If I don't use the
-p
onpodman pod create
, then the postgres container starts correctly, but I can't connect to it.If I skip the pod and run
podman run -d -e POSTGRES_USER=test_user -e "POSTGRES_PASSWORD=test_pass" -e POSTGRES_DB=test_db -p 5672:5672 --name pg_test docker.io/postgres:16
, the container runs as expected.