-
Notifications
You must be signed in to change notification settings - Fork 24
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
Unable to connect to MySQL with App Mesh #62
Comments
In my podspec, I added the following for proxyinit
When I deployed it, the pod fails to start and renders the following log:
It's almost like it's not using what I specify. Any idea on why it appears to ignore my ignored ports? |
@ryan-idea42 You are correct. I've found a bug in our proxy manager script as well that prohibits this from being set appropriately. We're working on updating that container with the correct code, and will report back here once we have it published. |
@ryan-idea42 Give |
That did it! I'm able to hit the DB now and pull back results. Thank you! |
@bcelenza Is this something that is permanent? Or is this just a temporary fix as we wait for an official fix? Basically, wanting to know if we'll have issues with this in a production level environment. |
@ryan-idea42 This is a temporary workaround while we work on an official fix. So long as you're okay not seeing MySQL traffic run though Envoy (for stats, etc.), this workaround can be used in production safely. We'll respond back here once we have a plan in place for a longer term fix. |
This helped me get out of a jam, spent a while chasing my tail on this one. I think the temporary fix should be documented somewhere as I'm sure I'm not the only one who has faced this situation as well |
To give ya'll an update, we're researching how to solve this from the perspective of Envoy for MySQL and other "server-sends-first-byte" protocols. |
We are now actively working on a change to enable MySQL traffic run though Envoy. We are expecting to complete the work here early April. A new AppMesh Envoy image will be available to enable this new feature. Stay tuned here. |
But now is March. Do you mean April 2021? |
Thank for the response @sergeyklay. No, I did not mean April 2021. Isn't March earlier than April? Let me know if I'm missing anything here. We are indeed actively working on this issue, and treating it as high priority as we know this is what AppMesh customer wants. Since we have a higher confidence on delivering this, thus making a rough time commitment here. Let me know if any questions. Thank you! |
@LancerRainier Glad to see it get off the ground. I'm sorry it was bad joke |
@sergeyklay No worries! :) |
Hi, it's April 2020 so we owe you a status update. We are actively working to fix this bug. We are currently shoring up the AppMesh Envoy release process, which will ensure faster, higher-quality releases. This effort will pave the way for the AppMesh Envoy 1.14.x releases. Once that's complete, we'll be able to start vending Envoy configurations that are compatible with MySQL databases (fixing the bug). Update 5/5/2020: this should be fixed by early-mid Q3. |
in case it helps somebody in the meantime, i was able to update the ignored ports by adding this annotation below in my deployment:
|
A quick update since its been a while: We delayed this item due to various internal reasons, but we are actively making progress here to release it. We are in the release process and are looking at releasing this to all regions somewhere in early Q4 2020. |
The issue has been fixed now for customers using App Mesh Envoy image version 1.15.0 or later. But, if you are still using an older version of AppMesh Envoy image, you still need to apply the quick-fix suggested at the top of this issue or in the official AWS document (link mentioned below) under the heading “Unable to connect to a MySQL or SMTP server”. If you need more details, please refer to the linked official AWS document. Thank you all for patiently waiting for the fix. Official AWS Doc: https://docs.aws.amazon.com/app-mesh/latest/userguide/troubleshoot-connectivity.html |
Summary
When allowing egress traffic to all destinations (Mesh EgressFilter type=ALLOW_ALL), or specifically to a MySQL database via a VirtualNode definition, the connection will fail to MySQL with the error:
This error occurs because the egress listener in Envoy configured by App Mesh adds the TLS Inspector listener filter, which evaluates whether or not a connection is using TLS by inspecting the first packets sent from the client. However, in the case of MySQL, the server sends the first packets after connection. From that link:
Because the server sends the first packet, inspection at the filter fails.
The App Mesh team is currently investigating a fix for this issue.
Steps to reproduce
Expected: You are able to connect.
Actual: Connection fails with
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
Workaround
To work around this issue, add port 3306 to the list of ignored egress ports for Envoy.
For ECS, you can set this in the Proxy Configuration.
For EKS, you can set the environment variable
APPMESH_EGRESS_IGNORED_PORTS
in the pod definition for the proxyinit container. See Getting Started with EKS for more information on this definition.For EC2, you can set
APPMESH_EGRESS_IGNORED_PORTS
using the proxy route manager script. See Getting Started with EC2 for more information on this script.The text was updated successfully, but these errors were encountered: