vpshere connection connect.SmartConnect does not persist for longer than 15 min inactive time.

See original GitHub issue

@tianhao64 , @hartsock

This issue is an offshoot of Issue #194 and #294 -----

My environment consists of a SAN attached to ESX host.

I am currently using pyvmomi 6.0 with Python 2.7.10 -

This is how am trying to connect to the vsphere web client (As per #294,)

import ssl
connect.SmartConnect(protocol="https",
host=self.fqdn,
user=self.username,
pwd=self.password,
sslContext=ssl._create_unverified_context())

the Test does below -

  1. Clone “x” VMs and power them on , in a sequence. “x” is passed as an argument to the test.
  2. Perform IO from each cloned VM to a common datastore provided to test as an argument.
  3. Take Snapshots of each clones
  4. Stop IO. ( this Step happens on the client host and vsphere is inactive for more than 15mins usually)
  5. Power off VMS and delete them

I am consistently hitting failure in Step 5 , while trying to power off the first Vm. Typical stack trace looks like this -

File “/home/usr/banalas/139895/testSW/lib/ClientHostVMware.py”, line 682, in vmPowerOff dlog.debug("Powering off " + virtualMachine.name) File “/home/usr/banalas/139895/testSW/lib/pyVmomi/VmomiSupport.py”, line 560, in call return self.f(args, *kwargs) File “/home/usr/banalas/139895/testSW/lib/pyVmomi/VmomiSupport.py”, line 383, in _InvokeAccessor return self._stub.InvokeAccessor(self, info) File “/home/usr/banalas/139895/testSW/lib/pyVmomi/StubAdapterAccessorImpl.py”, line 47, in InvokeAccessor raise objectContent.missingSet[0].fault vim.fault.NotAuthenticated: (vim.fault.NotAuthenticated) { dynamicType = , dynamicProperty = (vmodl.DynamicProperty) [], msg = ‘’, faultCause = , faultMessage = (vmodl.LocalizableMessage) [], object = ‘vim.VirtualMachine:vm-1050’, privilegeId = ‘System.View’

I ve also seen pyvmomi/SoapAdapter.py having CONNECTION_POOL_IDLE_TIMEOUT_SEC =900 secs which is 15 mins.

Is this the reason for my consistent failure? Can I try using a new connection to the vsphere before the power off task? How do I ensure the vsphere connection instance can be tolerant of idle timeouts > 15 mins and not hit vim.fault.NotAuthenticated.

Please suggest how to resolve this issue.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:2
  • Comments:32 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
Huang-Jackcommented, Jan 5, 2017

Hi team, do you merge the fix to 6.5 version? I used the pyVmomi6.5 still the issue and found the timeout is 900s. CONNECTION_POOL_IDLE_TIMEOUT_SEC =900

0reactions
DavidDotacommented, Sep 3, 2018

@magianxd hello, if this way can keep session alive? what does it mean set CONNECTION_POOL_IDLE_TIMEOUT_SEC=0?

Read more comments on GitHub >

github_iconTop Results From Across the Web

vpshere connection connect.SmartConnect does not persist ...
vpshere connection connect.SmartConnect does not persist for longer than 15 min inactive time.
Read more >
Configure the vSphere Client Timeout Value - VMware Docs
In the Client Configuration pane, click Edit. The Edit client configuration dialog box appears. Enter a new value in minutes in the session ......
Read more >
Isilon OneFS 8.2.x Security Configuration Guide - Dell
The information is subject to change without notice. ... Persistence of security settings . ... Disable OneFS services that are not in use....
Read more >
How to Change or Disable Session Timeout in VMware ...
In current ESXi versions, a session is automatically terminated if a user has been inactive for more than 15 minutes. If you return...
Read more >
FortiConnect User Guide - Amazon AWS
The install can take around 2-3 minutes and may appear to pause at times. When the login prompt appears installation is complete. Installing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found