Can't install token for commerical edition

done

(base) C:>conda token set xxxx
Traceback (most recent call last):
File “C:\Users\ffung\Anaconda3\lib\site-packages\urllib3\connection.py”, line 174, in _new_conn
conn = connection.create_connection(
File “C:\Users\ffung\Anaconda3\lib\site-packages\urllib3\util\connection.py”, line 96, in create_connection
raise err
File “C:\Users\ffung\Anaconda3\lib\site-packages\urllib3\util\connection.py”, line 86, in create_connection
sock.connect(sa)
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\ffung\Anaconda3\lib\site-packages\urllib3\connectionpool.py”, line 699, in urlopen
httplib_response = self._make_request(
File “C:\Users\ffung\Anaconda3\lib\site-packages\urllib3\connectionpool.py”, line 382, in _make_request
self._validate_conn(conn)
File “C:\Users\ffung\Anaconda3\lib\site-packages\urllib3\connectionpool.py”, line 1010, in _validate_conn
conn.connect()
File “C:\Users\ffung\Anaconda3\lib\site-packages\urllib3\connection.py”, line 358, in connect
conn = self._new_conn()
File “C:\Users\ffung\Anaconda3\lib\site-packages\urllib3\connection.py”, line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x000002C0A4284490>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\ffung\Anaconda3\lib\site-packages\requests\adapters.py”, line 439, in send
resp = conn.urlopen(
File “C:\Users\ffung\Anaconda3\lib\site-packages\urllib3\connectionpool.py”, line 755, in urlopen
retries = retries.increment(
File “C:\Users\ffung\Anaconda3\lib\site-packages\urllib3\util\retry.py”, line 574, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘repo.anaconda.cloud’, port=443): Max retries exceeded with url: /t/xxxx0/repo/main/noarch/repodata.json (Caused by NewConnectionError(’<urllib3.connection.HTTPSConnection object at 0x000002C0A4284490>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “C:\Users\ffung\Anaconda3\Scripts\conda-token-script.py”, line 9, in
sys.exit(cli())
File “C:\Users\ffung\Anaconda3\lib\site-packages\conda_token\cli.py”, line 116, in cli
return args.func(args)
File “C:\Users\ffung\Anaconda3\lib\site-packages\conda_token\cli.py”, line 29, in token_set
repo_config.validate_token(args.token, no_ssl_verify=args.no_ssl_verify)
File “C:\Users\ffung\Anaconda3\lib\site-packages\conda_token\repo_config.py”, line 79, in validate_token
r = requests.head(token_url, verify=ssl_verify)
File “C:\Users\ffung\Anaconda3\lib\site-packages\requests\api.py”, line 102, in head
return request(‘head’, url, **kwargs)
File “C:\Users\ffung\Anaconda3\lib\site-packages\requests\api.py”, line 61, in request
return session.request(method=method, url=url, **kwargs)
File “C:\Users\ffung\Anaconda3\lib\site-packages\requests\sessions.py”, line 542, in request
resp = self.send(prep, **send_kwargs)
File “C:\Users\ffung\Anaconda3\lib\site-packages\requests\sessions.py”, line 655, in send
r = adapter.send(request, **kwargs)
File “C:\Users\ffung\Anaconda3\lib\site-packages\requests\adapters.py”, line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host=‘repo.anaconda.cloud’, port=443): Max retries exceeded with url: /t/xxxxx/repo/main/noarch/repodata.json (Caused by NewConnectionError(’<urllib3.connection.HTTPSConnection object at 0x000002C0A4284490>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond’))

(base) C:>

What can I do to solve the problem

Hi Felix.

Thank you for posting to the forum! I have responded to the ticket that you submitted, but I wanted to post the suggestions that I gave there, in the forum, too–as they may assist other users. You can reply directly in the ticket to specific requests.

Can you send me the full output of conda info? and the .condarc file? – do not post or send anything sensitive in the forum or via email–or redact them if needed.

If you receive an http-000-connection-failed error, here are some troubleshooting suggestions:

SSL TESTING:
This link has instructions for checking SSL (also posted below in this email):

https://docs.anaconda.com/anaconda-commercial/troubleshooting/#http-000-connection-failed

The first step to checking if SSL is blocking your connection is to run this command:

conda config --set ssl_verify false

Then, run the following to install conda-token:

conda install conda-token -n base

Lastly, run the following to ensure the token verification step ignores SSL errors:

#Replace with your token

conda token set --no-ssl-verify <TOKEN>

You may see the following warning, though this is to be expected:

/Users/<USER_NAME>/Applications/miniconda3/lib/python3.7/site-packages/urllib3/connectionpool.py:1020: InsecureRequestWarning: Unverified HTTPS request is being made to host ‘repo.anaconda.cloud’. Adding certificate verification is strongly advised. See: Advanced Usage - urllib3 2.0.0.dev0 documentation InsecureRequestWarning,

If you are able to connect after turning SSL off, then you can either run anaconda with SSL off, or your IT department can assist you with installing a certificate that meets their requirements.

If you are not able to connect with SSL off, run the following commands and paste the output in the ticket.

curl -v repo.anaconda.com

curl -v repo.anaconda.cloud

If you CANNOT reach repo.anaconda.com or repo.anaconda.cloud with the curl command, then they are being blocked and you will need to ask your IT to in-block it on their network.

If you CAN reach them with the curl command, then run the following command next:

openssl s_client -connect anaconda.cloud:443 -showcerts

This will give us an idea of what is breaking TLS (transport-layer security). With the openssl output, there’s a number of things that could be going wrong, so if this is the issue, we will need to troubleshoot further.

PROXY SETTINGS:
If you are required to go through a proxy to connect to and download info from external sites, instructions for setting those up can be found here:

https://docs.anaconda.com/anaconda-commercial/quickstart/#using-anaconda-behind-a-firewall-or-proxy-optional

If you are still not able to connect after troubleshooting, please send back the requested information via your ticket:

your .condarc file

and the output of:

conda info
curl -v repo.anaconda.com
curl -v repo.anaconda.com
openssl s_client -connect anaconda.cloud:443 -showcerts

The customer responded via ticket that the following commands allowed him to successfully set the token:

set HTTP_PROXY=http://username:password@proxyurl.com:8080
set HTTPS_PROXY=http://username:password@proxyurl.com:8080

conda token set --no-ssl-verify <TOKEN>

1 Like

Hi,

Sorry to resurrect this older post, but I have also encountered the issue on not being able to install the conda token.

In the screenshot above, I’ve tried to set the token using the hash that was given to me to 1 of my 5 virtual Windows machines. I was able to set the token in all other VMs as per normal, but this particular one doesn’t work.

There is no useful feedback or error message from conda for me to debug the issue on, I only got that [y/N] box, and either answer doesn’t give me the conda setting. Is this a known issue? What could be done to fix this?

Hello.

Did you press return after the < [y/N]: y > appeared? Or did it just freeze? what happens after you press return on the Y? Could you send a screenshot of that?

Regards,