vSAN1

 View Only

getting vim.fault.NotAuthenticated after session idel timeout

  • 1.  getting vim.fault.NotAuthenticated after session idel timeout

    Posted Apr 16, 2024 01:51 PM

    We have nested vSAN 8.0 configured, and we are using vSAN file services to manage file share snapshot operations. 
    consumming pyvmomi==8.0.0.1.2 and vSAN Python bindings like vsanmgmtObjects.py and vsanapiutils.py

    creating sessions with:

    service_instance = connect.SmartConnect(host=vcenter_host, 
                                            user=vcenter_username, 
                                            pwd=vcenter_password, 
                                            sslContext=context)

     

    getting below error after 2 hours or session idle time out.

    (vim.fault.NotAuthenticated) {
        dynamicType = <unset>,
        dynamicProperty = (vmodl.DynamicProperty) [],
        msg = 'The session is not authenticated.',
        faultCause = <unset>,
        faultMessage = (vmodl.LocalizableMessage) [],
        object = 'vim.ClusterComputeResource:domain-c67',
        privilegeId = 'System.Read',
        missingPrivileges = (vim.fault.NoPermission.EntityPrivileges) []
     }

     

    After idle time out, I recreated the session and triggered multiple requests for creating file share snapshots using a multi-threaded environment. 
    Observing the above error message, the very strange thing is that snapshots are getting created on the vSAN cluster.

    Anyone observed this kind of behaviour earlier with pyvmomi and vSAN Python bindings?
    Are pyvmomi and vSAN Python bindings thread-safe?