[THIN] KB: CTX113846 - Case Study: CHFARM error: "Licensing DB Initializing error, an error occurred while initializing the Citrix Licensing Database"

  • From: "Jim Kenzig ThinHelp.com" <jkenzig@xxxxxxxxx>
  • To: THIN <thin@xxxxxxxxxxxxx>
  • Date: Sun, 26 Aug 2007 11:39:21 -0400

CTX113846 - Case Study: CHFARM error: "Licensing DB Initializing error, an
error occurred while initializing the Citrix Licensing Database"

This document was published at: http://support.citrix.com/article/CTX113846

Document ID: *CTX113846*, Created on: Aug 23, 2007, Updated: Aug 23, 2007

Products: Citrix MetaFrame XP 1.0 for Microsoft Windows 2000, Citrix
MetaFrame XP 1.0 for Microsoft Windows 2003


*Problem Definition*

You cannot join any new servers to a MetaFrame XP server farm.

The following error messages appear during the chfarm process:

"IMA Service error, an error occurred while attempting to start the IMA
service" and "Licensing DB Initializing error, an error occurred while
initializing the Citrix Licensing Database"

"Change farm error, Farm membership was changed but with error, the server
may not have been successfully moved to another farm"

The following events appear in the Event Log:

Event ID 3615: The Citrix MetaFrame XP Server failed to connect to the Data
Store. Error - IMA_RESULT_FAILURE An unknown failure occurred while
connecting to the database.

Event ID 3609: The Citrix MetaFrame XP Server failed to connect to the Data
Store. Error - IMA_RESULT_FAILURE An unknown failure occurred while
connecting to the database.

However, the server has not joined the farm. In fact, IMA crashes during the
installation.

*Troubleshooting Methodology*

A licensing issue was suspected due to the error message referring to the
licensing database.

We created a new test farm on the Oracle data store and the server was able
to join this test farm .This indicated an issue with the production data
store.

We issued the dscheck command with various switches but this did not fix the
problem.

The *dscheck /full mslicense /purge_licenses* command did, however, fail to
finish and returned an error. It hung when deleting a particular object.

For example:

">dscheck /full mslicense /purge_licenses
No resource module ImaMsgsUI.dll found.
Data Store Validation Utility
Version: 5.9
Disclaimer
Caution! This tool modifies the data in your database. Using this tool
incorrectly can cause serious and irrecoverable problems with the data.
Citrix cannot guarantee that problems resulting from the incorrect use of
this tool can be solved

. Use this tool at your own risk and only as directed by Citrix support
staff.
Would you like to continue? Y
Removing MS Licenses from the data store..
DELETING...
  License Object - 1_ 9_15
    MSLicenseEntry Object -
1c73400_52ba4b2_ff020000256dcf13256dcf13256dcf13r."

We restored the customer's data store and the problem was reproduced.

*Resolution*

Because it was impossible to complete the *purge_licenses* command, we
decided to delete the mslicenses in the data store using the following
database script:

*delete from keytable where contextid=97 ;
commit ;*

Having run the script it was then possible to join the farm.

*Note*: The mslicenses deleted in the data store are repopulated the next
time a client requests a Terminal Terminal Server Client Access License
(TSCAL) from the Microsoft licensing server.

*More Information*

We ran the following command to determine the context ID for the MSlicenses:

*Select imacast(rdn), nodeid from keytable where imacast(rdn) like 'Store';*

The node ID returned was 97 and this is the context ID for the above script.
The above script effectively deletes all nodes below the "store" key where
the MSlicenses are stored.


-- 
Jim Kenzig
Microsoft MVP - Terminal Services
http://www.thinhelp.com
Citrix Technology Professional
Provision Networks VIP
CEO The Kenzig Group
http://www.kenzig.com
Blog: http://www.techblink.com

Other related posts:

  • » [THIN] KB: CTX113846 - Case Study: CHFARM error: "Licensing DB Initializing error, an error occurred while initializing the Citrix Licensing Database"