vsanmetrics icon indicating copy to clipboard operation
vsanmetrics copied to clipboard

TypeError: 'int' object is not iterable

Open vidkun opened this issue 6 years ago • 3 comments

Script fails to collect any metrics via telegraf config or manual execution. I've tried with all three (performance, capacity, and health) together and all three individually. Each time gives the same error below for each of the three categories. Every error ends with the same TypeError.

This is against a 6.7U1 cluster with the same sdk version. Latest versions of all pip modules. Python 2.7.5 on RHEL7. Got the same behavior on Python 2.7.13 as well.

[root@system vsanmetrics]# ./vsanmetrics.py -s vcenter.example.com -u "[email protected]" -p secret -c My_Cluster --performance
Process Process-1:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "./vsanmetrics.py", line 539, in getPerformance
    si, _, cluster_obj = connectvCenter(args, context)
TypeError: 'int' object is not iterable

vidkun avatar Jan 21 '19 14:01 vidkun

HEllo @vidkun Thanks for your feedback.

The error message is not very useful here but as far as know, it's certainly related to an authentication issue... Could you double check the informations you provide when calling the script ?

equelin avatar Mar 05 '19 14:03 equelin

Thanks. Got past that. For some reason it didn't like some of special characters in the user's password.

Now it pulls back a handful of metrics and then dies with:

Process Process-2:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "./vsanmetrics.py", line 650, in getPerformance
    except vmodl.fault.NotFound as e:
  File "/usr/lib/python2.7/site-packages/pyVmomi/VmomiSupport.py", line 263, in __getattr__
    raise AttributeError(attr)
AttributeError: NotFound

vidkun avatar Mar 13 '19 17:03 vidkun

Similar problem here with vcenter 6.7 update3

Process Process-2: Traceback (most recent call last): File "/usr/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap self.run() File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run self._target(*self._args, **self._kwargs) File "/opt/vsanmetrics/vsanmetrics.py", line 650, in getPerformance except vmodl.fault.NotFound as e: File "/usr/local/lib/python2.7/dist-packages/pyVmomi/VmomiSupport.py", line 262, in getattr raise AttributeError(attr) AttributeError: NotFound

eschek87 avatar Oct 10 '19 09:10 eschek87