-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Podman fails to daemon postgres on Windows with run -d or -dt, Mac and Linux daemonize fine no issue #13965
Comments
Thanks for reaching out, @AddictArts, and apologies for the silence. @containers/podman-maintainers, any ideas? |
@n1hility PTAL |
(copied from 13966)
Sorry for the delay in replying. I am having a really hard time reproducing this. After it exits immediately, if you do When it fails, if you do a wsl -l -v, do you see wsl running? If you run it from powershell instead of CMD does it work (BTW I highly recommend installing windows terminal BTW, super useful: winget install Microsoft.WindowsTerminal)? Just to confirm if you run podman --version on the windows prompt you also see a 4.0.3 version?
Sorry I forgot to mention to do a |
Thanks for the help @n1hility
There is no error it just exits gracefully. Yes
If I open If I close the session, by say |
@AddictArts glad to help, and thanks for your patience. Is it only postgres that has the issue? Do you observe the same behavior with other daemons (e.g. httpd, nginx etc) Can you check the output of dmesg and see if you see any sort of oom_killer events or something that else that might explain a process being terminated? Do you have any special wslconfig settings (memory constraints etc)? If you run as rootfull do you observe the same behavior? You can do so without switching the VM by adding a -c to specify the rootfull connection like so podman -c podman-machine-default-root run ..... Be sure to keep using it when running ps / logs etc |
@n1hility No not only postgres. That other issue you helped with, network between wsl and Windows, hasura did exactly the same thing. If I started postgres with podman and then ran hasura using that podman instance, postgres would close and the hasura would stay running. If I run hasura pointing at a Windows service postgres, it will gracefully close and exit just like Postgres does as I describe. |
@n1hility I run podman rootless fyi |
@AddictArts thanks on confirming its multiple types of containers. In addition to my questions above I forgot to ask if you tried a full system restart. I assume you already did but I just want to mention that WSL caches the kernel and a hyper-v instance. You can force a kernel restart with --shutdown, but sometimes Hyper-V can have issues as well. The reason I asked about trying rootfull is the implementations are subtly different in a few areas. I'm hoping to find another clue as to why this is breaking for you. |
@n1hility No hyper-v. WSL no longer needs it. So, I did not install it. Yes a full restart was performed. As mentioned it appears the TTY's go away and the process exits due to that. Thanks |
@AddictArts right to be clear I was just referring to the internal dependency on the core hyper-v hypervisor layer (not the full hyper-v feature and tool chain), which yes you don't need. For a -d with no -t there wouldn't be a tty but the behavior would match session termination. Can you give the following try:
Then retry and see if that solves the issue. I have a feeling it will. BTW if it doesn't, if you could just confirm that
You should see linger is "yes" |
Knowing this was the likely issue I was finally able to reproduce and will fix this in 4.1.1. You can use the above fix until then. |
Hi sorry @n1hility I've been traveling and gone. Looks like the issue is resolved. Thanks
|
@AddictArts cool! thanks for your patience in tracking that one down |
/kind bug
When using
podman run -dt --name postgres -p 5432:5432 -e POSTGRES_PASSWORD=postgres docker.io/library/postgres:14.2
on Windows the process will exit without an error as though it received a shutdown. The same command on Linux and Mac OS it will properly daemonize. Also, otherpodman run -d
containers do run as daemons on WIndows WSL2 backend.Steps to reproduce the issue:
podman run -dt --name postgres --network apls -p 5432:5432 -e POSTGRES_PASSWORD=postgres -v postgres:/var/lib/postgresql/data docker.io/library/postgres:14.2
or
-d
ends with the same results. Also--network=host
does not work either.Describe the results you received:
It just stop running like a shutdown was received with no errors in
podman logs
etc.Describe the results you expected:
Stay as a daemon like Linux and Mac OS.
Output of
podman version
:4.0.3
Output of
podman info --debug
:Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
The text was updated successfully, but these errors were encountered: