Error: pgsql\bin\pg_ctl.exe does not exist or is being used by another program
Last updated on:Issue description
When starting ADManager Plus, the application fails to launch and displays an error indicating that pg_ctl.exe is missing or in use. This prevents the internal PostgreSQL database from starting, resulting in a complete startup failure of the product.
Possible causes
- Executable missing or quarantined: pg_ctl.exe may have been removed or isolated by antivirus software or deleted accidentally.
- File in use: Another process (e.g., postgres.exe, wrapper.exe, or java.exe) may be locking the file.
- Port conflict: The default PostgreSQL port (33306) may be in use by another application.
- Antivirus/endpoint security interference: Security tools may block access to PostgreSQL components.
- Permission issues: The ADManager Plus service account may lack the required permissions to access the installation directory.
Prerequisites
- Administrator privileges on the machine
- Access to antivirus or endpoint protection settings
- Knowledge of the ADManager Plus installation path
- Ability to identify and terminate background processes using Task Manager
Resolution
Step 1: Terminate conflicting processes
- Open the Command Prompt and navigate to the ADManager Plus \bin directory.Example: cd C:\ManageEngine\ADManager Plus\bin
- Run the following commands to stop database-related services:
- stopDB.bat
- stopADSM.bat
- Open Task Manager and go to the Details tab and add the Image Path Name column.
- End any processes from the ADManager Plus installation folder, such as:
- wrapper.exe
- postgres.exe
- java.exe
Step 2: Check for port conflicts
- Open the Command Prompt as an admin and run:
netstat -aon | findstr :33306
- Note the PID using the port.
- Locate the process in Task Manager and terminate it if it's unrelated to ADManager Plus.
Step 3: Add antivirus exclusions
Add these paths to your antivirus or endpoint protection exclusion list:
- \ADManager Plus\pgsql
- \ADManager Plus\bin
- \ADManager Plus\server
Restart both the antivirus software and the server after applying exclusions.
Step 4: Check and fix folder permissions
- Open Services.msc, locate ManageEngine ADManager Plus, and go to Properties > Log On.
- Ensure the configured service account has Full Control over the ADManager Plus directory.
- If running under the Local System Account, ensure your logged-in user also has Full Control on the installation folder.
Step 5: Start ADManager Plus
- In Services.msc, right-click ManageEngine ADManager Plus.
- Click Start to restart the application.
Tips
- Always verify antivirus interference by temporarily disabling or switching to silent mode.
- Schedule PostgreSQL exclusions before upgrades to avoid false-positive quarantines.
- Please reach out to support if pg_ctl.exe is permanently missing and cannot be restored.
How to reach support
If the issue persists, contact our support team here.