You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by "Clement Collin (JIRA)" <ji...@apache.org> on 2018/10/18 14:36:00 UTC

[jira] [Updated] (JCLOUDS-1461) During multiple chunk upload on Google Cloud Storage, errors are logged whereas upload is successful

     [ https://issues.apache.org/jira/browse/JCLOUDS-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Clement Collin updated JCLOUDS-1461:
------------------------------------
    Description: 
*Step to reproduce*:

Use _org.jclouds.googlecloudstorage.domain.ResumableUpload_ API to upload a file into multiple chunks onto Google Compute Engine. 
 e.g.:

{code:java}
ResumableUpload resumableUpload = googleCloudStorageApi.getResumableUploadApi().chunkUpload(bucket, uploadId, MediaType.OCTET_STREAM.toString(), range, "bytes " + rangeFrom + "-" + rangeTo + "/" + diskFile.length(), new ByteSourcePayload(ByteSource.wrap(buf)));
{code}

Each request returns a _308/HTTP_PERMANENT_REDIRECT_ which is expected behavior.

Cf. [https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload:]
{quote}If the request succeeds, the server responds with 308 Resume Incomplete, along with a Range header that identifies the total number of bytes that have been stored so far.
{quote}
At the end, the last chunk answer is a _200_ which confirm the upload went well.

*Issue*:

For every chunk upload 308 answer it receives, JClouds logs an error which seems inappropriate:
{code}
ERROR (SLF4JLogger.java:RedirectionRetryHandler:88) - Cannot retry after redirect, no host header: [method=org.jclouds.googlecloudstorage.features.ResumableUploadApi.public abstract org.jclouds.googlecloudstorage.domain.ResumableUpload org.jclouds.googlecloudstorage.features.ResumableUploadApi.chunkUpload(java.lang.String,java.lang.String,java.lang.String,java.lang.Long,java.lang.String,org.jclouds.io.Payload)[myuser, AEnB2UqFW60Vyk9CRr2yB3gHG2h3dszv1tkif51NLcrhsADPqZF3sW6gs7fIf9HwNx8SIARKqglbxaVAph6TxdEVo7aO3LNQJJS-Iw3-qr_uDd-f8qxh90o, application/octet-stream, 4194304, bytes 343932928-348127231/351108355, [content=true, contentMetadata=[cacheControl=null, contentDisposition=null, contentEncoding=null, contentLanguage=null, contentLength=4194304, contentMD5=null, contentType=application/octet-stream, expires=null], written=false, isSensitive=false]], request=PUT https://www.googleapis.com/upload/storage/v1/b/myuser/o?uploadType=resumable&upload_id=AEnB2UqFW60Vyk9CRr2yB3gHG2h3dszv1tkif51NLcrhsADPqZF3sW6gs7fIf9HwNx8SIARKqglbxaVAph6TxdEVo7aO3LNQJJS-Iw3-qr_uDd-f8qxh90o HTTP/1.1]{code}
*Workaround*:
 Can configure log levels to hide this error.

*More info:*
 * Log of two last HTTP requests

 
{code}
2018-10-16 10:45:51,164 gce-publish-connector DEBUG (SLF4JLogger.java:InvokeHttpMethod:56) - >> invoking Object:Upload
 2018-10-16 10:45:51,164 gce-publish-connector DEBUG (SLF4JLogger.java:JavaUrlHttpCommandExecutorService:56) - Sending request -1294939191: PUT https://www.googleapis.com/upload/storage/v1/b/myuser/o?uploadType=resumable&upload_id=AEnB2UqFW60Vyk9CRr2yB3gHG2h3dszv1tkif51NLcrhsADPqZF3sW6gs7fIf9HwNx8SIARKqglbxaVAph6TxdEVo7aO3LNQJJS-Iw3-qr_uDd-f8qxh90o HTTP/1.1
 2018-10-16 10:45:52,234 gce-publish-connector DEBUG (SLF4JLogger.java:JavaUrlHttpCommandExecutorService:56) - Receiving response -1294939191: HTTP/1.1 308 Resume Incomplete
 2018-10-16 10:45:52,240 gce-publish-connector ERROR (SLF4JLogger.java:RedirectionRetryHandler:88) - Cannot retry after redirect, no host header: [method=org.jclouds.googlecloudstorage.features.ResumableUploadApi.public abstract org.jclouds.googlecloudstorage.domain.ResumableUpload org.jclouds.googlecloudstorage.features.ResumableUploadApi.chunkUpload(java.lang.String,java.lang.String,java.lang.String,java.lang.Long,java.lang.String,org.jclouds.io.Payload)[myuser, AEnB2UqFW60Vyk9CRr2yB3gHG2h3dszv1tkif51NLcrhsADPqZF3sW6gs7fIf9HwNx8SIARKqglbxaVAph6TxdEVo7aO3LNQJJS-Iw3-qr_uDd-f8qxh90o, application/octet-stream, 4194304, bytes 343932928-348127231/351108355, [content=true, contentMetadata=[cacheControl=null, contentDisposition=null, contentEncoding=null, contentLanguage=null, contentLength=4194304, contentMD5=null, contentType=application/octet-stream, expires=null], written=false, isSensitive=false]], request=PUT https://www.googleapis.com/upload/storage/v1/b/myuser/o?uploadType=resumable&upload_id=AEnB2UqFW60Vyk9CRr2yB3gHG2h3dszv1tkif51NLcrhsADPqZF3sW6gs7fIf9HwNx8SIARKqglbxaVAph6TxdEVo7aO3LNQJJS-Iw3-qr_uDd-f8qxh90o HTTP/1.1]
2018-10-16 10:45:52,259 gce-publish-connector DEBUG (SLF4JLogger.java:InvokeHttpMethod:56) - >> invoking Object:Upload
 2018-10-16 10:45:52,259 gce-publish-connector DEBUG (SLF4JLogger.java:JavaUrlHttpCommandExecutorService:56) - Sending request -822896246: PUT https://www.googleapis.com/upload/storage/v1/b/myuser/o?uploadType=resumable&upload_id=AEnB2UqFW60Vyk9CRr2yB3gHG2h3dszv1tkif51NLcrhsADPqZF3sW6gs7fIf9HwNx8SIARKqglbxaVAph6TxdEVo7aO3LNQJJS-Iw3-qr_uDd-f8qxh90o HTTP/1.1
 2018-10-16 10:45:53,303 gce-publish-connector DEBUG (SLF4JLogger.java:JavaUrlHttpCommandExecutorService:56) - Receiving response -822896246: HTTP/1.1 200 OK
{code}

  was:
*Step to reproduce*:

Use _org.jclouds.googlecloudstorage.domain.ResumableUpload_ API to upload a file into multiple chunks onto Google Compute Engine. 
 e.g.:
{noformat}
ResumableUpload resumableUpload = googleCloudStorageApi.getResumableUploadApi().chunkUpload(bucket, uploadId, MediaType.OCTET_STREAM.toString(), range, "bytes " + rangeFrom + "-" + rangeTo + "/" + diskFile.length(), new ByteSourcePayload(ByteSource.wrap(buf)));{noformat}
Each request returns a _308/HTTP_PERMANENT_REDIRECT_ which is expected behavior.

Cf. [https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload:]
{quote}If the request succeeds, the server responds with 308 Resume Incomplete, along with a Range header that identifies the total number of bytes that have been stored so far.
{quote}
At the end, the last chunk answer is a _200_ which confirm the upload went well.

*Issue*:

For every chunk upload 308 answer it receives, JClouds logs an error which seems inappropriate:
{noformat}
ERROR (SLF4JLogger.java:RedirectionRetryHandler:88) - Cannot retry after redirect, no host header: [method=org.jclouds.googlecloudstorage.features.ResumableUploadApi.public abstract org.jclouds.googlecloudstorage.domain.ResumableUpload org.jclouds.googlecloudstorage.features.ResumableUploadApi.chunkUpload(java.lang.String,java.lang.String,java.lang.String,java.lang.Long,java.lang.String,org.jclouds.io.Payload)[myuser, AEnB2UqFW60Vyk9CRr2yB3gHG2h3dszv1tkif51NLcrhsADPqZF3sW6gs7fIf9HwNx8SIARKqglbxaVAph6TxdEVo7aO3LNQJJS-Iw3-qr_uDd-f8qxh90o, application/octet-stream, 4194304, bytes 343932928-348127231/351108355, [content=true, contentMetadata=[cacheControl=null, contentDisposition=null, contentEncoding=null, contentLanguage=null, contentLength=4194304, contentMD5=null, contentType=application/octet-stream, expires=null], written=false, isSensitive=false]], request=PUT https://www.googleapis.com/upload/storage/v1/b/myuser/o?uploadType=resumable&upload_id=AEnB2UqFW60Vyk9CRr2yB3gHG2h3dszv1tkif51NLcrhsADPqZF3sW6gs7fIf9HwNx8SIARKqglbxaVAph6TxdEVo7aO3LNQJJS-Iw3-qr_uDd-f8qxh90o HTTP/1.1]{noformat}
*Workaround*:
 Can configure log levels to hide this error.

*More info:*
 * Log of two last HTTP requests

 
{noformat}
2018-10-16 10:45:51,164 gce-publish-connector DEBUG (SLF4JLogger.java:InvokeHttpMethod:56) - >> invoking Object:Upload
 2018-10-16 10:45:51,164 gce-publish-connector DEBUG (SLF4JLogger.java:JavaUrlHttpCommandExecutorService:56) - Sending request -1294939191: PUT https://www.googleapis.com/upload/storage/v1/b/myuser/o?uploadType=resumable&upload_id=AEnB2UqFW60Vyk9CRr2yB3gHG2h3dszv1tkif51NLcrhsADPqZF3sW6gs7fIf9HwNx8SIARKqglbxaVAph6TxdEVo7aO3LNQJJS-Iw3-qr_uDd-f8qxh90o HTTP/1.1
 2018-10-16 10:45:52,234 gce-publish-connector DEBUG (SLF4JLogger.java:JavaUrlHttpCommandExecutorService:56) - Receiving response -1294939191: HTTP/1.1 308 Resume Incomplete
 2018-10-16 10:45:52,240 gce-publish-connector ERROR (SLF4JLogger.java:RedirectionRetryHandler:88) - Cannot retry after redirect, no host header: [method=org.jclouds.googlecloudstorage.features.ResumableUploadApi.public abstract org.jclouds.googlecloudstorage.domain.ResumableUpload org.jclouds.googlecloudstorage.features.ResumableUploadApi.chunkUpload(java.lang.String,java.lang.String,java.lang.String,java.lang.Long,java.lang.String,org.jclouds.io.Payload)[myuser, AEnB2UqFW60Vyk9CRr2yB3gHG2h3dszv1tkif51NLcrhsADPqZF3sW6gs7fIf9HwNx8SIARKqglbxaVAph6TxdEVo7aO3LNQJJS-Iw3-qr_uDd-f8qxh90o, application/octet-stream, 4194304, bytes 343932928-348127231/351108355, [content=true, contentMetadata=[cacheControl=null, contentDisposition=null, contentEncoding=null, contentLanguage=null, contentLength=4194304, contentMD5=null, contentType=application/octet-stream, expires=null], written=false, isSensitive=false]], request=PUT https://www.googleapis.com/upload/storage/v1/b/myuser/o?uploadType=resumable&upload_id=AEnB2UqFW60Vyk9CRr2yB3gHG2h3dszv1tkif51NLcrhsADPqZF3sW6gs7fIf9HwNx8SIARKqglbxaVAph6TxdEVo7aO3LNQJJS-Iw3-qr_uDd-f8qxh90o HTTP/1.1]
2018-10-16 10:45:52,259 gce-publish-connector DEBUG (SLF4JLogger.java:InvokeHttpMethod:56) - >> invoking Object:Upload
 2018-10-16 10:45:52,259 gce-publish-connector DEBUG (SLF4JLogger.java:JavaUrlHttpCommandExecutorService:56) - Sending request -822896246: PUT https://www.googleapis.com/upload/storage/v1/b/myuser/o?uploadType=resumable&upload_id=AEnB2UqFW60Vyk9CRr2yB3gHG2h3dszv1tkif51NLcrhsADPqZF3sW6gs7fIf9HwNx8SIARKqglbxaVAph6TxdEVo7aO3LNQJJS-Iw3-qr_uDd-f8qxh90o HTTP/1.1
 2018-10-16 10:45:53,303 gce-publish-connector DEBUG (SLF4JLogger.java:JavaUrlHttpCommandExecutorService:56) - Receiving response -822896246: HTTP/1.1 200 OK
{noformat}


> During multiple chunk upload on Google Cloud Storage, errors are logged whereas upload is successful
> ----------------------------------------------------------------------------------------------------
>
>                 Key: JCLOUDS-1461
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1461
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-blobstore, jclouds-labs-google
>    Affects Versions: 2.1.1
>         Environment: CentOS Linux release 7.4.1708 (Core)
> Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
>            Reporter: Clement Collin
>            Priority: Minor
>              Labels: google-cloud-storage
>
> *Step to reproduce*:
> Use _org.jclouds.googlecloudstorage.domain.ResumableUpload_ API to upload a file into multiple chunks onto Google Compute Engine. 
>  e.g.:
> {code:java}
> ResumableUpload resumableUpload = googleCloudStorageApi.getResumableUploadApi().chunkUpload(bucket, uploadId, MediaType.OCTET_STREAM.toString(), range, "bytes " + rangeFrom + "-" + rangeTo + "/" + diskFile.length(), new ByteSourcePayload(ByteSource.wrap(buf)));
> {code}
> Each request returns a _308/HTTP_PERMANENT_REDIRECT_ which is expected behavior.
> Cf. [https://cloud.google.com/storage/docs/json_api/v1/how-tos/resumable-upload:]
> {quote}If the request succeeds, the server responds with 308 Resume Incomplete, along with a Range header that identifies the total number of bytes that have been stored so far.
> {quote}
> At the end, the last chunk answer is a _200_ which confirm the upload went well.
> *Issue*:
> For every chunk upload 308 answer it receives, JClouds logs an error which seems inappropriate:
> {code}
> ERROR (SLF4JLogger.java:RedirectionRetryHandler:88) - Cannot retry after redirect, no host header: [method=org.jclouds.googlecloudstorage.features.ResumableUploadApi.public abstract org.jclouds.googlecloudstorage.domain.ResumableUpload org.jclouds.googlecloudstorage.features.ResumableUploadApi.chunkUpload(java.lang.String,java.lang.String,java.lang.String,java.lang.Long,java.lang.String,org.jclouds.io.Payload)[myuser, AEnB2UqFW60Vyk9CRr2yB3gHG2h3dszv1tkif51NLcrhsADPqZF3sW6gs7fIf9HwNx8SIARKqglbxaVAph6TxdEVo7aO3LNQJJS-Iw3-qr_uDd-f8qxh90o, application/octet-stream, 4194304, bytes 343932928-348127231/351108355, [content=true, contentMetadata=[cacheControl=null, contentDisposition=null, contentEncoding=null, contentLanguage=null, contentLength=4194304, contentMD5=null, contentType=application/octet-stream, expires=null], written=false, isSensitive=false]], request=PUT https://www.googleapis.com/upload/storage/v1/b/myuser/o?uploadType=resumable&upload_id=AEnB2UqFW60Vyk9CRr2yB3gHG2h3dszv1tkif51NLcrhsADPqZF3sW6gs7fIf9HwNx8SIARKqglbxaVAph6TxdEVo7aO3LNQJJS-Iw3-qr_uDd-f8qxh90o HTTP/1.1]{code}
> *Workaround*:
>  Can configure log levels to hide this error.
> *More info:*
>  * Log of two last HTTP requests
>  
> {code}
> 2018-10-16 10:45:51,164 gce-publish-connector DEBUG (SLF4JLogger.java:InvokeHttpMethod:56) - >> invoking Object:Upload
>  2018-10-16 10:45:51,164 gce-publish-connector DEBUG (SLF4JLogger.java:JavaUrlHttpCommandExecutorService:56) - Sending request -1294939191: PUT https://www.googleapis.com/upload/storage/v1/b/myuser/o?uploadType=resumable&upload_id=AEnB2UqFW60Vyk9CRr2yB3gHG2h3dszv1tkif51NLcrhsADPqZF3sW6gs7fIf9HwNx8SIARKqglbxaVAph6TxdEVo7aO3LNQJJS-Iw3-qr_uDd-f8qxh90o HTTP/1.1
>  2018-10-16 10:45:52,234 gce-publish-connector DEBUG (SLF4JLogger.java:JavaUrlHttpCommandExecutorService:56) - Receiving response -1294939191: HTTP/1.1 308 Resume Incomplete
>  2018-10-16 10:45:52,240 gce-publish-connector ERROR (SLF4JLogger.java:RedirectionRetryHandler:88) - Cannot retry after redirect, no host header: [method=org.jclouds.googlecloudstorage.features.ResumableUploadApi.public abstract org.jclouds.googlecloudstorage.domain.ResumableUpload org.jclouds.googlecloudstorage.features.ResumableUploadApi.chunkUpload(java.lang.String,java.lang.String,java.lang.String,java.lang.Long,java.lang.String,org.jclouds.io.Payload)[myuser, AEnB2UqFW60Vyk9CRr2yB3gHG2h3dszv1tkif51NLcrhsADPqZF3sW6gs7fIf9HwNx8SIARKqglbxaVAph6TxdEVo7aO3LNQJJS-Iw3-qr_uDd-f8qxh90o, application/octet-stream, 4194304, bytes 343932928-348127231/351108355, [content=true, contentMetadata=[cacheControl=null, contentDisposition=null, contentEncoding=null, contentLanguage=null, contentLength=4194304, contentMD5=null, contentType=application/octet-stream, expires=null], written=false, isSensitive=false]], request=PUT https://www.googleapis.com/upload/storage/v1/b/myuser/o?uploadType=resumable&upload_id=AEnB2UqFW60Vyk9CRr2yB3gHG2h3dszv1tkif51NLcrhsADPqZF3sW6gs7fIf9HwNx8SIARKqglbxaVAph6TxdEVo7aO3LNQJJS-Iw3-qr_uDd-f8qxh90o HTTP/1.1]
> 2018-10-16 10:45:52,259 gce-publish-connector DEBUG (SLF4JLogger.java:InvokeHttpMethod:56) - >> invoking Object:Upload
>  2018-10-16 10:45:52,259 gce-publish-connector DEBUG (SLF4JLogger.java:JavaUrlHttpCommandExecutorService:56) - Sending request -822896246: PUT https://www.googleapis.com/upload/storage/v1/b/myuser/o?uploadType=resumable&upload_id=AEnB2UqFW60Vyk9CRr2yB3gHG2h3dszv1tkif51NLcrhsADPqZF3sW6gs7fIf9HwNx8SIARKqglbxaVAph6TxdEVo7aO3LNQJJS-Iw3-qr_uDd-f8qxh90o HTTP/1.1
>  2018-10-16 10:45:53,303 gce-publish-connector DEBUG (SLF4JLogger.java:JavaUrlHttpCommandExecutorService:56) - Receiving response -822896246: HTTP/1.1 200 OK
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)