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

HTTP wire logging not showing up in V2 SDK. #4799

Closed
mukund-thakur opened this issue Dec 21, 2023 · 2 comments · Fixed by #4827
Closed

HTTP wire logging not showing up in V2 SDK. #4799

mukund-thakur opened this issue Dec 21, 2023 · 2 comments · Fixed by #4827
Labels
bug This issue is a bug. p2 This is a standard priority issue

Comments

@mukund-thakur
Copy link

Describe the bug

With V1 SDK we used to get the below HTTP wire logs by enabling log4j.logger.org.apache.http.wire=DEBUG . We don't get the same logs now with V2 SDK. I even tried setting log4j.logger.software.amazon.awssdk.thirdparty.org.apache.http=DEBUG

2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.headers: http-outgoing-0 >> GET /?acl HTTP/1.1
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.headers: http-outgoing-0 >> Host: scif-bigdata-pilot-046565809256-us-west-1.bucket.vpce-023e7589b8dacbffa-bj5f9mbg-us-west-1b.s3.us-west-1.vpce.amazonaws.com
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.headers: http-outgoing-0 >> amz-sdk-invocation-id: ee5fe484-9324-058f-8b41-6bde73b89fef
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.headers: http-outgoing-0 >> amz-sdk-request: attempt=1;max=21
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.headers: http-outgoing-0 >> amz-sdk-retry: 0/0/500
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.headers: http-outgoing-0 >> Authorization: AWS4-HMAC-SHA256 Credential=/20230926/vpce/s3/aws4_request, SignedHeaders=amz-sdk-invocation-id;amz-sdk-request;amz-sdk-retry;content-type;host;user-agent;x-amz-content-sha256;x-amz-date, Signature=ZZZ
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.headers: http-outgoing-0 >> Content-Type: application/octet-stream
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.headers: http-outgoing-0 >> User-Agent: Hadoop 3.1.1.7.1.7.74-6, aws-sdk-java/1.11.901 Linux/3.10.0-1160.99.1.el7.x86_64 Java_HotSpot(TM)_64-Bit_Server_VM/25.341-b10 java/1.8.0_341 groovy/3.0.7 kotlin/1.4.31 vendor/Oracle_Corporation
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.headers: http-outgoing-0 >> x-amz-content-sha256: UNSIGNED-PAYLOAD
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.headers: http-outgoing-0 >> X-Amz-Date: 20230926T204002Z
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.headers: http-outgoing-0 >> Content-Length: 0
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.headers: http-outgoing-0 >> Connection: Keep-Alive
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.wire: http-outgoing-0 >> "GET /?acl HTTP/1.1[\r][\n]"
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.wire: http-outgoing-0 >> "Host: scif-bigdata-pilot-046565809256-us-west-1.bucket.vpce-023e7589b8dacbffa-bj5f9mbg-us-west-1b.s3.us-west-1.vpce.amazonaws.com[\r][\n]"
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.wire: http-outgoing-0 >> "amz-sdk-invocation-id: ee5fe484-9324-058f-8b41-6bde73b89fef[\r][\n]"
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.wire: http-outgoing-0 >> "amz-sdk-request: attempt=1;max=21[\r][\n]"
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.wire: http-outgoing-0 >> "amz-sdk-retry: 0/0/500[\r][\n]"
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.wire: http-outgoing-0 >> "Authorization: AWS4-HMAC-SHA256 Credential=xx/20230926/vpce/s3/aws4_request, SignedHeaders=amz-sdk-invocation-id;amz-sdk-request;amz-sdk-retry;content-type;host;user-agent;x-amz-content-sha256;x-amz-date, Signature=xx[\r][\n]"
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.wire: http-outgoing-0 >> "Content-Type: application/octet-stream[\r][\n]"
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.wire: http-outgoing-0 >> "User-Agent: Hadoop 3.1.1.7.1.7.74-6, aws-sdk-java/1.11.901 Linux/3.10.0-1160.99.1.el7.x86_64 Java_HotSpot(TM)_64-Bit_Server_VM/25.341-b10 java/1.8.0_341 groovy/3.0.7 kotlin/1.4.31 vendor/Oracle_Corporation[\r][\n]"
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.wire: http-outgoing-0 >> "x-amz-content-sha256: UNSIGNED-PAYLOAD[\r][\n]"
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.wire: http-outgoing-0 >> "X-Amz-Date: 20230926T204002Z[\r][\n]"
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.wire: http-outgoing-0 >> "Content-Length: 0[\r][\n]"
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.wire: http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
2023-09-26 13:40:03,072 DEBUG [main] com.amazonaws.thirdparty.apache.http.wire: http-outgoing-0 >> "[\r][\n]"
2023-09-26 13:40:03,085 DEBUG [main] com.amazonaws.thirdparty.apache.http.wire: http-outgoing-0 << "HTTP/1.1 400 Bad Request[\r][\n]"
2023-09-26 13:40:03,085 DEBUG [main] com.amazonaws.thirdparty.apache.http.wire: http-outgoing-0 << "x-amz-request-id: XRM37AJD38B390W3[\r][\n]"
2023-09-26 13:40:03,085 DEBUG [main] com.amazonaws.thirdparty.apache.http.wire: http-outgoing-0 << "x-amz-id-2: vyHlPifiZ0LNCicjCzPi+nW9zDzBb1wUetWaHFlWRUcCbLJgnAh2rlkqvmxsQ/MMMCDK4oPo+uA=[\r][\n]"
2023-09-26 13:40:03,085 DEBUG [main] com.amazonaws.thirdparty.apache.http.wire: http-outgoing-0 << "Content-Type: application/xml[\r][\n]"
2023-09-26 13:40:03,085 DEBUG [main] com.amazonaws.thirdparty.apache.http.wire: http-outgoing-0 << "Transfer-Encoding: chunked[\r][\n]"
2023-09-26 13:40:03,085 DEBUG [main] com.amazonaws.thirdparty.apache.http.wire: http-outgoing-0 << "Date: Tue, 26 Sep 2023 20:40:03 GMT[\r][\n]"
2023-09-26 13:40:03,085 DEBUG [main] com.amazonaws.thirdparty.apache.http.wire: http-outgoing-0 << "Server: AmazonS3[\r][\n]"
2023-09-26 13:40:03,085 DEBUG [main] com.amazonaws.thirdparty.apache.http.wire: http-outgoing-0 << "Connection: close[\r][\n]"

Expected Behavior

Wire logs must come.

Current Behavior

Wire logs not coming.

Reproduction Steps

We are using hadoop-aws connector and running the hadoop fs -ls command.

Possible Solution

No response

Additional Information/Context

No response

AWS Java SDK version used

2.21.46

JDK version used

java version "1.8.0_161" Java(TM) SE Runtime Environment (build 1.8.0_161-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

Operating System and version

Mac OS

@mukund-thakur mukund-thakur added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 21, 2023
@debora-ito debora-ito added p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Dec 27, 2023
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@dagnir
Copy link
Contributor

dagnir commented Jan 12, 2024

Hi @mukund-thakur, the fix for this is going out with today's release (2.23.2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 This is a standard priority issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants