So.... Fixing the IMA Service. Anyone that has ever touched Citrix has had to deal with it. Usually the IMA Service runs for the most part. A few of the main reasons that it fails are:
- It's Friday night right before you are ready to go out
- It's Christmas Day and some Executive needs to access his Published Application
- It's your anniversary with your Wife
- You have plans to do anything outside of work
The problem that I see most, is that the LHC or Rade Cache gets corrupted and needs to be recreated. Either that, or the user account you used to create the ODBC connection had its password reset by your lovely SQL team.
There are many ways to resolve issues with the IMA Service not starting. Below are some of the things you can try:
Recreate Cache
- Recreate your Local Host Cache and Rade Cache
- Stop the IMA Service with ( It shouldn't be started ) "NET STOP IMAService"
- Recreate the LHC with "DSMAINT RECREATELHC"
- Recreate rade cache with "DSMAINT RECREATERADE"
- Start the IMA Service with "NET START IMAService"
- You can run all the commands at once via:
- NET STOP IMAService && DSMAINT RECREATELHC && DSMAINT RECREATERADE && NET START IMAService
Check ODBC Connection
- Run DSMAINT against the MF20.DSN
- Run the following command Dependent on OS Type
- DSMAINT CONFIG /user:contoso\ctx_db_svc /pwd:@w3som3n355 /dsn:"C:\Program Files\Citrix\Independent Management Architecture\MF20.dsn"
- DSMAINT CONFIG /user:contoso\ctx_db_svc /pwd:@w3som3n355 /dsn:"C:\Program Files (x86)\Citrix\Independent Management Architecture\MF20.dsn"
- If the "DSMAINT CONFIG" command is successful then you know your ODBC connection is working
Overwrite the IMA Directory
- Copy over the IMA directory from a known working server to the broken server
- The IMA directory is located at:
- "C:\Program Files\Citrix\Independent Management Architecture"
Check your LHC (Local Host Cache) a.k.a the Large Hadron Collider
- Verify LHC
- Run the following command to verify LHC
- DSMAINT VERIFYLHC
- If the LHC check fails, unlock the IMALHC.MDB
- To do this, copy over the IMALHC.LDB file from a know working server
- The IMALHC.LDB file is located in the IMA folder
- Recreate your LHC
- DSMAINT RECREATELHC
Clean the Data Store
- Run the following command from another server
- DSCHECK /CLEAN
Clear the IMA Runtime Key
- Clear out the folllowing Registry Key:
- HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\IMA\RUNTIME\CurrentlyLoadingPlugin
- Then Recreate your LHC
- Run DSMAINT CONFIG
- Start IMA Service
Check NTFS Permissions
- Verify that "Network Service User" has full access to:
- C:\ Program Files\Citrix\Independent Management Architecture
SQL Disk Space
- Verify that your SQL Server hasn't ran out of space for your Citrix DB
ICA Listener
- Recreate ICA Listener
SQL DB Triggers
- Delete the triggers from the KEYTABLE in the DB
- Right-click the KEYTABLE and select Design Table
- In the design table window, click the Triggers button
- From the Trigger properties window in the Name: drop-down box, deleteboth OnKeyTableDelete(dbo) and OnKeyTableInsertUpdate(dbo) triggers
Print Spooler
- Make sure that the Print Spooler Service is running
- Make sure the Print Spooler Service is running under the Local System Account
- Stop the Print Spooler Service
- Start the Print Spooler Service
- Start the IMA Service
Check MFCOM
- Run through the basic troubleshooting of your MFCOM Service via:
I'm sure there are probally many more resolutions, but the above are ones that I have ran into. If you know of other resolutions, please feel free to contact me @ smith.itpro@gmail.com , and I will add them.
Below are some of the errors that pertain to the above fixes:
The Independent Management Architecture service terminated with service-specific error 2147876886
The Independent Management Architecture service terminated with service-specific error 2147876922
The Independent Management Architecture service terminated with service-specific error 2147483649
The Independent Management Architecture service terminated with service-specific error 2147090410
CTX101917 – Error: Error: Windows could not start the Independent Management Architecture on Local Computer .. and refer to service-specific error code 2147483647
CTX105166 – IMA Service Hangs In a Starting State
CTX103015 – IMA Service Fails on MFPrintss.dll
CTX104200 – Could not start IMA Service in CTX_MF_IMA_StartIMAService
CTX103253 – Error: IMA service failed to start with error 2147483649 and failed to load plug-ins
CTX032712 – Error: IMA Service Error Message -2147483647
CTX101667 – IMA service failed on startup. Service specific error 2147483649
CTX103048 – IMA Service fails to start when a domain or local user is configured for logon
CTX101877 – Error: An error occurred while attempting to start the IMA Service.
CTX735338 – IMA failed to start with error code 2147483649