cURL connectivity issues

We started seeing connectivity issues in jobs that have IP ranges feature enabled. We’re using cimg/base:edge docker image. Some error examples are:

#!/bin/bash -eo pipefail
curl -Ss -o /tmp/helm.tar.gz
tar -zxf /tmp/helm.tar.gz -C /tmp
sudo mv -f /tmp/linux-amd64/helm /usr/local/bin/helm      
curl: (35) OpenSSL SSL_connect: Connection reset by peer in connection to 
Exited with code exit status 35
curl: (35) OpenSSL SSL_connect: Connection reset by peer in connection to

These happen randomly. In most cases, rerunning the failed job would solve the issue.
Is anyone experiencing the same issue?

Hi @chenyang,

Thank you for sharing your issue with us.

We have received reports from other users regarding a similar issue.
It is being looked into on our end, but one workaround to unblock you would be to write a script that retries the curl command if it fails.

Here is an example adapted to your current script:

- run: 
    name: Install Helm
    command: |
        until [ "$n" -ge 5 ]
            curl -Ss ${BASE_URL}/${TAR_FILE} -o /tmp/helm.tar.gz && \
            tar -zxf /tmp/helm.tar.gz -C /tmp && \
            sudo mv -f /tmp/linux-amd64/helm /usr/local/bin/helm && \
            echo -e "\nCurl command failed. Retrying again...\n"
            sleep 1

This will try the curl command up until 5 times if it fails.

Certain versions of cURL contain retry options, but I was unable to get it to work when it fails due to an ssl error (as it is in this case).

Please let me know if this will work for your use case, and I am happy to answer any additional questions.

Thank you!

1 Like

Thanks @aaronclark We eventually end up with building our own docker image with Helm installed. But I tried your solution it appears to work perfectly. Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.