-
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 container cannot access port on Windows host #22237
Comments
I found a similar issue when upgrading from Fedora Silverblue 39 (Podman 4.9.4) to 40 (podman 5.0.1). In FS39 I can reach host ports inside a container attached to a network defined in docker-compose.yml file. In FS40, the connection is refused. Toolbox created containers can connect to host on both FS39 and FS40. I tried reseting and recreating again with I rebased again to FS39 (I didn't pin before rebasing to FS40 😞 ) and it works again. PS: I'm using podman-remote inside a toolbox to create the containers in the host, maybe it could be related... |
I am not sure about Windows, but on Linux, I have this problem from Podman 5 (after upgrading to Fedora 40). The problem is probably related to the Pasta network driver, which has been default since v5. When I switched from pasta back to slirp4netns, it worked again.
|
@dontfreakout Cheers for this tip! This got my Cloudflare SSH-tunnel working again. However, I need to read Pasta docs to see how host access should really be done with it. |
@kontza can you share the steps you did to make this change...I must be doing it wrong as still not working for me. |
Short story: I started to use host networking. |
For the record, and I think it's important: using the Ollama app instead of just using the command line, a UAC prompt asked me to enable access for |
Issue Description
I'm trying to run the Open WebUI container and access the Ollama API exposed on
http://localhost:11434
, since Ollama is installed on my local Windows 11 machine. However, the container running in the Podman machine (podman-machine-default
WSL2 distro) cannot reach addresses on the Windows host.Steps to reproduce the issue
Steps to reproduce the issue
WIN_IP
is the result ofip route show | grep -i default | awk '{ print $3}'
onpodman-machine-default
:1.
podman run -d -p 11435:8080 --add-host=host.containers.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
2.
podman run -d -p 11435:8080 -e OLLAMA_BASE_URL=WIN_IP:11434 -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
3.
podman -d --network=host -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://WIN_IP:11434 --name open-webui --restart always ghcr.io/open-webui/open-webui:main
http://localhost:11435
orhttp://localhost:8080
if using the--network=host
flagpodman logs
shows theERROR:apps.ollama.main:Connection error: Cannot connect to host WIN_IP:11434 ssl:default [Connection refused]
Describe the results you received
The container could not reach the Windows app in any way
Describe the results you expected
The container to retrieve results from the address on the Windows host
podman info output
Podman in a container
No
Privileged Or Rootless
Privileged
Upstream Latest Release
Yes
Additional environment details
The command
wsl --version
gives:Additional information
I've used the issues #14933, #13966 and #13965 as references but none of them could actually fix the issue
The text was updated successfully, but these errors were encountered: