Giter Club home page Giter Club logo

Comments (3)

busterswt avatar busterswt commented on May 26, 2024

Hi - this appears to be a result of the default timeout value for community.vmware.vsphere_copy being 10 seconds.

https://docs.ansible.com/ansible/latest/collections/community/vmware/vsphere_copy_module.html

You can set the timeout parameter to something bigger. For me, 300 seconds was sufficient.

from sddc.lab.

 avatar commented on May 26, 2024

Hi, I'm also experiencing problems deploying Ubuntu VM:

``
TASK [Upload the custom Ubuntu ISO to the datastore] ********************************************************************************************************************* task path: /home/labadmin/ansible/projects/SDDC.Lab.dev-v4/playbooks/deployDNSServer.yml:234 Sunday 17 October 2021 13:50:48 +0000 (0:00:00.023) 0:00:34.495 ******** <localhost> ESTABLISH LOCAL CONNECTION FOR USER: root <localhost> EXEC /bin/sh -c 'echo ~root && sleep 0' <localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p " echo /root/.ansible/tmp `"&& mkdir "` echo /root/.ansible/tmp/ansible-tmp-1634478648.5125084-8385-91432254998129 `" && echo ansible-tmp-1634478648.5125084-8385-91432254998129="` echo /root/.ansible/tmp/ansible-tmp-1634478648.5125084-8385-91432254998129 `" ) && sleep 0'
Using module file /usr/local/lib/python3.8/dist-packages/ansible_collections/community/vmware/plugins/modules/vsphere_copy.py
PUT /root/.ansible/tmp/ansible-local-7542o_29eeqh/tmpk5_qp7bs TO /root/.ansible/tmp/ansible-tmp-1634478648.5125084-8385-91432254998129/AnsiballZ_vsphere_copy.py
EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1634478648.5125084-8385-91432254998129/ /root/.ansible/tmp/ansible-tmp-1634478648.5125084-8385-91432254998129/AnsiballZ_vsphere_copy.py && sleep 0'
EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1634478648.5125084-8385-91432254998129/AnsiballZ_vsphere_copy.py && sleep 0'
EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1634478648.5125084-8385-91432254998129/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/usr/lib/python3.8/urllib/request.py", line 1354, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/lib/python3.8/http/client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1046, in _send_output
self.send(chunk)
File "/usr/lib/python3.8/http/client.py", line 968, in send
self.sock.sendall(data)
File "/usr/lib/python3.8/ssl.py", line 1204, in sendall
v = self.send(byte_view[count:])
File "/usr/lib/python3.8/ssl.py", line 1173, in send
return self._sslobj.write(data)
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/tmp/ansible_community.vmware.vsphere_copy_payload_xu22vngj/ansible_community.vmware.vsphere_copy_payload.zip/ansible_collections/community/vmware/plugins/modules/vsphere_copy.py", line 183, in main
File "/tmp/ansible_community.vmware.vsphere_copy_payload_xu22vngj/ansible_community.vmware.vsphere_copy_payload.zip/ansible/module_utils/urls.py", line 1535, in open_url
File "/tmp/ansible_community.vmware.vsphere_copy_payload_xu22vngj/ansible_community.vmware.vsphere_copy_payload.zip/ansible/module_utils/urls.py", line 1446, in open
File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/tmp/ansible_community.vmware.vsphere_copy_payload_xu22vngj/ansible_community.vmware.vsphere_copy_payload.zip/ansible/module_utils/urls.py", line 582, in https_open
File "/usr/lib/python3.8/urllib/request.py", line 1357, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 104] Connection reset by peer>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-tmp-1634478648.5125084-8385-91432254998129/AnsiballZ_vsphere_copy.py", line 100, in
_ansiballz_main()
File "/root/.ansible/tmp/ansible-tmp-1634478648.5125084-8385-91432254998129/AnsiballZ_vsphere_copy.py", line 92, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/root/.ansible/tmp/ansible-tmp-1634478648.5125084-8385-91432254998129/AnsiballZ_vsphere_copy.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible_collections.community.vmware.plugins.modules.vsphere_copy', init_globals=dict(_module_fqn='ansible_collections.community.vmware.plugins.modules.vsphere_copy', _modlib_path=modlib_path),
File "/usr/lib/python3.8/runpy.py", line 207, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/tmp/ansible_community.vmware.vsphere_copy_payload_xu22vngj/ansible_community.vmware.vsphere_copy_payload.zip/ansible_collections/community/vmware/plugins/modules/vsphere_copy.py", line 224, in
File "/tmp/ansible_community.vmware.vsphere_copy_payload_xu22vngj/ansible_community.vmware.vsphere_copy_payload.zip/ansible_collections/community/vmware/plugins/modules/vsphere_copy.py", line 189, in main
TypeError: 'URLError' object is not subscriptable
fatal: [localhost]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File "/usr/lib/python3.8/urllib/request.py", line 1354, in do_open\n h.request(req.get_method(), req.selector, req.data, headers,\n File "/usr/lib/python3.8/http/client.py", line 1252, in request\n self._send_request(method, url, body, headers, encode_chunked)\n File "/usr/lib/python3.8/http/client.py", line 1298, in _send_request\n self.endheaders(body, encode_chunked=encode_chunked)\n File "/usr/lib/python3.8/http/client.py", line 1247, in endheaders\n self._send_output(message_body, encode_chunked=encode_chunked)\n File "/usr/lib/python3.8/http/client.py", line 1046, in _send_output\n self.send(chunk)\n File "/usr/lib/python3.8/http/client.py", line 968, in send\n self.sock.sendall(data)\n File "/usr/lib/python3.8/ssl.py", line 1204, in sendall\n v = self.send(byte_view[count:])\n File "/usr/lib/python3.8/ssl.py", line 1173, in send\n return self._sslobj.write(data)\nConnectionResetError: [Errno 104] Connection reset by peer\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "/tmp/ansible_community.vmware.vsphere_copy_payload_xu22vngj/ansible_community.vmware.vsphere_copy_payload.zip/ansible_collections/community/vmware/plugins/modules/vsphere_copy.py", line 183, in main\n File "/tmp/ansible_community.vmware.vsphere_copy_payload_xu22vngj/ansible_community.vmware.vsphere_copy_payload.zip/ansible/module_utils/urls.py", line 1535, in open_url\n File "/tmp/ansible_community.vmware.vsphere_copy_payload_xu22vngj/ansible_community.vmware.vsphere_copy_payload.zip/ansible/module_utils/urls.py", line 1446, in open\n File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen\n return opener.open(url, data, timeout)\n File "/usr/lib/python3.8/urllib/request.py", line 525, in open\n response = self._open(req, data)\n File "/usr/lib/python3.8/urllib/request.py", line 542, in _open\n result = self._call_chain(self.handle_open, protocol, protocol +\n File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain\n result = func(*args)\n File "/tmp/ansible_community.vmware.vsphere_copy_payload_xu22vngj/ansible_community.vmware.vsphere_copy_payload.zip/ansible/module_utils/urls.py", line 582, in https_open\n File "/usr/lib/python3.8/urllib/request.py", line 1357, in do_open\n raise URLError(err)\nurllib.error.URLError: <urlopen error [Errno 104] Connection reset by peer>\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "/root/.ansible/tmp/ansible-tmp-1634478648.5125084-8385-91432254998129/AnsiballZ_vsphere_copy.py", line 100, in \n _ansiballz_main()\n File "/root/.ansible/tmp/ansible-tmp-1634478648.5125084-8385-91432254998129/AnsiballZ_vsphere_copy.py", line 92, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/root/.ansible/tmp/ansible-tmp-1634478648.5125084-8385-91432254998129/AnsiballZ_vsphere_copy.py", line 40, in invoke_module\n runpy.run_module(mod_name='ansible_collections.community.vmware.plugins.modules.vsphere_copy', init_globals=dict(_module_fqn='ansible_collections.community.vmware.plugins.modules.vsphere_copy', _modlib_path=modlib_path),\n File "/usr/lib/python3.8/runpy.py", line 207, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File "/usr/lib/python3.8/runpy.py", line 87, in _run_code\n exec(code, run_globals)\n File "/tmp/ansible_community.vmware.vsphere_copy_payload_xu22vngj/ansible_community.vmware.vsphere_copy_payload.zip/ansible_collections/community/vmware/plugins/modules/vsphere_copy.py", line 224, in \n File "/tmp/ansible_community.vmware.vsphere_copy_payload_xu22vngj/ansible_community.vmware.vsphere_copy_payload.zip/ansible_collections/community/vmware/plugins/modules/vsphere_copy.py", line 189, in main\nTypeError: 'URLError' object is not subscriptable\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}

PLAY RECAP ***************************************************************************************************************************************************************
localhost : ok=30 changed=4 unreachable=0 failed=1 skipped=69 rescued=0 ignored=1
``
Tried to increase timeout but same result.

Any ideas?

from sddc.lab.

 avatar commented on May 26, 2024

unfortunately the issue isn't solved.. it only worked one time and now it's failing again.

TASK [Upload the custom Ubuntu ISO to the datastore] ***********************************************************************************************************************
task path: /home/labadmin/ansible/projects/SDDC.Lab.v3/playbooks/deployDNSServer.yml:234
Monday 18 October 2021 19:34:16 +0000 (0:00:00.025) 0:01:15.331 ********
ESTABLISH LOCAL CONNECTION FOR USER: root
EXEC /bin/sh -c 'echo ~root && sleep 0'
EXEC /bin/sh -c '( umask 77 && mkdir -p "echo /root/.ansible/tmp"&& mkdir "echo /root/.ansible/tmp/ansible-tmp-1634585656.4668918-14941-136711851987696" && echo ansible-tmp-1634585656.4668918-14941-136711851987696="echo /root/.ansible/tmp/ansible-tmp-1634585656.4668918-14941-136711851987696" ) && sleep 0'
Using module file /usr/local/lib/python3.8/dist-packages/ansible_collections/community/vmware/plugins/modules/vsphere_copy.py
PUT /root/.ansible/tmp/ansible-local-14068ed43003n/tmp00kemgdv TO /root/.ansible/tmp/ansible-tmp-1634585656.4668918-14941-136711851987696/AnsiballZ_vsphere_copy.py
EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1634585656.4668918-14941-136711851987696/ /root/.ansible/tmp/ansible-tmp-1634585656.4668918-14941-136711851987696/AnsiballZ_vsphere_copy.py && sleep 0'
EXEC /bin/sh -c '/usr/bin/python3 /root/.ansible/tmp/ansible-tmp-1634585656.4668918-14941-136711851987696/AnsiballZ_vsphere_copy.py && sleep 0'
EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1634585656.4668918-14941-136711851987696/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/usr/lib/python3.8/urllib/request.py", line 1354, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/usr/lib/python3.8/http/client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1046, in _send_output
self.send(chunk)
File "/usr/lib/python3.8/http/client.py", line 968, in send
self.sock.sendall(data)
File "/usr/lib/python3.8/ssl.py", line 1204, in sendall
v = self.send(byte_view[count:])
File "/usr/lib/python3.8/ssl.py", line 1173, in send
return self._sslobj.write(data)
socket.timeout: The write operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/tmp/ansible_community.vmware.vsphere_copy_payload_zz9t18u_/ansible_community.vmware.vsphere_copy_payload.zip/ansible_collections/community/vmware/plugins/modules/vsphere_copy.py", line 183, in main
File "/tmp/ansible_community.vmware.vsphere_copy_payload_zz9t18u_/ansible_community.vmware.vsphere_copy_payload.zip/ansible/module_utils/urls.py", line 1535, in open_url
File "/tmp/ansible_community.vmware.vsphere_copy_payload_zz9t18u_/ansible_community.vmware.vsphere_copy_payload.zip/ansible/module_utils/urls.py", line 1446, in open
File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/lib/python3.8/urllib/request.py", line 502, in call_chain
result = func(*args)
File "/tmp/ansible_community.vmware.vsphere_copy_payload_zz9t18u
/ansible_community.vmware.vsphere_copy_payload.zip/ansible/module_utils/urls.py", line 582, in https_open
File "/usr/lib/python3.8/urllib/request.py", line 1357, in do_open
raise URLError(err)
urllib.error.URLError:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-tmp-1634585656.4668918-14941-136711851987696/AnsiballZ_vsphere_copy.py", line 100, in
_ansiballz_main()
File "/root/.ansible/tmp/ansible-tmp-1634585656.4668918-14941-136711851987696/AnsiballZ_vsphere_copy.py", line 92, in _ansiballz_main
invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
File "/root/.ansible/tmp/ansible-tmp-1634585656.4668918-14941-136711851987696/AnsiballZ_vsphere_copy.py", line 40, in invoke_module
runpy.run_module(mod_name='ansible_collections.community.vmware.plugins.modules.vsphere_copy', init_globals=dict(_module_fqn='ansible_collections.community.vmware.plugins.modules.vsphere_copy', _modlib_path=modlib_path),
File "/usr/lib/python3.8/runpy.py", line 207, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code
run_code(code, mod_globals, init_globals,
File "/usr/lib/python3.8/runpy.py", line 87, in run_code
exec(code, run_globals)
File "/tmp/ansible_community.vmware.vsphere_copy_payload_zz9t18u
/ansible_community.vmware.vsphere_copy_payload.zip/ansible_collections/community/vmware/plugins/modules/vsphere_copy.py", line 224, in
File "/tmp/ansible_community.vmware.vsphere_copy_payload_zz9t18u
/ansible_community.vmware.vsphere_copy_payload.zip/ansible_collections/community/vmware/plugins/modules/vsphere_copy.py", line 189, in main
TypeError: 'URLError' object is not subscriptable
fatal: [localhost]: FAILED! => {
"changed": false,
"module_stderr": "Traceback (most recent call last):\n File "/usr/lib/python3.8/urllib/request.py", line 1354, in do_open\n h.request(req.get_method(), req.selector, req.data, headers,\n File "/usr/lib/python3.8/http/client.py", line 1252, in request\n self._send_request(method, url, body, headers, encode_chunked)\n File "/usr/lib/python3.8/http/client.py", line 1298, in _send_request\n self.endheaders(body, encode_chunked=encode_chunked)\n File "/usr/lib/python3.8/http/client.py", line 1247, in endheaders\n self.send_output(message_body, encode_chunked=encode_chunked)\n File "/usr/lib/python3.8/http/client.py", line 1046, in send_output\n self.send(chunk)\n File "/usr/lib/python3.8/http/client.py", line 968, in send\n self.sock.sendall(data)\n File "/usr/lib/python3.8/ssl.py", line 1204, in sendall\n v = self.send(byte_view[count:])\n File "/usr/lib/python3.8/ssl.py", line 1173, in send\n return self.sslobj.write(data)\nsocket.timeout: The write operation timed out\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "/tmp/ansible_community.vmware.vsphere_copy_payload_zz9t18u/ansible_community.vmware.vsphere_copy_payload.zip/ansible_collections/community/vmware/plugins/modules/vsphere_copy.py", line 183, in main\n File "/tmp/ansible_community.vmware.vsphere_copy_payload_zz9t18u/ansible_community.vmware.vsphere_copy_payload.zip/ansible/module_utils/urls.py", line 1535, in open_url\n File "/tmp/ansible_community.vmware.vsphere_copy_payload_zz9t18u/ansible_community.vmware.vsphere_copy_payload.zip/ansible/module_utils/urls.py", line 1446, in open\n File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen\n return opener.open(url, data, timeout)\n File "/usr/lib/python3.8/urllib/request.py", line 525, in open\n response = self._open(req, data)\n File "/usr/lib/python3.8/urllib/request.py", line 542, in _open\n result = self._call_chain(self.handle_open, protocol, protocol +\n File "/usr/lib/python3.8/urllib/request.py", line 502, in call_chain\n result = func(*args)\n File "/tmp/ansible_community.vmware.vsphere_copy_payload_zz9t18u/ansible_community.vmware.vsphere_copy_payload.zip/ansible/module_utils/urls.py", line 582, in https_open\n File "/usr/lib/python3.8/urllib/request.py", line 1357, in do_open\n raise URLError(err)\nurllib.error.URLError: \n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "/root/.ansible/tmp/ansible-tmp-1634585656.4668918-14941-136711851987696/AnsiballZ_vsphere_copy.py", line 100, in \n _ansiballz_main()\n File "/root/.ansible/tmp/ansible-tmp-1634585656.4668918-14941-136711851987696/AnsiballZ_vsphere_copy.py", line 92, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File "/root/.ansible/tmp/ansible-tmp-1634585656.4668918-14941-136711851987696/AnsiballZ_vsphere_copy.py", line 40, in invoke_module\n runpy.run_module(mod_name='ansible_collections.community.vmware.plugins.modules.vsphere_copy', init_globals=dict(_module_fqn='ansible_collections.community.vmware.plugins.modules.vsphere_copy', _modlib_path=modlib_path),\n File "/usr/lib/python3.8/runpy.py", line 207, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File "/usr/lib/python3.8/runpy.py", line 97, in _run_module_code\n run_code(code, mod_globals, init_globals,\n File "/usr/lib/python3.8/runpy.py", line 87, in run_code\n exec(code, run_globals)\n File "/tmp/ansible_community.vmware.vsphere_copy_payload_zz9t18u/ansible_community.vmware.vsphere_copy_payload.zip/ansible_collections/community/vmware/plugins/modules/vsphere_copy.py", line 224, in \n File "/tmp/ansible_community.vmware.vsphere_copy_payload_zz9t18u/ansible_community.vmware.vsphere_copy_payload.zip/ansible_collections/community/vmware/plugins/modules/vsphere_copy.py", line 189, in main\nTypeError: 'URLError' object is not subscriptable\n",
"module_stdout": "",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}

from sddc.lab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.