ERROR (Thread-613) [vIDM_hostname] com.vmware.horizon.restapi.manager.exception.mapper.AbstractExceptionMapper - Exception while handling jersey request
org.hibernate.NonUniqueResultException: query did not return a unique result: 2
This issue occurs when more than one vIDM appliance is associated to sync the Active Directory domain. Only one vIDM appliance can be associated to an Active Directory configuration for sync
To resolve this issue, we will need to remove one of the vIDM appliances from the Active Directory sync configuration from the vIDM database
Ensure a valid snapshot is taken of each vIDM appliance prior to performing the steps below
1. Login to the vIDM primary node via SSH as root
2. Get the Postgres DB Password with the following command:
cat /usr/local/horizon/conf/db.pwd
3. Login to the Postgres DB with the following command. Enter password from Step 2 if prompted.
psql -U horizon saas
4. Run the following command to verify two of the vIDM appliances show 'True' for the Active Directory domain in question for the column 'isDirectorySyncEnabled'
Select * from "Connector";
5. Remove the 'isDirectorySyncEnabled' flag from True to False for one of the vIDM appliances with the following command
Update "Connector" Set "isDirectorySyncEnabled"='False' Where "id"=####;
Note - Change the id value to match your environment details from step 4
6. Exit the Postgres database
\q
7. Login to the vIDM admin UI and ensure you can successfully sync Active Directory once again