[ 
https://issues.apache.org/jira/browse/HDDS-2630?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16989402#comment-16989402
 ] 

Bharat Viswanadham edited comment on HDDS-2630 at 12/6/19 5:37 AM:
-------------------------------------------------------------------

Hi [~Sammi]

I see NPE is because auth header is not set. Not completely sure in which case 
auth header will be null from S3 clients (like aws cli ..) Here we are hitting 
NPE because the auth header is not set. If you have repro steps for this, it 
also helps to understand when this will happen.

 

In the working scenario. In the virtual host style filter, we set the auth 
header, and that header will be used during bucket creation. As in S3 volume is 
generated from access key id, which we get from authentication header.

 

I see we can have a Precondition check not NULL before actual parsing auth 
header and fail the request. But want to understand in which type of scenario's 
authentication header will be null

 

Debug logs for testing I have added, to show the flow.

 
{code:java}
s3g_1       | 2019-12-06 05:14:13,135 INFO s3.VirtualHostStyleFilter: Bharat 
auth header set AWS4-HMAC-SHA256 
Credential=aa/20191206/us-east-1/s3/aws4_request, 
SignedHeaders=host;x-amz-content-sha256;x-amz-date, 
Signature=3701b936b5af94bae5f75c6a13085a22a7762dafd8742cecd3004a0b3d227c36
s3g_1       | 2019-12-06 05:14:13,174 INFO header.AuthenticationHeaderParser: 
V4 Header AWS4-HMAC-SHA256 Credential=aa/20191206/us-east-1/s3/aws4_request, 
SignedHeaders=host;x-amz-content-sha256;x-amz-date, 
Signature=3701b936b5af94bae5f75c6a13085a22a7762dafd8742cecd3004a0b3d227c36
s3g_1       | 2019-12-06 05:14:13,174 INFO endpoint.BucketEndpoint: Bharat 
accesskey set aa
{code}
 


was (Author: bharatviswa):
Hi [~Sammi]

I see NPE is because auth header is not set. Not completely sure in which case 
auth header will be null from S3 clients (like aws cli ..) Here we are hitting 
NPE because the auth header is not set.

 

In the working scenario. In the virtual host style filter, we set the auth 
header, and that header will be used during bucket creation. As in S3 volume is 
generated from access key id, which we get from authentication header.

 

I see we can have a Precondition check not NULL before actual parsing auth 
header and fail the request. But want to understand in which type of scenario's 
authentication header will be null

 

Debug logs for testing I have added, to show the flow.

 
{code:java}
s3g_1       | 2019-12-06 05:14:13,135 INFO s3.VirtualHostStyleFilter: Bharat 
auth header set AWS4-HMAC-SHA256 
Credential=aa/20191206/us-east-1/s3/aws4_request, 
SignedHeaders=host;x-amz-content-sha256;x-amz-date, 
Signature=3701b936b5af94bae5f75c6a13085a22a7762dafd8742cecd3004a0b3d227c36
s3g_1       | 2019-12-06 05:14:13,174 INFO header.AuthenticationHeaderParser: 
V4 Header AWS4-HMAC-SHA256 Credential=aa/20191206/us-east-1/s3/aws4_request, 
SignedHeaders=host;x-amz-content-sha256;x-amz-date, 
Signature=3701b936b5af94bae5f75c6a13085a22a7762dafd8742cecd3004a0b3d227c36
s3g_1       | 2019-12-06 05:14:13,174 INFO endpoint.BucketEndpoint: Bharat 
accesskey set aa
{code}
 

> NullPointerException in S3g
> ---------------------------
>
>                 Key: HDDS-2630
>                 URL: https://issues.apache.org/jira/browse/HDDS-2630
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: S3
>            Reporter: Sammi Chen
>            Assignee: Bharat Viswanadham
>            Priority: Critical
>         Attachments: hadoop-ozoneadmin-s3g-host158.log
>
>
> See attached log file



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: ozone-issues-h...@hadoop.apache.org

Reply via email to