Azure / azure-storage-php

Microsoft Azure Storage Library for PHP
MIT License
217 stars 198 forks source link

Error: [GuzzleHttp\Exception\RequestException] Error creating resource: [message] fopen(http://xxx.blob.core.windows.net/xxx/xxx): failed to open stream: HTTP request failed! #281

Open danielignatius opened 3 years ago

danielignatius commented 3 years ago

We had never received this error message before. It was only appearing sometime early this year. Nothing has changed but it stopped working and producing this error.

Which service(blob, file, queue, table) does this issue concern?

Blob

Which version of the SDK was used?

1.5

What's the PHP/OS version?

PHP 7.2 / OS version: Microsoft Windows NT 10.0.14393.0 (Hosted via Azure Webapp)

What problem was encountered?

2021-02-13 23:46:01 Error: [GuzzleHttp\Exception\RequestException] Error creating resource: [message] fopen(http://xxx.blob.core.windows.net/xxx/xxx): failed to open stream: HTTP request failed! [file] D:\home\site\wwwroot\vendor\guzzlehttp\guzzle\src\Handler\StreamHandler.php [line] 329

Steps to reproduce the issue?

    $connectionString = $this->details['AZURECONNECTIONSTRING'];
    $blobRestProxy = BlobRestProxy::createBlobService($connectionString);

        try{
            $imageblob = $blobRestProxy->getBlob("img", $profileImgUrl);
            if($imageblob){
                $profileImg = $this->details['READPROFILEIMAGE'].'/'.$profileImgUrl;
            }
        }
        catch(ServiceException $e){
            $profileImg = $this->details['READPROFILEIMAGE'].'/profile/default.jpg';
        }
    }
    return $profileImg;

Have you found a mitigation/solution?

No

Is there a failing request ID related to this problem returned by server? What is it?

No