-
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
Getting: upstream connect error or disconnect/reset before headers. reset reason: connection termination #196
Comments
Based on the available information, I think at least part of the problem is that A workaround is to have a dummy entry in |
@efe-selcuk My first test was indeed with api+private dns and it worked fine there (sorry, should have mentioned it in my original post.). Will test it out again - just to confirm BTW: editing EDIT: @efe-selcuk Confirmed to work with API+private DNS namespace and services with
|
Thanks for linking the fargate issue, I'll pass this onto my team as this affects troubleshooting. Glad that private dns solved it. Given that it works with private DNS, do you still have an open issue? Outside of the general issue of requiring DNS even when Cloud Map is enabled, that is. Either way I'll leave this open to see if our dataplane team needs any further info. |
I'll also link the Envoy DNS filter tracking issue: envoyproxy/envoy#6748 if you are intrested in tracking the work going on there. We are indeed actively working on changes to the upstream Envoy project that will make these DNS entries unnecessary by having the proxy intercept and resolve these DNS queries without the need for hacking |
@efe-selcuk @lavignes Testing out API-only was the decision we made due to the following limitations with PrivateDNS based discovery with AppMesh and Cloudmap. I'm open to workarounds/explanations/corrections for these:
Currently it appears we cannot create services without DnsConfig with private dns although it says "API and private VPC" in the Cloudmap console.
|
FYI: for people using golang.. it defaults to DNS resolution if |
To be clear, if you configure Cloud Map service discovery on your virtual node, App Mesh will use the API to discover endpoints, not relying on DNS. The suggestion to also use the private dns mode is purely to make sure that ECS+Cloud Map is populating DNS as a workaround for the application DNS queries. So, I believe that addresses 2, 3, and 4? You could also set up your infrastructure such that you set your own dummy entries in Route 53 (what you would have done in Re: 1, you do of course incur the overhead of those DNS queries from the application, which the hosts file hack helps address, and similarly for 5, dns caching will help reduce the impact. |
Thanks that clarifies some of my concerns. Private DNS namespace should work fine for now (we kinda have to live with the DNS lookups and the overhead that comes with it). However, at some point we would like to move to API only namespace - all those Route53 entries triggers my OCD ;) I suppose to migrate apps between cloudmap namespaces, we just have to do the following?
Sounds like a bit of a work if this is the case. Would be nice if we could register services in private dns namespace without the dns config (since it supports both API and DNS calls)? |
Correct. There are multiple ways to accomplish the migration, but as you've written it, you'd want to break up no. 2 into distinct steps to avoid inconsistency. Though, you don't necessarily have to modify your downstream applications, depending on how your mesh and DNS/namespaces are structured. It's possible to keep that stable virtual service name, since the nodes behind it independently specify their own service discovery; i.e., just point your virtual service to different virtual nodes. What's actually in those route53 entries effectively doesn't matter, in this case, so it's ok if they go stale (considering TTLs of course). |
We've added documentation for this under our best practices: https://docs.aws.amazon.com/app-mesh/latest/userguide/troubleshooting-connectivity.html#ts-connectivity-dns-resolution-virtual-service |
@efe-selcuk has this changed? We are facing the same issue with similar setup |
@aruandre This is still the behavior. I believe we are ramping up on investigations/design and such, but I can't speak to progress or timelines. I'm sure a feature request issue will pop up, or honestly feel free to create one in the queue asking for it. If an issue exists that I don't know about, an engineer will redirect. |
@efe-selcuk that's disappointing. Took us quite some time troubleshooting and wondering why we can't make it work with AppMesh, finally discovering this issue. |
@aruandre Yeah, it's a long standing pain point we'd like to resolve. I believe API-only namespace is usable, but you would need to work around the application DNS issue yourself, either by creating the dummy records in route53 or on your platform (e.g. hosts file, assuming whatever you're using supports it). |
@aruandre So, IIUC, you are looking at AppMesh to manage the DNS requests without having to create Route53 records. This is being tracked in this issue. We are currently working on this and expect to see some updates. |
Summary
Getting the following error on a call to backend servicie:
upstream connect error or disconnect/reset before headers. reset reason: connection termination
Error on
app1
log:envoy
/clusters
Steps to Reproduce
Setup:
APP2_ENDPOINT | app2.test
"image": "840364872350.dkr.ecr.us-east-1.amazonaws.com/aws-appmesh-envoy:v1.12.2.1-prod",
Configure 2 apps on appmesh as mentioned above
app1.go
app2.go
Are you currently working around this issue?
No workaround yet
Additional info
Think fargate 1.3.0 still uses docker daemon, could it be that its not configured with the proper proxy settings: https://docs.docker.com/config/daemon/systemd/#httphttps-proxy ?
EDIT: same issue with fargate 1.4.0 as well
The text was updated successfully, but these errors were encountered: