After renaming the fully qualified domain name (FQDN) and NetBIOS name of Active Directory (AD), or after the change of domain administrator user password, or after moving the VM hosting the database server to another machine, the Citrix’s datastore, the Citrix AppCenter or Citrix Delivery Services Console on Citrix XenApp Server and Citrix Presentation Server, the discovery of Citrix XenApp Farm may fail with the following error message:

Error occurred when using server_name in the discovery process.

With the details as:

The RPC server cannot be contacted. Check that the server name is correct, that the server is on, that Citrix XenApp is installed on this server, and that the Citrix MFCOM Service is running.

Or,

An unexpected error occurred. Check that the server name is correct, that the server is on, that Citrix XenApp is installed on this server, and that the Citrix MFCOM Service is running.

Citrix Error Occurred During Discovery Process

In Windows Server’s Event Viewer, several entries are logged even though the services related to Citrix XenApp are starting up fine.

Log Name: System
Source: IMAService
Event ID: 3898
Level: Error

Citrix XenApp failed to connect to the Data Store. ODBC error while connecting to the database: 37000 -> [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database “MF20” requested by the login. The login failed.

Citrix XenApp Event ID 3989

Log Name: System
Source: IMAService
Event ID: 3889
Level: Error

Citrix XenApp failed to connect to the Data Store. ODBC error while connecting to the database: 28000 -> [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.

Log Name: System
Source: IMAService
Event ID: 3615
Level: Error

The server running Citrix XenApp failed to connect to the Data Store. Error – IMA_RESULT_FAILURE. An unknown failure occurred while connecting to the database.

Citrix Event ID 3615

Log Name: System
Source: IMAService
Event ID: 3612
Level: Error

The server running Citrix XenApp failed to connect to the Data Store. Error – IMA_RESULT_ACCESS_DENIED. Please make sure they are correct. If not, use DSMAINT CONFIG to change them.

Log Name: System
Source: IMAService
Event ID: 3636
Level: Error

The server running Citrix XenApp failed to connect to the data store. An unknown failure occurred while connecting to the database. Error – IMA_RESULT_FAILURE Indirect: 0 Server:DSN file: C:\Program Files (x86)\Citrix\Independent Management Architecture\mf20.dsn.

Citrix XenApp Event ID 3636

Log Name: System
Source: IMAService
Event ID: 3632
Level: Error

The server running Citrix XenApp failed to connect to the data store. Invalid database user name or password. Please make sure they are correct. If not, use DSMAINT CONFIG to change them. Error – IMA_RESULT_ACCESS_DENIED Indirect: 0 Server:DSN file: C:\Program Files (x86)\Citrix\Independent Management Architecture\mf20.dsn.

Log Name: Application
Source: MSSQL$CITRIX_METAFRAME
Event ID: 18456
Level: Information

Login failed for user ‘NT AUTHORITY\NETWORK SERVICE’. Reason: Failed to open the explicitly specified database. [CLIENT: 172.168.1.10].

Login Failed for User 'NT AUTHORITY\NETWORK SERVICE

Resolution

All the issues are caused by corrupted or invalid user credentials used by Citrix IMA to connect to the database. To fix the issue, use DSMAINT utility to update the configuration parameters used by Citrix to connect to the data store.

The command syntax is:

DSMAINT CONFIG /user:domain\user_name /pwd:password

Replace the domain, user_name and password with the valid values. For example:

DSMAINT CONFIG /user:TECHJOURNEY\Administrator /pwd:DomainAdminPassword

You should see something like below that indicates everything is successful:

Calling IMASetPSPassword
Attempting to connect to the data store with new configuration settings.
Successfully connected to the data store.
Configuration successfully changed.
Please restart the IMA Service for changes to take effect.

DSMAINT CONFIG

After running the command, restart IMA Service (Citrix Independent Management Architecture) for changes to take effect.

Restart Citrix IMA Service
Restart Citrix IMA Service
Restart also the related Citrix services if prompted.

Then, the Citrix AppCenter or Citrix Delivery Services Console will be able to connect to data store for discovery to be successful.