Thursday, April 14, 2011

Troubleshooting IMA..

IMA Service Failure To Start

The Independent Management Architecture (IMA) service fails to start.


Cause:
There can be a number of reasons why the IMA Service appears not to have started, including the following:
  1. IMA Service load time
  2. IMA Service subsystem
  3. Missing Temp directory
  4. Print spooler service
  5. ODBC configuration
  6. Roaming Profile
  7. Another server with an identical NetBIOS name on the same network

IMA Service Load Time

If the Service Control Manager reports that the IMA Service could not be started, but the service eventually starts, ignore the error message. The Service Control Manager has a timeout of 6 minutes. The IMA Service can take longer than 6 minutes to start if the load on the database exceeds the capabilities of the database hardware or if the network has high-latency.

IMA Service Subsystem


  • Examine the following Windows Registry setting:
HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\IMA\Runtime\CurrentlyLoadingPlugin
If there is no value specified in the CurrentlyLoadingPlugin portion of the above Windows Registry entry, then either the IMA Service could not connect to the data store or the local host cache is missing or corrupt. 



  • If a CurrentlyLoadingPlugin value is specified, the IMA Service made a connection to the data store and the value displayed is the name of the IMA Service subsystem that failed to load.
  • Missing Temp Directory
If administrators see an “IMA Service Failed” error message with an error code of 2147483649 when starting the MetaFrame XP Presentation Server, the local system account may be missing a Temp directory which is required for the IMA Service to run. 


To gain further insight into the situation, change the IMA Service startup account to the local administrator and restart the server. If the IMA Service is successful in starting under the local administrator’s account, then the odds are greater that a missing Temp directory for the local system account is causing the situation. If the Temp directory is not present, then manually create one as %systemroot%\Temp. For example: C:\Winnt\Temp
Also, verify that the TMP and TEMP system environment variables point to the temporary directory. Restart the server to restart the IMA Service. 
Print Spooler Service

When the MetaFrame XP Presentation Server attempts to start the IMA Service, the “Setup Could Not Start The IMA Service” error message is displayed. This error shows that the IMA Service is not starting, possibly due to the print spooler service not running or being configured incorrectly. In addition, the following error messages appear in the Event Viewer: • Failed to load plugin MfPrintSs.dll with error 80000001h • Failed to load initial plugins with error 80000001h • The Independent Management Architecture service terminated with service-specific error The error occurs because the print spooler service: • Has stopped • Is disabled • Is not configured to run under the Local System AccountTo correct this error, verify that the print spooler service was started in the context of system rather than in the context of a user. A print spooler service that is not running or has been configured incorrectly may cause the printing subsystem to fail to load.To resolve the situation, stop and start the print spooler service, making sure that it is configured to run under the Local System Account. Then once again try to start the IMA Service.
 ODBC Configuration
1. Verify that the Microsoft SQL Server or Oracle server is online.2. Verify the name of the DSN file that the IMA Service is using by looking at the following key in the Windows Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\IMA\DataSourceName.3. Attempt to connect to the database using the DSN file with an ODBC test utility such as Oracle ODBC Test or SQL Server ODBC Test.4. Verify that the correct user name and password are being used for database connectivity.5. Change the user name and password using the DSMAINT CONFIG command, if needed.6. Enable ODBC Tracing for further troubleshooting.
Roaming Profile

When the MetaFrame XP Presentation Server attempts to start the IMA Service, the “Setup Could Not Start The IMA Service” error message is displayed. In the event viewer you might see the following error: IMA_RESULT_INVALID_MESSAGE or other events related to the IMA Service not being able to start. Verify the size of the roaming profile especially if it is crossing a WAN. Also watch for error messages related to not being able to load the profile. Test with a local user profile or one that is smaller in size. Another server with an identical NetBIOS name on the same network Verify that there is not another server on the network with the same NetBIOS name on the network. If the CurrentlyLoadingPlugin has the ImaLicSs.dll listed this might be an indication of this condition. Another symptom of ImaLicSs.dll is from the MetaFrame XP SP4 Readme:106. The IMA Service failed to start because of license group corruption in the data store. 
Note: This fix prevents corruption in the data store but it does not correct any corruption that may already exist. You need to check for corruptions present in the data store and correct them using the appropriate tools.  

More Information
  • 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

IMA Service Hangs In a Starting State 

Symptoms:
Sometimes Independent Management Architecture (IMA) service hangs in a start state. 
Causes:
There may be numerous reasons as to why this occurs.
Resolution:
  1. Recreate the LHC on the faulty server. CTX759510 - Function of the Local Host Cache on MetaFrame XP
  2. Check the data store for consistency. (DSCheck – Located on the Feature Release 3 Server CD or the Program Files\Citrix\system32 folder on the server.)
  3. Follow Q241215 to create a dump of the IMA service and have Technical Support investigate the output.
More Information
CTX105217 – IMA Service Hangs When Stopping
CTX105292 – Troubleshooting IMA Service Failure To Start



Function of the Local Host Cache


Each MetaFrame XP server stores a subset of the data store in the Local Host Cache (LHC). 


The LHC performs two primary functions: 

  • Permits a server to function in the absence of a connection to the data store. 
  • Improves performance by caching information used by ICA Clients for enumeration and application resolution. 


The LHC is an Access database, Imalhc.mdb, stored, by default, in the ProgramFiles%\Citrix\Independent Management Architecture folder. 


The following information is contained in the local host cache: 

  • All servers in the farm and some basic information. 
  • All applications published within the farm and their properties. 
  • All Windows network domain trust relationships within the farm. 
  • All information specific to itself. (product code, SNMP settings, licensing information) 
On the first startup of the member server, the LHC is populated with a subset of information from the data store. From then on, the IMA service is responsible for keeping the LHC synchronized with the data store. The IMA service performs this task through change notifications and periodic polling of the data store. If the data store is unreachable, the LHC contains enough information about the farm to allow normal operations for up to 96 hours on servers running SP2/FR2 or greater. On servers with no service pack or SP1/FR1, the grace period is 48 hours. During this grace period, the server continues to service requests while the IMA service attempts to connect to the data store periodically (based on the data store query interval). If the data store is unreachable for 96 hours, the licensing subsystem fails to verify licensing and the server stops taking incoming connections. 
Because the LHC holds a copy of the published applications and Windows domain trust relationships, ICA Client application enumeration requests can be resolved locally by the LHC. This provides a faster response to the ICA Client for application enumerations because the local server does not have to contact other member servers or the zone data collector. The member server must still contact the zone data collector for load management resolutions. 
In some instances it can be necessary to either refresh or recreate the local host cache. The sections below describe these situations. 


Refreshing the Local Host Cache 


If the IMA service is currently running but published applications do not appear correctly in ICA Client application browsing, force a manual refresh of the local host cache by executing dsmaint refreshlhc from a command prompt on the affected server. This action forces the local host cache to read all changes immediately from the data store. 
A discrepancy in the local host cache occurs only if the IMA service on a server misses a change event and is not synchronized correctly with the data store. 
Recreating the Local Host Cache 

If the IMA service does not start, the cause may be a corrupt LHC. Recreating the Local Host Cache after a minimum of SP1 has been installed:Important: The data store server must be available for dsmaint recreatelhc to work. If the data store is not available, the IMA service will fail to start.
  1. Stop the IMA service on the MetaFrame server, if it is started. This can be done via the command line, net stop imaservice, or from services. 
  2. Run dsmaint recreatelhc, which renames the existing LHC database, creates a new database and modifies the following registry key HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\IMA\Runtime\PSRequired key to 1. Setting the value PSRequired to 1 forces the server to establish communication with the datastore in order to populate the Local Host Cache database. When the IMA service is restarted, the LHC is recreated with the current data from the data store.
  3. Restart the IMA service. This can be done via the command line, net start imaservice, or from services.
OR 
To recreate the LHC database on servers that do not have a minimum of SP1 installed, follow these steps to manually recreate the LHC:Verify the data store is available before beginning this procedure. If the data store is not available, the IMA service fails to start until the data store is available.
  1. Stop the IMA service on the MetaFrame server, if it is started. This can be done via the command line, net stop imaservice, or from services. 
  2. Go to %ProgramFiles%\Citrix\Independent Management Architecture and rename the imalhc.mdb to imlhc.mdb.bak
  3. Launch the ODBC Data Source Administrator: 
  4. On Windows 2000, choose Control Panel > Administrative Tools > Data Sources (ODBC). 
  5. On TSE, choose Control Panel > ODBC Data Sources. Select the File DSN tab and browse to %ProgramFiles%\Citrix\Independent Management Architecture.
  6. Select the imalhc.dsn file and click Configure. 
  7. In the Database area, click Create. The New Database dialog box appears. 
  8. In the Database Name box, type the name imalhc.mdb for the new local host cache database. 
  9. Click OK to create the database, and then click OK to close the ODBC Data Source Administrator. 
  10. Open regedt32 and navigate to the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\IMA\RUNTIME and modify the value of PSRequired (REG_DWORD): 0x1 
  11. Restart the IMA service. This can be done via the command line, net start imaservice, or from services.
IMPORTANT: Restarting the IMA service instead of rebooting might cause the SNMP service to Dr. Watson if SNMP is enabled. 

No comments:

Post a Comment