VMware {code} Community
ikrolo
Contributor
Contributor

queryPerf() returns null when querying multiple hosts at once. Get "The session is not authenticated" exception

I recently started seeing this behaviour on our vCenter 4.0 (build 208111).

We do perf gathering in a multi-threaded way, split by host systems. Our observations seem to indicate that queryPerf() returns null when two hosts (threads) are being queried for perf data at the same time.

If we connect to the host systems that are attached to the vCenter and run simultaneous queryPerfs (using the same code/clases), we never run into this issue. We also have another thread that listens to updates from the property collector, and having that running or not doesn't seem to affect the outcome. Also, connecting to a virtual center running on v2.5 doesn't exhibit this behaviour. I have tried using the same session and that did not seem to resolve the issue.

I believe the solution listed for case 260498 when encountering this behaviour does not apply for us. That solution talks about querying each host directly as the metric IDs do not fit into an integer when querying the VC, but I have looked at each of the metric IDs that come back from the list of available IDs and none of them overflow. Also, the queryPerf() seems to be failing irratically, so sometimes CPU metrics fail and other times it's the Disk metrics that fail (while CPUs are successful) etc., so I don't belive it's a metrics ID issue for us.

Any insight would be appreciated. Thanks

0 Kudos
4 Replies
ikrolo
Contributor
Contributor

Anybody able to help?

0 Kudos
monisiqbal
Enthusiast
Enthusiast

I doubt that I too am observing similar behavior, but my queryPerf() does not entirely returns null, rather the result PerfEntityMetric contains the PerfSampleInfo[] but has null PerfMetricSeries[] (values). Is this same error as yours or you are getting null for the whole object (PerfEntityMetric)? I'm not certain at this point because it could be a blunder at my end too.

0 Kudos
ikrolo
Contributor
Contributor

No, for my case it's the whole object that comes back null. 😮

0 Kudos
ikrolo
Contributor
Contributor

Actually figured out that there's an Axis NotAuthenticated fault where the "The session is not authenticated". However, this happens only sporatically and I'm sharing the same connection to the virtual center, and right after it happens there are threads that successfully connect and retrieve data (ie: I don't have to reconnect after receiving this error), so I'm not sure why that's happening.

Please help! Smiley Happy I've been struggling with this for weeks!

0 Kudos