virt-who error - Virt backend 'config' fails with exception:#012ReadTimeout: HTTPSConnectionPool

Solution Verified - Updated

Environment

  • Red Hat Satellite 6
  • RHEL

Issue

  • How to increase the time-out in virt-who when is waiting to get response from vCenter ?
    Timeout error and virt-who is not updating hosts-to-guests mapping:

     2017-06-11 08:16:42,218 [virtwho.config DEBUG] esx(21182):MainThread @esx.py:_prepare:58 - Creating ESX event filter
     2017-06-11 08:16:42,218 [virtwho.config DEBUG] esx(21182):MainThread @esx.py:_run:102 - Wait for ESX event finished, timeout
     :
    
  • Restarting virt-who service shows:

     2017-06-11 08:20:50,123 [virtwho.config ERROR] esx(19763):MainThread @virt.py:run:379 - Virt backend 'config' fails with exception:
     Traceback (most recent call last):
       File "/usr/lib/python2.7/site-packages/virtwho/virt/virt.py", line 372, in run
         self._run()
       File "/usr/lib/python2.7/site-packages/virtwho/virt/esx/esx.py", line 175, in _run
         options=options)
       File "/usr/lib/python2.7/site-packages/suds/client.py", line 542, in __call__
         return client.invoke(args, kwargs)
       File "/usr/lib/python2.7/site-packages/suds/client.py", line 602, in invoke
         result = self.send(soapenv)
       File "/usr/lib/python2.7/site-packages/suds/client.py", line 641, in send
         reply = transport.send(request)
       File "/usr/lib/python2.7/site-packages/virtwho/virt/esx/esx.py", line 96, in send
         verify=False
       File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 507, in post
         return self.request('POST', url, data=data, json=json, **kwargs)
       File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 464, in request
         resp = self.send(prep, **send_kwargs)
       File "/usr/lib/python2.7/site-packages/requests/sessions.py", line 576, in send
         r = adapter.send(request, **kwargs)
      File "/usr/lib/python2.7/site-packages/requests/adapters.py", line 433, in send
         raise ReadTimeout(e, request=request)
     ReadTimeout: HTTPSConnectionPool(host='192.168.XXX.XX', port=443): Read timed out. (read timeout=60)
    

Resolution

  • An Enhancement Request is filed to adjust the timeout to get response from vCenter under This content is not included.Bugzilla

  • The timeout is hard-coded at /usr/lib/python2.7/site-packages/virtwho/virt/esx/esx.py with timeout=60 seconds.
    As a workaround this value can be adjusted from "60" to "120" or "180" to give virt-who enough interval before timeout.

For more KB articles/solutions related to Virt-who and Virtual Datacenter (VDC) Subscriptions Issues, please refer to the Consolidated Troubleshooting Article for Virt-who and Virtual Datacenter (VDC) Subscriptions Issues

Root Cause

  • In a large vCenter environment, (for example; 250 esxi hosts and 4-5000 VMs across 5 vcenters),
    enough time interval needs to be assigned than the default value before virt-who timeout.
SBR
Product(s)
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.