locked
On the Blob download behavior of azure-storage SDK (Node.js) RRS feed

  • Question

  • Hi, 

    I use the following SDK (Node.js).

    • azure-storage(v2.5.0)
    The code is implemented as follows.
            var operation = retry.operation({
                retries: 9,
                factor: 1,
                minTimeout: 1000
            });
    
            var count = 0;
    
            var options = { maximumExecutionTimeInMs: 60000, timeoutIntervalInMs: 120000, clientRequestTimeoutInMs: 60000 };
    
            self.logUtil.info('operation.attempt Start');
            // retry point
            operation.attempt(function () {
    
                self.logUtil.info('createAppendBlobFromLocalFile Start');
    
                // fileUpload
                self.blobSvc.createAppendBlobFromLocalFile(containerName, blobFilePath, localFilePath, options, function (error, result, response) {
    
                    self.logUtil.info('createAppendBlobFromLocalFile End. retry Count:' + count);
    However, call back may not be executed in this code.

    What causes the callback not to be executed?

    • Edited by S.K-nn Monday, February 26, 2018 4:29 AM miss
    Monday, February 26, 2018 4:08 AM

All replies

  • Is there any particular error message that you see? Also, have you tried following this doc: How to use Blob storage from Node.js?

    -----------------------------------------------------------------------------------------------------

    Do click on "Mark as Answer" on the post that helps you, this can be beneficial to other community members.

    Monday, February 26, 2018 6:36 AM
  • >Is there any particular error message that you see?

    An error is not thrown by anything.

    >Also, have you tried following this doc: How to use Blob storage from Node.js?

    I follow the document "createAppendBlobFromLocalFile".

    • Edited by S.K-nn Monday, February 26, 2018 6:49 AM
    Monday, February 26, 2018 6:48 AM
  • Hi, S.K-nn

    There are samples for uploading/downloading and retrying in https://github.com/Azure/azure-storage-node/tree/master/examples/samples, would you try to run the sample and use it as the start point?

    For your code, what's the configuration for self.blobSvc(What's the storage account?) And what's the accurate time in UTC you run the code. Would you try to use fiddler to see if the request is actually sent?

    To get more client side log, you can enable verbose log with following code, it can help the investigation as well:

    var AzureStorage =
    require(‘azure-storage’);
    
    var blobService =
    AzureStorage.getBlobService(…);
    
    blobService.logger.level
    = AzureStorage.Logger.LogLevels.DEBUG;


    Best Wishes,

    Jiachen



    • Edited by Jiachen Fan Monday, February 26, 2018 7:51 AM
    Monday, February 26, 2018 7:33 AM
  • Thank you for answering.

    I will refer to the web site presented.

    In addition, I will also output a debug log and look at the situation.

    Monday, February 26, 2018 9:15 AM