PSM - 'PSMGenericClientWrapper error: Failed to load DLL <DLLname>' with custom connection component
Symptom
Using a custom PSM connection component, the following error appears:
Environment
11.1;11.2;11.3;11.4;11.5;11.6;11.7;12.2;12.6;13.0;13.2;14.0;14.2;14.6 Privileged Access Manager (PAM, self-hosted) Customized Component Custom connection Component, PSM 11.7+, Windows 2016 or newer
Cause
The following can cause this problem:
- The executable file is not complied correctly
- PSMDispatcherUtils.dll version does not match the current PSM version
- PSMconnect user and PSMshadowUsers group do not have the correct permission on CyberArk\PSM\Components folder
- PSM is attempting to use a DLL which is not allowed by AppLocker
- The PATH system variable has the C:\oracle\instantclient directory above the C:\Program Files (x86)\CyberArk\PSM\Components directory
Resolution
The following are possible fixes:
Recompile the .au3 file to executable
1. Use the installation file under PSM\Install\3rd Parties in PSM installation package to reinstall AutoIT.
2. Launch Aut2exe.exe from C:\Program Files (x86)\AutoIt3\Aut2Exe and convert the au3 script to executable file. Ensure "x64" and "Console?" boxes are unchecked
Verify DLL version
1. right click PSMDispatcherUtils.dll-->Properties-->Details to verify if the file version matches PSM version.
Correct permissions on PSMconnect and PSMShadowUsers
1. Ensure PSMconnect account and PSMshadowusers local user group have "Read & execute" , "List folder contents" and "Read" permissions on the CyberArk\PSM\Components folder
Configure AppLocker to allow the DLL to launch (v12.6+)
Ensure both of the Allowed DLLs sections in the PSMConfigureAppLocker.xml file have the following line:
<Libraries Name="ComponentsFolder" Type="Dll" Path="C:\Program Files (x86)\CyberArk\PSM\Components\*" Method="Path" />
Adjust DLL search order
1. Edit the PATH system environment variable under Control Panel --> System --> Advanced system settings --> Environment Variables --> System variables
2. Move the C:\oracle\instantclient folder just below the C:\Program Files (x86)\CyberArk\PSM\Components in the Path variable