Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-54943

"Failed to create Page Blob with script's length: 0"

      After upgrading the plugin to version 7.5.0, we managed to successfully setup VM's with existing storage account in Azure.

      But, we've noticed the following error/log in "Provisioning Failure Reason":

      "Failed to create Page Blob with script's length: 0".

       

      (verification of the slave template pass with success).

          [JENKINS-54943] "Failed to create Page Blob with script's length: 0"

          Azure DevOps added a comment -

          thanks for reporting the issue. we're looking at it.

          Azure DevOps added a comment - thanks for reporting the issue. we're looking at it.

          Jie Shen added a comment -

          Hi roni, it seems that it fails to create a blob on Azure storage to store the init script. Any other detailed exception in your Jenkins log?  The error occurs all the time? Your job worked fine before upgrading the plugin?

          Jie Shen added a comment - Hi  roni , it seems that it fails to create a blob on Azure storage to store the init script. Any other detailed exception in your Jenkins log?  The error occurs all the time? Your job worked fine before upgrading the plugin?

          Roni Yessod added a comment -

          Hi, unfortunately I can't seem to reproduce the problem again.

          I'll close this issue, sorry for the inconvenience. 

          Roni Yessod added a comment - Hi, unfortunately I can't seem to reproduce the problem again. I'll close this issue, sorry for the inconvenience. 

          Roni Yessod added a comment -

          Hi jieshe, this issue happened again for us last night, we encountered this error 49 times, this is the exception trace:

          {"log_thrown":"com.microsoft.azure.vmagent.exceptions.AzureCloudException: Failed to create Page Blob with script's length: 0\n\tat com.microsoft.azure.vmagent.exceptions.AzureCloudException.create(AzureCloudException.java:54)\n\tat com.microsoft.azure.vmagent.AzureVMManagementServiceDelegate.uploadCustomScript(AzureVMManagementServiceDelegate.java:671)\n\tat com.microsoft.azure.vmagent.AzureVMManagementServiceDelegate.createDeployment(AzureVMManagementServiceDelegate.java:370)\n\tat com.microsoft.azure.vmagent.AzureVMManagementServiceDelegate.createDeployment(AzureVMManagementServiceDelegate.java:170)\n\tat com.microsoft.azure.vmagent.AzureVMAgentTemplate.provisionAgents(AzureVMAgentTemplate.java:838)\n\tat com.microsoft.azure.vmagent.AzureVMCloud$3.call(AzureVMCloud.java:797)\n\tat com.microsoft.azure.vmagent.AzureVMCloud$3.call(AzureVMCloud.java:793)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\n\tat java.lang.Thread.run(Thread.java:745)\nCaused by: com.microsoft.azure.storage.StorageException: The server is busy.\n\tat com.microsoft.azure.storage.StorageException.translateFromHttpStatus(StorageException.java:175)\n\tat com.microsoft.azure.storage.StorageException.translateException(StorageException.java:94)\n\tat com.microsoft.azure.storage.core.StorageRequest.materializeException(StorageRequest.java:305)\n\tat com.microsoft.azure.storage.core.ExecutionEngine.executeWithRetry(ExecutionEngine.java:175)\n\tat com.microsoft.azure.storage.blob.CloudBlobContainer.exists(CloudBlobContainer.java:717)\n\tat com.microsoft.azure.storage.blob.CloudBlobContainer.createIfNotExists(CloudBlobContainer.java:328)\n\tat com.microsoft.azure.storage.blob.CloudBlobContainer.createIfNotExists(CloudBlobContainer.java:304)\n\tat com.microsoft.azure.vmagent.AzureVMManagementServiceDelegate.uploadCustomScript(AzureVMManagementServiceDelegate.java:662)\n\t... 9 more\n","thread_id":759090,"level":"SEVERE","log_source":"com.microsoft.azure.vmagent.AzureVMManagementServiceDelegate createDeployment","message":"AzureVMManagementServiceDelegate: deployment: Unable to deploy"}

          Roni Yessod added a comment - Hi jieshe , this issue happened again for us last night, we encountered this error 49 times, this is the exception trace: {"log_thrown":"com.microsoft.azure.vmagent.exceptions.AzureCloudException: Failed to create Page Blob with script's length: 0\n\tat com.microsoft.azure.vmagent.exceptions.AzureCloudException.create(AzureCloudException.java:54)\n\tat com.microsoft.azure.vmagent.AzureVMManagementServiceDelegate.uploadCustomScript(AzureVMManagementServiceDelegate.java:671)\n\tat com.microsoft.azure.vmagent.AzureVMManagementServiceDelegate.createDeployment(AzureVMManagementServiceDelegate.java:370)\n\tat com.microsoft.azure.vmagent.AzureVMManagementServiceDelegate.createDeployment(AzureVMManagementServiceDelegate.java:170)\n\tat com.microsoft.azure.vmagent.AzureVMAgentTemplate.provisionAgents(AzureVMAgentTemplate.java:838)\n\tat com.microsoft.azure.vmagent.AzureVMCloud$3.call(AzureVMCloud.java:797)\n\tat com.microsoft.azure.vmagent.AzureVMCloud$3.call(AzureVMCloud.java:793)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)\n\tat java.lang.Thread.run(Thread.java:745)\nCaused by: com.microsoft.azure.storage.StorageException: The server is busy.\n\tat com.microsoft.azure.storage.StorageException.translateFromHttpStatus(StorageException.java:175)\n\tat com.microsoft.azure.storage.StorageException.translateException(StorageException.java:94)\n\tat com.microsoft.azure.storage.core.StorageRequest.materializeException(StorageRequest.java:305)\n\tat com.microsoft.azure.storage.core.ExecutionEngine.executeWithRetry(ExecutionEngine.java:175)\n\tat com.microsoft.azure.storage.blob.CloudBlobContainer.exists(CloudBlobContainer.java:717)\n\tat com.microsoft.azure.storage.blob.CloudBlobContainer.createIfNotExists(CloudBlobContainer.java:328)\n\tat com.microsoft.azure.storage.blob.CloudBlobContainer.createIfNotExists(CloudBlobContainer.java:304)\n\tat com.microsoft.azure.vmagent.AzureVMManagementServiceDelegate.uploadCustomScript(AzureVMManagementServiceDelegate.java:662)\n\t... 9 more\n","thread_id":759090,"level":"SEVERE","log_source":"com.microsoft.azure.vmagent.AzureVMManagementServiceDelegate createDeployment","message":"AzureVMManagementServiceDelegate: deployment: Unable to deploy"}

          Jie Shen added a comment -

          Hi roni, I quickly went through the related code. It seems that this logic will be triggered when you use custom script extension instead of ssh to set up the environment. Could you please provide more details for your configuration so that I can reproduce your issue on my side, Thanks. 

          Jie Shen added a comment - Hi roni , I quickly went through the related code. It seems that this logic will be triggered when you use custom script extension instead of ssh to set up the environment. Could you please provide more details for your configuration so that I can reproduce your issue on my side, Thanks. 

          The issue is reproducible for me as well. 

          My setup:

          • JNLP connection method

          Error:

          Unexpected exception encountered while provisioning agent azuresimtest
          java.lang.IllegalArgumentException: Page blob length must be multiple of 512.
          {{ at com.microsoft.azure.storage.blob.CloudPageBlob.upload(CloudPageBlob.java:1088)}}
          {{ at com.microsoft.azure.vmagent.AzureVMManagementServiceDelegate.uploadCustomScript(AzureVMManagementServiceDelegate.java:689)}}
          Caused: com.microsoft.azure.vmagent.exceptions.AzureCloudException: Failed to create Page Blob with script's length: 3584

           

          **Tried to google and seems its an issue with transferring file to Azure which size isn't multiple to 512. Guys reported the same issue using Primary storage account only, however I got the same with Standard...

          I got luck with me previous init script, which is approximately twice less size (~4kb opposite to ~1.5kb)

          Any ideas guys ?

          Andrii Parkhomenko added a comment - The issue is reproducible for me as well.  My setup: JNLP connection method init script (actually based on  https://raw.githubusercontent.com/Azure/jenkins/master/agents_scripts/Jenkins-Windows-Init-Script-Jnlp.ps1  and a bit modified ) Error: Unexpected exception encountered while provisioning agent azuresimtest java.lang.IllegalArgumentException: Page blob length must be multiple of 512 . {{ at com.microsoft.azure.storage.blob.CloudPageBlob.upload(CloudPageBlob.java:1088)}} {{ at com.microsoft.azure.vmagent.AzureVMManagementServiceDelegate.uploadCustomScript(AzureVMManagementServiceDelegate.java:689)}} Caused: com.microsoft.azure.vmagent.exceptions.AzureCloudException: Failed to create Page Blob with script's length: 3584   **Tried to google and seems its an issue with transferring file to Azure which size isn't multiple to 512. Guys reported the same issue using Primary storage account only, however I got the same with Standard... I got luck with me previous init script, which is approximately twice less size (~4kb opposite to ~1.5kb) Any ideas guys ?

          Tim Jacomb added a comment -

          All issues have been transferred to GitHub.

          See https://github.com/jenkinsci/azure-vm-agents-plugin/issues

          Search the issue title to find it.

          (This is a bulk comment and can't link to the specific issue)

          Tim Jacomb added a comment - All issues have been transferred to GitHub. See https://github.com/jenkinsci/azure-vm-agents-plugin/issues Search the issue title to find it. (This is a bulk comment and can't link to the specific issue)

            jieshe Jie Shen
            roni Roni Yessod
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: