unable to install telegraf due to system error: [WinError 32] The process cannot access the file because it is being used by another process
search cancel

unable to install telegraf due to system error: [WinError 32] The process cannot access the file because it is being used by another process

book

Article ID: 383686

calendar_today

Updated On:

Products

VMware Aria Suite VMware Aria Operations 8.x

Issue/Introduction

  • This article addresses the issue where Telegraf installation fails on a Windows VM in VMware Aria Operations 8.X with the error message:

    unable to install telegraf due to system error: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\VMware\\UCP\\ucp-telegraf\\PluginErrorDetails.log'


  • The C:\Users\Administrator\AppData\Local\Temp\vmware-Administrator\VMware-UCP_Bootstrap_Scriptsvmware<int>\uaf_bootstrap.log indicated following
       

    >>>ERROR - config-utils - Telegraf installation failed for windows
    >>>INFO - config-utils - ============ In install_telegraf_windows self.stage_err_mesg = unable to install telegraf due to system error: [WinError 32] The process cannot access the file because it is being used
    by another process: 'C:\\VMware\\UCP\\ucp-telegraf\\PluginErrorDetails.log'
    Traceback (most recent call last):
      File "C:\VMware\arc_install_tmp_dir\config-utils.py", line 1075, in install_telegraf_windows
        shutil.rmtree(self.telegraf_install_dir)
      File "C:\VMware\UCP\salt\bin\lib\shutil.py", line 740, in rmtree
        return _rmtree_unsafe(path, onerror)
      File "C:\VMware\UCP\salt\bin\lib\shutil.py", line 618, in _rmtree_unsafe
        onerror(os.unlink, fullname, sys.exc_info())
      File "C:\VMware\UCP\salt\bin\lib\shutil.py", line 616, in _rmtree_unsafe
        os.unlink(fullname)

    PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\VMware\\UCP\\ucp-telegraf\\PluginErrorDetails.log'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "C:\VMware\arc_install_tmp_dir\config-utils.py", line 1155, in install_telegraf
        ret, cmd = self.install_telegraf_windows()
      File "C:\VMware\arc_install_tmp_dir\config-utils.py", line 1086, in install_telegraf_windows
        raise Exception(str(e))
    Exception: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\VMware\\UCP\\ucp-telegraf\\PluginErrorDetails.log'
    >>>ERROR - config-utils - None
    >>>INFO - config-utils - Stage action run info - action=install_telegraf; ret=False; stage_status=FAILED
    >>>INFO - config-utils - ==== err_mesg = unable to install telegraf due to system error: [WinError 32] The process cannot access the file because it is being used by another process:
    'C:\\VMware\\UCP\\ucp-telegraf\\PluginErrorDetails.log', stage_status = Failed to Install telegraf. null [unable to install telegraf due to system error: [WinError 32] The process cannot access the file because it is being used by
    another process: 'C:\\VMware\\UCP\\ucp-telegraf\\PluginErrorDetails.log'].Verify Agent installation log for more details.
    >>>INFO - config-utils - Stage_status: FAILED, Stage_mesg: ['install', 'reinstall', '15', 'FAILED', "Failed to Install telegraf. null [unable to install telegraf due to system error: [WinError 32] The process
    cannot access the file because it is being used by another process: 'C:\\\\VMware\\\\UCP\\\\ucp-telegraf\\\\PluginErrorDetails.log'].Verify Agent installation log for more details."]
    >>>INFO - config-utils - Sending Bpp status mesg ['install', 'reinstall', '15', 'FAILED', "Failed to Install telegraf. null [unable to install telegraf due to system error: [WinError 32] The process cannot
    access the file because it is being used by another process: 'C:\\\\VMware\\\\UCP\\\\ucp-telegraf\\\\PluginErrorDetails.log'].Verify Agent installation log for more details."]
    >>>INFO - config-utils - Content = [['install', 'reinstall', '15', 'FAILED', "Failed to Install telegraf. null [unable to install telegraf due to system error: [WinError 32] The process cannot access the file
    because it is being used by another process: 'C:\\\\VMware\\\\UCP\\\\ucp-telegraf\\\\PluginErrorDetails.log'].Verify Agent installation log for more details."]]
    >>>INFO - config-utils - data: {'status': 'FAILED', 'totalstages': 17, 'currentstage': 15, 'action': 'install', 'job': 'install', 'data': [{'stage': '15', 'status': 'FAILED', 'message': "Failed to Install
    telegraf. null [unable to install telegraf due to system error: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\\\VMware\\\\UCP\\\\ucp-telegraf\\\\PluginErrorDetails.log'].Verify Agent
    installation log for more details."}], 'vc_uuid': '_', 'vm_mor': 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee', 'requestId': 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee', 'ts': 123456789}
    >>>INFO - config-utils - Sent metrics to the path https://FQDN-Cloud-Proxy/arc/control. resp = 202
    >>>INFO - config-utils - stage_status: FAILED, stage_mesg: ['install', 'reinstall', '15', 'FAILED', "Failed to Install telegraf. null [unable to install telegraf due to system error: [WinError 32] The process
    cannot access the file because it is being used by another process: 'C:\\\\VMware\\\\UCP\\\\ucp-telegraf\\\\PluginErrorDetails.log'].Verify Agent installation log for more details."]

Environment

VMware Aria Operations: 8.X

Cause

The error occurs because a file (PluginErrorDetails.log) in the C:\VMware\UCP\ucp-telegraf directory is locked by another process. The installer cannot delete or modify the file, resulting in a failure during the installation process.

Resolution

To resolve the issue, manually terminate the processes or restart the computer.

If the C:\VMware\UCP\telegraf directory is present, delete it.

After that, reinstall the agent.