-
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
Trace logs returns "Error: unable to hijack connection" #17749
Comments
When the service is running with trace log level it wraps the `http.ResponseWriter` to log extra information. The problem is that the new type does not keep all the functions from the embedded type. Instead we have to implement them ourselves, however only Write() was implemented. Thus `Hijack()`could not be called on the writer. To prevent these issues we would implement all the interfaces that the inner type supports (Header, WriteHeader, Flush, Hijack). Fixes containers#17749 Signed-off-by: Paul Holzinger <[email protected]>
Thanks for the report, PR #17781 to fix it |
Thanks, it works! Just to confirm a minor detail I noticed, the trace logs are in this format: time="2023-03-14T14:33:48-04:00" level=trace msg=","dev.tilt.gc":"true"" API=response X-Reference-Id=0xc0008be820 while other logs have a different identifier in front: DEBU[0433] IdleTracker:active 7m+0h/43t connection(s) X-Reference-Id=0xc0003f2da8 I do see TRAC[0000] logs on startup though like so: TRAC[0000] Methods: POST Path: /volumes/prune If that is fine, then all is good :) |
I think this is because we use a separate logger instance for it, feel free to file a new issue if you want to get this fixed. |
When the service is running with trace log level it wraps the `http.ResponseWriter` to log extra information. The problem is that the new type does not keep all the functions from the embedded type. Instead we have to implement them ourselves, however only Write() was implemented. Thus `Hijack()`could not be called on the writer. To prevent these issues we would implement all the interfaces that the inner type supports (Header, WriteHeader, Flush, Hijack). Fixes containers#17749 Signed-off-by: Paul Holzinger <[email protected]>
Issue Description
Adding --log-level=trace gives an error on podman 4.4.2 while --log-level=debug works fine.
This seems to be a continuing of issue #17332
Steps to reproduce the issue
Steps to reproduce the issue
Describe the results you received
Error: unable to hijack connection
Describe the results you expected
Same as below but with added trace info:
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
No response
Additional information
Here is my entire log
The text was updated successfully, but these errors were encountered: