ePolicy Orchestrator clean installation or upgrade fails when using either of the SQL options AlwaysOn or SQL mirroring

ePolicy Orchestrator clean installation or upgrade fails when using either of the SQL options AlwaysOn or SQL mirroring

Environment
McAfee ePolicy Orchestrator (ePO) 5.x
Microsoft SQL Server

Problem

ePO upgrades or a fresh installation fail on servers that use either of the following SQL options:
  • AlwaysOn
  • SQL mirroring
The following error displays after you enter the details for the SQL server:
 
The sql server TCP port does not match the selected database server. Correct the problem and try again
 
EPO-CommonSetup.Log records the following:
 
20151027103137 Passed function validSQLCollation
20151027103137 Server = [Server_Name1]  Instance = [Instance_name1]
20151027103137 Retrieved the SQL Server with Instance Name as: [Server_Name2\Instance_name1]
20151027103137 NetBIOS server name is Server_Name1
20151027103137 Server names DO NOT MATCH so block the install.
Servername from SQL server  : [Server_Name1\Instance_name1]
Servername from installer   : [
Server_Name2\Instance_name1]
20151027103137 Failed in validSQLInstance with error code
 
EPO-Install-MSI.LOG records the following:

 

              MSI (c) (28:CC) [10:31:36:375]: Invoking remote custom action. DLL: C:\Users\SVCEPO\AppData\Local\Temp\MSI90E2.tmp, Entrypoint: f34
              Action ended 10:32:23: Prod_UI_ValidateDBServerInfo. Return value 1.
              MSI (c) (28:20) [10:32:23:364]: PROPERTY CHANGE: Adding DontShowPortErrors property. Its value is '1'.
              MSI (c) (28:20) [10:32:23:364]: PROPERTY CHANGE: Deleting DontShowPortErrors property. Its current value is '1'.
              MSI (c) (28:20) [10:32:30:868]: PROPERTY CHANGE: Modifying MFSDATABASESERVERNAME property. Its current value is 'Server_Name2'. Its new value: 'Instance_name1'.
              MSI (c) (28:20) [10:32:30:961]: Doing action: ConvertDBInfoDialogToUnicodeEscaped
              Action 10:32:30: ConvertDBInfoDialogToUnicodeEscaped.
              Action start 10:32:30: ConvertDBInfoDialogToUnicodeEscaped.
              MSI (c) (28:80) [10:32:30:961]: Invoking remote custom action. DLL: C:\Users\SVCEPO\AppData\Local\Temp\MSI661C.tmp, Entrypoint: ConvertDBInfoDialogToUnicodeEscaped
              Action ended 10:32:30: ConvertDBInfoDialogToUnicodeEscaped. Return value 1.
              MSI (c) (28:20) [10:32:30:977]: Doing action: Prod_UI_ValidateDBServerInfo
              Action 10:32:30: Prod_UI_ValidateDBServerInfo.
              Action start 10:32:30: Prod_UI_ValidateDBServerInfo.
              MSI (c) (28:80) [10:32:30:977]: Invoking remote custom action. DLL: C:\Users\SVCEPO\AppData\Local\Temp\MSI662C.tmp, Entrypoint: f34
              Action ended 10:32:32: Prod_UI_ValidateDBServerInfo. Return value 1.
              MSI (c) (28:20) [10:32:32:677]: PROPERTY CHANGE: Adding DontShowPortErrors property. Its value is '1'.
              MSI (c) (28:20) [10:32:32:677]: PROPERTY CHANGE: Deleting DontShowPortErrors property. Its current value is '1'.
              MSI (c) (28:20) [10:32:37:295]: PROPERTY CHANGE: Modifying MFSDATABASESERVERNAME property. Its current value is 'Server_Name1'. Its new value: 'Instance_name1'.
             
MSI (c) (28:20) [10:32:37:357]: Doing action: ConvertDBInfoDialogToUnicodeEscaped

The core-install.log, core-patch.log, or core-upgrade.log (depending on the installation scenario) may include the following message or similar:
 
BUILD FAILED

E:\Program Files\McAfee\ePolicy Orchestrator\Installer\core\build.xml:1116: java.sql.SQLException: The operation cannot be performed on database "Name of database" because it is involved in a database mirroring session or an availability group. Some operations are not allowed on a database that is participating in a database mirroring session or in an availability group.

Cause

In some cases, using either of these SQL options can cause the ePO installation/upgrade to fail to identify the correct SQL instance in use.
 

Solution

Disable these SQL features before you perform the installation/upgrade. You can safely re-enable these features after the installation/upgrade has completed successfully.
 
To learn more about these features, see:
  • KB83860 - ePolicy Orchestrator Sustaining Statement (SBC1410101) - ePO and SQL AlwaysOn feature
  • KB74034 - Product Management Statement for ePO support for SQL mirroring

Workaround

Alternatively, the upgrade may work successfully when using the IGNOREVALIDATIONERRORS switch during the upgrade, but it is still necessary to disable the SQL mirror during the upgrade:
 
  1. Leave the availability group in place.
  2. Disable SQL mirroring for the ePO database.
  3. Leave <ePO installation directory>\Server\conf\orion\db.properties pointing to the availability group or virtual name.
  4. Run the ePO upgrade with the IGNOREVALIDATIONERRORS=1 switch using the following command:
     
    "<ePO installation files directory>\setup.exe" IGNOREVALIDATIONERRORS=1
  5. Enable SQL mirroring for the ePO database. SQL should handle replicating any changes made to the database during the upgrade.
If this does not work, it may be necessary to disable the SQL availability group as well, and then point ePO to the physical SQL server name per the Solution.