VAMI scheduled backup on vCenter Server failing with error: "Error in method invocation 'NoneType' object is not subscriptable"
search cancel

VAMI scheduled backup on vCenter Server failing with error: "Error in method invocation 'NoneType' object is not subscriptable"

book

Article ID: 417341

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • SFTP backup configuration failed with error "Error in method invocation 'NoneType' object is not subscriptable"
  • /var/log/vmware/applmgmt/applmgmt.log

    YYYY-MM-DDTHH:MM:SSZ PM CET [10583]DEBUG:plugins.SftpStorageIOLib:Passwordless ssh tunnel is not working, falling back to CURL
    YYYY-MM-DDTHH:MM:SSZ PM CET [10583]ERROR:plugins.FtpStorageIOLib:sftp cmd failed. RC: 5, Err: curl: (5) Could not resolve proxy: <Proxy Server Name>.internal
    , Cmd: ['/usr/bin/curl', '--fail', '-u', 'sftpuser:****', '--connect-timeout', '120', '--ssl-reqd', '-k', '--proxy', 'http://<Proxy Server Name>.internal:8080/', '--proxytunnel', '--silent', '--show-error', '--list-only', 'sftp:<IP of SFTP server>
    3/backup/']
    YYYY-MM-DDTHH:MM:SSZ PM CET [10583]ERROR:vmware.vapi.provider.local:Error in invoking com.vmware.appliance.recovery.backup.schedules in create - 'NoneType' object is not subscriptable
    Traceback (most recent call last):
      File "/usr/lib/applmgmt/backup_restore/py/vmware/appliance/backup_restore/schedule_impl.py", line 120, in _validateRemoteLocation
        dispatch.storageIO.dir_exists()
      File "/usr/lib/applmgmt/backup_restore/py/vmware/appliance/backup_restore/plugins/FtpStorageIOLib.py", line 222, in dir_exists
        self._process_curl_output(cmd_res)
      File "/usr/lib/applmgmt/backup_restore/py/vmware/appliance/backup_restore/plugins/FtpStorageIOLib.py", line 152, in _process_curl_output
        raise PluginError(
    plugins.StorageIOErrorsLib.PluginError: Plugin error occurred. ErrCode: 10, Args: ()

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/usr/lib/applmgmt/vapi/lib/vapi_runtime-2.100.0-py2.py3-none-any.whl/vmware/vapi/provider/local.py", line 277, in invoke
        method_result = self._invoke_int(
      File "/usr/lib/applmgmt/vapi/lib/vapi_runtime-2.100.0-py2.py3-none-any.whl/vmware/vapi/provider/local.py", line 249, in _invoke_int
        method_result = iface.invoke(ctx, method_id, input_value)
      File "/usr/lib/applmgmt/vapi/lib/vapi_runtime-2.100.0-py2.py3-none-any.whl/vmware/vapi/bindings/skeleton.py", line 371, in invoke
        meth_output = method(**meth_args)
      File "/usr/lib/applmgmt/base/py/vmware/vherd/base/thread_utils.py", line 43, in wrapper
        return sync_call_from_thread(func, *args, **kw)
      File "/usr/lib/applmgmt/base/py/vmware/vherd/base/thread_utils.py", line 13, in sync_call_from_thread
        return threads.blockingCallFromThread(reactor, func, *args, **kw)
      File "/usr/lib/python3.10/site-packages/twisted/internet/threads.py", line 122, in blockingCallFromThread
        result.raiseException()
      File "/usr/lib/python3.10/site-packages/twisted/python/failure.py", line 488, in raiseException
        raise self.value.with_traceback(self.tb)
    TypeError: 'NoneType' object is not subscriptable

Environment

VMware vCenter Server 8.x

Cause

This issue is due to an proxy configured on vCenter which is not resolving and failed to connect to SFTP backup server.

Resolution

  • Once removed the proxy which is not configured correctly and backup succeeded through VAMI.  
  • If you need to use the proxy, configure it properly on vCenter.