Skip to content
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

Include actual URI in "Connection closed error=invalid URI" error output #9713

Closed
deusxanima opened this issue Oct 26, 2022 · 9 comments
Closed
Assignees

Comments

@deusxanima
Copy link
Contributor

What problem are you trying to solve?

Users who configure invalid URIs will be met with 400 errors and Linkerd logs stating Connection closed error=invalid URI. Currently the Linkerd logs do not bubble up the actual URI in question which makes it difficult to troubleshoot in large environments.

How should the problem be solved?

Pass the actual URI to the error message at Debug level for Connection closed error=invalid URI errors.

Any alternatives you've considered?

n/a

How would users interact with this feature?

Linkerd proxy logs.

Would you like to work on this feature?

No response

@tkuik
Copy link

tkuik commented Oct 26, 2022

Thank you for opening the enhancement.

@tkuik
Copy link

tkuik commented Oct 26, 2022

One other thing that would be nice as part of this issue is to update the documentation to the URI validations performed.

@dwilliams782
Copy link

I've just found this scattered in our logs too, both suggestions (log and docs) would be useful for us.

@olix0r olix0r added area/proxy priority/P2 Nice-to-have for Release labels Nov 3, 2022
@olix0r olix0r added this to the stable-2.13.0 milestone Nov 3, 2022
@hawkw
Copy link
Member

hawkw commented Nov 3, 2022

The simplest way to include the invalid value in the proxy logs will involve changes to the HTTP libraries the proxy uses. I've opened hyperium/hyper#3043 and hyperium/http#571 to track the relevant upstream changes, which I'm working on currently.

@hawkw hawkw self-assigned this Nov 3, 2022
@stale
Copy link

stale bot commented Feb 2, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Feb 2, 2023
@dwilliams782
Copy link

Commenting to keep open..

@hawkw
Copy link
Member

hawkw commented Apr 20, 2023

Just to add some context to this, this is currently blocked on potential upstream changes in the library that Linkerd uses for parsing HTTP requests. We can't actually add a URI to the log message using information that's known to the proxy, because this error is being returned by the HTTP parser when it attempts to parse a request from the wire --- the proxy doesn't know what the URI is yet.

Displaying the invalid URI string requires modifying the HTTP parser to return the invalid value that failed to be parsed as part of that error. We've started a discussion around making this change, but would need to get upstream maintainers to agree on it: hyperium/http#571

@stale
Copy link

stale bot commented Jul 19, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

Copy link

stale bot commented Dec 6, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Dec 6, 2023
@stale stale bot closed this as completed Dec 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants