the error "can not connect to vcenter " occured frequency!!!!

Open
#594 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

Start with vm_service/tasks.py at schedule_update_vms_state and vm_service/vSphere_client.py at get_vm_resource and _connect_vcenter, then trace the pyVim SmartConnect call shown in the traceback. Reproduce the vCenter connection failure and determine why the empty DataObject exception occurs; done means the cause and a verified resolution are documented.

Written by the indexing model from the issue text.

Description

needs verification

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 240, in trace_task
R = retval = fun(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/celery/app/trace.py", line 438, in protected_call
return self.run(*args, **kwargs)
File "/var/www/vm-service/trunk/vm_service/tasks.py", line 864, in schedule_update_vms_state
vm_resource = vc.get_vm_resource(vm.name)
File "/var/www/vm-service/trunk/vm_service/vSphere_client.py", line 1503, in get_vm_resource
content, error_code, error_msg = self._connect_vcenter()
File "/var/www/vm-service/trunk/vm_service/vSphere_client.py", line 65, in _connect_vcenter
port=self.port)
File "build/bdist.linux-x86_64/egg/pyVim/connect.py", line 590, in SmartConnect
File "build/bdist.linux-x86_64/egg/pyVim/connect.py", line 234, in Connect
File "build/bdist.linux-x86_64/egg/pyVim/connect.py", line 319, in __Login
File "build/bdist.linux-x86_64/egg/pyVim/connect.py", line 307, in __Login
File "build/bdist.linux-x86_64/egg/pyVmomi/VmomiSupport.py", line 566, in
File "build/bdist.linux-x86_64/egg/pyVmomi/VmomiSupport.py", line 375, in _InvokeMethod
File "build/bdist.linux-x86_64/egg/pyVmomi/SoapAdapter.py", line 1304, in InvokeMethod
Exception: (DataObject) {

}
^C

Dominant language
Python
Stars
2.3k
Forks
763
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vmware/pyvmomi

All issues in vmware/pyvmomi

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.