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
Can't connect to exposed port (database) #4454
Comments
I have the same issue with
|
@mheon Is this a CNI issue? |
Potentially? Hard to tell with only this. Can you try with another protocol (HTTP server is usually easy) and verify if you can connect to that? |
For example nginx works:
But mariadb does not work:
After some time, it suddenly becomes available:
Complete log from mariadb container:
|
Aha. So this is very specifically MySQL/MariaDB. Interesting. |
Could it be that mariadb is not listing on the port right a way and takes some time to finish starting. And you are checking too quickly. |
I don't think that it should start 2 minutes. With Docker it's ready right away and with Podman on CentOS 7 it worked for me without the delay too. Because this bug affects two different images I think that it is caused by Podman. Hope you guys can find it :) |
@mheon is this likely ours or CNI? |
Has to be CNI - we've already finished all CNI config before we start the container, from our perspective. |
This issue had no activity for 30 days. In the absence of activity or the "do-not-close" label, the issue will be automatically closed within 7 days. |
@SemaiCZE Are you still seeing this issue? |
@rhatdan yes, I didn't get any update of related components yet. Is it fixed in upstream? And which package is related? |
I would hope the fix was in CNI. |
If it is fixed, it would probably be containernetworking-plugins, but I have not seen any updated versions of that drop recently. |
Ok, I have this one nailed down. It is mariadb specific and not the fault of podman or cni. In one terminal, run top. In another, run the command as provided ... and in another terminal, run a podman container log -f. What you will observe is this: In the container, by way of top, the mysqld binary is chewing up CPU presumably to get setup. The maria db logs are as follows:
Then, as observed, after a short time, the mysqld drops in cpu, and the log furthers:
Once the "ready" message appears, the port works. So to put this to bed, all of the container and network plumbing are in fact working. We are simply waiting for maria db to complete its initial setup and bind to the port. |
under MacBook Pro, the connection refused. the podman remote host container shows following error:
but |
I got it running with the --network flag. |
/kind bug
Description
Can't connect to exposed port (database)
Steps to reproduce the issue:
sudo podman run --name some-mysql -e MYSQL_ROOT_PASSWORD=root -d -p 3309:3306 docker://mysql:8
sudo podman ps -a
-> Port is exposed
Connect to the database: <host_ip>:3309, user:root, pass:root
Describe the results you received:
java.net.ConnectException: Connection refused: connect
(I use IntelliJ to connect to the db)Describe the results you expected:
Successfull connection
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Additional environment details (AWS, VirtualBox, physical, etc.):
VirtualBox
The text was updated successfully, but these errors were encountered: