I can't connect Jenkins azure storage plugin in the same resources group

VILASECA AMETLLER Aleix 20 Reputation points
2023-05-19T08:09:58.0633333+00:00

hello everyone,

I have Jenkins installed on a VM inside the resource group in Azure and I'm trying to connect the Jenkins Azure Storage plugin but it is not allowing me. Additionally, I'm not able to connect from the pipeline when using a container. I'm attaching images of the configurations and the output log from the container. Thanks a lot.

Add the log content file:

Content-Length: [8388608] User-Agent: [AzCopy/10.18.1 Azure-Storage/0.15 (go1.19.8; linux)] X-Ms-Client-Request-Id: [28d0ce3b-4af8-4db0-4da2-081422e02ff4] X-Ms-Version: [2020-10-02] -------------------------------------------------------------------------------- RESPONSE Status: 400 The value for one of the HTTP headers is not in the correct format. Content-Length: [328] Content-Type: [application/xml] Date: [Tue, 16 May 2023 10:15:17 GMT] Server: [Microsoft-HTTPAPI/2.0] X-Ms-Request-Id: [d201cd80-5a65-08f1-51c0-743f5b5cfa67] Response Details: <code>InvalidHeaderValue</code> 2023/05/16 10:15:18 ==> REQUEST/RESPONSE (Try=1/224.6665ms, OpTime=224.8249ms) -- RESPONSE STATUS CODE ERROR PUT https://xxxxxxx.blob.green.cloud.xxxxxxx.net/xxxxxxx-toolkit/xxxxxxxx-1.1.7-SNAPSHOT.war/hr-business-services-rest-1.1.7-SNAPSHOT-QA.war?api-version=2022-04-11&blockid=MDAwMDDWJ2IO6LdHvG%2F8QWAlO4j%2FMDAwMDAwMDAwMTAwMDAw&comp=block&se=2023-05-16T17%3A06%3A49Z&sig=-REDACTED-&sp=racwdl&sr=c&st=2023-05-16T09%3A06%3A49Z&sv=2022-04-11&timeout=901&x-ms-version=2020-10-02 Content-Length: [8388608] User-Agent: [AzCopy/10.18.1 Azure-Storage/0.15 (go1.19.8; linux)] X-Ms-Client-Request-Id: [af9795ef-68a3-4034-7b51-dcf253201be0] X-Ms-Version: [2020-10-02] -------------------------------------------------------------------------------- RESPONSE Status: 400 The value for one of the HTTP headers is not in the correct format. Content-Length: [328] Content-Type: [application/xml] Date: [Tue, 16 May 2023 10:15:18 GMT] Server: [Microsoft-HTTPAPI/2.0] X-Ms-Request-Id: [d5771bf1-f4fe-0389-6cc8-4235418cffef] Response Details: <code>InvalidHeaderValue</code> 2023/05/16 10:15:18 JobID=0e6227d6-b7e8-bc47-6ffc-4160253b88ff, Part#=0, TransfersDone=4 of 4 2023/05/16 10:15:18 all parts of entire Job 0e6227d6-b7e8-bc47-6ffc-4160253b88ff successfully completed, cancelled or paused 2023/05/16 10:15:18 is part of Job which 1 total number of parts done 2023/05/16 10:15:19 PERF: primary performance constraint is Unknown. States: X: 0, O: 0, M: 0, L: 0, R: 0, D: 0, W: 0, F: 0, B: 0, E: 0, T: 0, GRs: 32 2023/05/16 10:15:19 0.0 %, 0 Done, 4 Failed, 0 Pending, 0 Skipped, 4 Total, 2-sec Throughput (Mb/s): 69.5484 2023/05/16 10:15:19 Diagnostic stats: IOPS: 5 End-to-end ms per request: 178 Network Errors: 0.00% Server Busy: 0.00% Job 0e6227d6-b7e8-bc47-6ffc-4160253b88ff summary Elapsed Time (Minutes): 0.0346 Number of File Transfers: 4 Number of Folder Property Transfers: 0 Number of Symlink Transfers: 0 Total Number of Transfers: 4 Number of File Transfers Completed: 0 Number of Folder Transfers Completed: 0 Number of File Transfers Failed: 4 Number of Folder Transfers Failed: 0 Number of File Transfers Skipped: 0 Number of Folder Transfers Skipped: 0 TotalBytesTransferred: 0 Final Job Status: Failed

User's image

User's image

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,199 questions
0 comments No comments
{count} votes

Accepted answer
  1. VasimTamboli 5,215 Reputation points
    2023-05-19T13:29:22.5+00:00

    Based on the provided log content, the error message suggests that there is an issue with the value of one of the HTTP headers, which is not in the correct format. Specifically, the response details indicate an "InvalidHeaderValue" error.

    To troubleshoot and resolve this issue, you can take the following steps:

    Check the configuration of the Jenkins Azure Storage plugin. Ensure that all required parameters, such as storage account name, container name, and access key, are entered correctly.

    Verify that the correct version of the Azure Storage plugin is installed in Jenkins. Ensure that you are using a compatible version that supports the features and functionality you require.

    Double-check the authentication and access control settings for the Azure storage account. Ensure that the provided access key or other authentication mechanism is valid and has sufficient permissions to perform the necessary operations.

    If you are using a container in the pipeline, ensure that the container has the necessary network connectivity and permissions to access the Azure storage account. Check any firewall rules or network security group configurations that might be blocking the connection.

    Review the Azure storage account's diagnostic logs or monitoring metrics for any additional information or error messages that could help identify the root cause of the issue.

    If the issue persists, you may consider reaching out to the Jenkins community or the Azure support team for further assistance, providing them with the relevant error details and configuration information.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. VILASECA AMETLLER Aleix 20 Reputation points
    2023-05-22T14:26:23.8566667+00:00

    thanks for your answer @VasimTamboli

    The problem, both when connecting to the azure storage plugin in jenkins, and when launching the command from the container is due to x-ms-version. It seems that the x-ms-version you pass to the header is not correct. I have tried to change it manually but it has not worked and I don't know how to correct it. Do you have any suggestion about it?

    Thanks a lot

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.