conan icon indicating copy to clipboard operation
conan copied to clipboard

Max retries exceeded with url

Open Prayag-Dubey opened this issue 4 years ago • 9 comments
trafficstars

When command "conan search poco --remote=conan-center" is given, below error appears -

ERROR: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /conan-io/conan-center-index/v1/ping (Caused by SSLError(SSLError(185090057, '[X509] PEM lib (_ssl.c:3732)'),))

Unable to connect to conan-center=https://github.com/conan-io/conan-center-index

  1. Make sure the remote is reachable or,
  2. Disable it by using conan remote disable, Then try again. --End of Error

After verifying that it was not an issue with my network connection, etc. I thought to try with other libraries (poco, gtest, cmake, ...) and those worked properly. checked for the certificates as well. certificates are properly updated. Is there some configuration change or "workaround" to resolve this?

Environment Details (include every applicable attribute)

  • Operating System+version: Ubuntu 18.04.5
  • Compiler+version:
  • Conan version: Conan version 1.40.1
  • Python version: Python 3.6.9

Steps to reproduce (Include if Applicable)

  1. install python3-pip
  2. Install virtualenv python package
  3. pip3 install virtualenv
  4. Install CMake.
  5. python3 -m virtualenv venv --python=python3
  6. pip install conan
  7. conan remote add conan-center https://github.com/conan-io/conan-center-index
  8. conan remote list o/p - conancenter: https://center.conan.io [Verify SSL: True] conan-center: https://github.com/conan-io [Verify SSL: True]
  9. conan search poco --remote=conan-center o/p - ERROR: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /conan-io/conan/v1/ping (Caused by SSLError(SSLError(185090057, '[X509] PEM lib (_ssl.c:3732)'),)) Unable to connect to conan-center=https://github.com/conan-io/conan
    1. Make sure the remote is reachable or,
    2. Disable it by using conan remote disable, Then try again.

Logs (Executed commands with output) (Include/Attach if Applicable)

Prayag-Dubey avatar Sep 22 '21 13:09 Prayag-Dubey

Hi @Prayag-Dubey

This is typically an issue of the client machine Python setup. It is very important that you report your OS and version. This is something more likely to happen in OSX, because of issues with cryptography dependencies. It is also relevant to report how you installed Conan.

memsharded avatar Sep 22 '21 13:09 memsharded

Hi @memsharded , updated the steps and OS version. Please check

Prayag-Dubey avatar Sep 22 '21 14:09 Prayag-Dubey

This is incorrect:

conan remote add conan-center https://github.com/conan-io/conan-center-index

You don't add the Github repo as the remote. The legacy center, if you want to add it is:

conan remote add conan-center https://conan.bintray.com

But that is the legacy one, you shouldn't add it in the general case, and stick with the default one which is now conancenter: https://center.conan.io

memsharded avatar Sep 22 '21 15:09 memsharded

the default one also shows the same error, ERROR: HTTPSConnectionPool(host='center.conan.io', port=443): Max retries exceeded with url: /v1/ping (Caused by ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required',)))

Unable to connect to conancenter=https://center.conan.io

  1. Make sure the remote is reachable or,
  2. Disable it by using conan remote disable, Then try again.

Prayag-Dubey avatar Sep 23 '21 04:09 Prayag-Dubey

I see the same issue. Do we know any workaround for this?

VrajPandya avatar Nov 25 '21 01:11 VrajPandya

Okay updated Conan and this seem to work for me.

VrajPandya avatar Nov 25 '21 02:11 VrajPandya

Please see https://github.com/conan-io/conan/issues/9695 for certificate related issues.

@Prayag-Dubey did you manage to do some progress? It seems you could have some proxy in between, I would try first in a different machine (outside of the company proxy/VPN if you have one), or contacting with your IT if they can help with that proxy

memsharded avatar Nov 25 '21 08:11 memsharded

I had a very similar issue/error that landed me on this page. The problem is slightly different but I'm dropping my info here in case someone with my issue finds this page.

Going through gitlab, I had authentication errors. I have a personal access token with scope api. When adding my repo's conan repository, I was using the project's URL which is incorrect. You need to go through gitlab's API URLs.

Example:

conan remote add gitlab https://gitlab.com/api/v4/projects/<project ID>/packages/conan -f

project ID can be found on your repo's Setting > General page.

jkleve avatar Jan 04 '22 18:01 jkleve

I came across similar issue. Firstly, need to check if ping github.com/conan-io/conan works. If it doesn't work, please update /etc/hosts to resolve hostname into an address. After this, you should be able to ping or wget the address.

Post that, in Ubuntu VBOX settings instead of NETWORK BRIDGED use NAT.

Above steps should resolve the issue.

svelshi19 avatar Jul 29 '22 01:07 svelshi19

Closing as solved, thanks everyone for chiming-in! :)

AbrilRBS avatar Jan 04 '24 08:01 AbrilRBS