community.vmware icon indicating copy to clipboard operation
community.vmware copied to clipboard

Failed to exit maintenance mode due to [Errno 111] Connection refused

Open ozgurmazlum opened this issue 3 years ago • 1 comments

SUMMARY

When restoring config backups, the host restarted. But the same host does the maintenance process without starting and returning an access error.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

community.vmware.vmware_cfg_backup

ANSIBLE VERSION

COLLECTION VERSION

CONFIGURATION

OS / ENVIRONMENT
STEPS TO REPRODUCE

--
- name: Esxi Config Backup
  hosts: '{{ delegate_server }}'
  gather_facts: no
  tasks:
  - name: Restore ESXi Host from Config Backup
    community.vmware.vmware_cfg_backup:
      validate_certs: False
      hostname: "{{ esxi_hostname }}"
      username: "{{ esxi_username }}"
      password: "{{ esxi_password }}"
      state: loaded
      src: /tmp/configBundle-{{ esxi_hostname }}.tgz
    delegate_to: '{{ delegate_server }}'

EXPECTED RESULTS
ACTUAL RESULTS

When I started

"msg": "Failed to exit maintenance mode due to [Errno 111] Connection refused",
  "exception": "  File \"/tmp/ansible_community.vmware.vmware_cfg_backup_payload_uoe8qzwg/ansible_community.vmware.vmware_cfg_backup_payload.zip/ansible_collections/community/vmware/plugins/modules/vmware_cfg_backup.py\", line 203, in exit_maintenance\n  File \"/usr/local/lib/python3.8/dist-packages/pyVmomi/VmomiSupport.py\", line 706, in <lambda>\n    self.f(*(self.args + (obj,) + args), **kwargs)\n  File \"/usr/local/lib/python3.8/dist-packages/pyVmomi/VmomiSupport.py\", line 512, in _InvokeMethod\n    return self._stub.InvokeMethod(self, info, args)\n  File \"/usr/local/lib/python3.8/dist-packages/pyVmomi/SoapAdapter.py\", line 1350, in InvokeMethod\n    conn.request('POST', self.path, req, headers)\n  File \"/usr/lib/python3.8/http/client.py\", line 1256, in request\n    self._send_request(method, url, body, headers, encode_chunked)\n  File \"/usr/lib/python3.8/http/client.py\", line 1302, in _send_request\n    self.endheaders(body, encode_chunked=encode_chunked)\n  File \"/usr/lib/python3.8/http/client.py\", line 1251, in endheaders\n    self._send_output(message_body, encode_chunked=encode_chunked)\n  File \"/usr/lib/python3.8/http/client.py\", line 1011, in _send_output\n    self.send(msg)\n  File \"/usr/lib/python3.8/http/client.py\", line 951, in send\n    self.connect()\n  File \"/usr/local/lib/python3.8/dist-packages/pyVmomi/SoapAdapter.py\", line 1039, in connect\n    http_client.HTTPSConnection.connect(self)\n  File \"/usr/lib/python3.8/http/client.py\", line 1418, in connect\n    super().connect()\n  File \"/usr/lib/python3.8/http/client.py\", line 922, in connect\n    self.sock = self._create_connection(\n  File \"/usr/lib/python3.8/socket.py\", line 808, in create_connection\n    raise err\n  File \"/usr/lib/python3.8/socket.py\", line 796, in create_connection\n    sock.connect(sa)\n",
  "invocation": {
    "module_args": {
      "validate_certs": false,
      "hostname": "esx1.yerelag.local",
      "username": "root",
      "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
      "state": "loaded",
      "src": "/tmp/configBundle-esx1.yerelag.local.tgz",
      "port": 443,
      "proxy_host": null,
      "proxy_port": null,
      "dest": null,
      "esxi_hostname": null
    }
  },
  "_ansible_no_log": false,
  "changed": false,
  "_ansible_delegated_vars": {
    "ansible_host": "192.168.1.241",
    "ansible_port": null,
    "ansible_user": "ozgur"
  }
}


ozgurmazlum avatar Apr 28 '22 21:04 ozgurmazlum

Files identified in the description: None

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot avatar Apr 28 '22 21:04 ansibullbot