You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When installing collections from https://galaxy.ansible.com, the SSL handshake randomly times out. See the following example in which one collection successfully installs and another doesn't:
/ # ansible-galaxy install -r ansible.yml
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Installing 'containers.podman:1.11.0' to '/root/.ansible/collections/ansible_collections/containers/podman'
Downloading https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/containers-podman-1.11.0.tar.gz to /root/.ansible/tmp/ansible-local-126eri5wnb3/tmpa07ppuq3
containers.podman (1.11.0) was installed successfully
Installing 'community.general:8.1.0' to '/root/.ansible/collections/ansible_collections/community/general'
Downloading https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/community-general-8.1.0.tar.gz to /root/.ansible/tmp/ansible-local-126eri5wnb3/tmpa07ppuq3
ERROR! Unexpected Exception, this is probably a bug: <urlopen error _ssl.c:1074: The handshake operation timed out>
to see the full traceback, use -vvv
The collections should install correctly (have a longer timeout for SSL handshake).
Actual Results
/ # ansible-galaxy install -vvv -r ansible.ymlansible-galaxy 2.10.17 config file = None configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python3.7/site-packages/ansible executable location = /usr/bin/ansible-galaxy python version = 3.7.10 (default, Mar 2 2021, 09:06:08) [GCC 8.3.0]No config file found; using defaultsReading requirement file at '/ansible.yml'Starting galaxy collection install processFound installed collection containers.podman:1.11.0 at '/root/.ansible/collections/ansible_collections/containers/podman'Process install dependency mapOpened /root/.ansible/galaxy_tokenProcessing requirement collection 'containers.podman'Collection 'containers.podman' obtained from server default https://galaxy.ansible.com/api/Processing requirement collection 'community.general'Collection 'community.general' obtained from server default https://galaxy.ansible.com/api/Processing requirement collection 'ansible.posix'Collection 'ansible.posix' obtained from server default https://galaxy.ansible.com/api/Starting collection install processSkipping 'containers.podman' as it is already installedInstalling 'community.general:8.1.0' to '/root/.ansible/collections/ansible_collections/community/general'Downloading https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/community-general-8.1.0.tar.gz to /root/.ansible/tmp/ansible-local-136pq1_pd44/tmpx21mnhfucommunity.general (8.1.0) was installed successfullyInstalling 'ansible.posix:1.5.4' to '/root/.ansible/collections/ansible_collections/ansible/posix'Downloading https://galaxy.ansible.com/api/v3/plugin/ansible/content/published/collections/artifacts/ansible-posix-1.5.4.tar.gz to /root/.ansible/tmp/ansible-local-136pq1_pd44/tmpx21mnhfuERROR! Unexpected Exception, this is probably a bug: <urlopen error _ssl.c:1074: The handshake operation timed out>the full traceback was:Traceback (most recent call last): File "/usr/lib/python3.7/urllib/request.py", line 1350, in do_open encode_chunked=req.has_header('Transfer-encoding')) File "/usr/lib/python3.7/http/client.py", line 1277, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1323, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1272, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.7/http/client.py", line 1032, in _send_output self.send(msg) File "/usr/lib/python3.7/http/client.py", line 972, in send self.connect() File "/usr/lib/python3.7/site-packages/ansible/module_utils/urls.py", line 446, in connect self.sock = self.context.wrap_socket(sock, server_hostname=server_hostname) File "/usr/lib/python3.7/ssl.py", line 423, in wrap_socket session=session File "/usr/lib/python3.7/ssl.py", line 870, in _create self.do_handshake() File "/usr/lib/python3.7/ssl.py", line 1139, in do_handshake self._sslobj.do_handshake()socket.timeout: _ssl.c:1074: The handshake operation timed outDuring handling of the above exception, another exception occurred:Traceback (most recent call last): File "/usr/bin/ansible-galaxy", line 123, in <module> exit_code = cli.run() File "/usr/lib/python3.7/site-packages/ansible/cli/galaxy.py", line 491, in run context.CLIARGS['func']() File "/usr/lib/python3.7/site-packages/ansible/cli/galaxy.py", line 1060, in execute_install self._execute_install_collection(collection_requirements, collection_path) File "/usr/lib/python3.7/site-packages/ansible/cli/galaxy.py", line 1082, in _execute_install_collection no_deps, force, force_with_deps, allow_pre_release=allow_pre_release) File "/usr/lib/python3.7/site-packages/ansible/galaxy/collection.py", line 695, in install_collections collection.install(output_path, b_temp_path) File "/usr/lib/python3.7/site-packages/ansible/galaxy/collection.py", line 244, in install self.b_path = self.download(b_temp_path) File "/usr/lib/python3.7/site-packages/ansible/galaxy/collection.py", line 229, in download headers=headers) File "/usr/lib/python3.7/site-packages/ansible/galaxy/collection.py", line 1394, in _download_file unredirected_headers=['Authorization'], http_agent=user_agent()) File "/usr/lib/python3.7/site-packages/ansible/module_utils/urls.py", line 1399, in open_url unredirected_headers=unredirected_headers) File "/usr/lib/python3.7/site-packages/ansible/module_utils/urls.py", line 1304, in open return urllib_request.urlopen(request, None, timeout) File "/usr/lib/python3.7/urllib/request.py", line 222, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python3.7/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python3.7/urllib/request.py", line 563, in error result = self._call_chain(*args) File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain result = func(*args) File "/usr/lib/python3.7/urllib/request.py", line 755, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "/usr/lib/python3.7/urllib/request.py", line 531, in open response = meth(req, response) File "/usr/lib/python3.7/urllib/request.py", line 641, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python3.7/urllib/request.py", line 563, in error result = self._call_chain(*args) File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain result = func(*args) File "/usr/lib/python3.7/urllib/request.py", line 755, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "/usr/lib/python3.7/urllib/request.py", line 525, in open response = self._open(req, data) File "/usr/lib/python3.7/urllib/request.py", line 543, in _open '_open', req) File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain result = func(*args) File "/usr/lib/python3.7/site-packages/ansible/module_utils/urls.py", line 464, in https_open req File "/usr/lib/python3.7/urllib/request.py", line 1352, in do_open raise URLError(err)urllib.error.URLError: <urlopen error _ssl.c:1074: The handshake operation timed out>/ #
Code of Conduct
I agree to follow the Ansible Code of Conduct
The text was updated successfully, but these errors were encountered:
@aristotelosansible-core 2.10 is not supported and no longer receives bug fixes. Please test against one of the supported versions of ansible-core, preferably the most recent one, to see whether the bug has been fixed.
That's a very old version that hasn't been supported for a few years. Please, use an up-to-date release instead.
Likewise, Python 3.7 is quite old and is actually EOL since June. That's another outdated bit in your example.
Summary
When installing collections from https://galaxy.ansible.com, the SSL handshake randomly times out. See the following example in which one collection successfully installs and another doesn't:
It also sometimes fails on the first collection.
Issue Type
Bug Report
Component Name
ansible-galaxy
Ansible Version
Configuration
OS / Environment
Alpine 3:10, running on Docker.
Steps to Reproduce
Expected Results
The collections should install correctly (have a longer timeout for SSL handshake).
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: