Friday, October 28, 2011

Citrix SmartAuditor Policy Console is Unable to Load Farm Configuration

We were getting below mention error while installing SmartAuditor on SQL 2008 cluster . Tried following CTX123288 but looks like some changes is required from SQL 2008 cluster prospective.

Symptoms

When opening the Citrix SmartAuditor Policy Console, the following error message appears:

“Unable to connect to the SmartAuditor Server. Ensure that the SmartAuditor Server is running.
Unable to load farm configuration.
An error occurred while accessing the SmartAuditor Database. More details about the error have been logged on the server.”

image

Citrix SmartAuditor Events like the one below appear:

Event Type: Error
Event Source: Citrix SmartAuditor Broker
Event Category: None
Event ID: 0
Date: 11/4/2009
Time: 6:52:51 PM
User: N/A
Computer: SMARTAUDITOR01
Description:
Exception caught while loading SmartAuditor Policy Console configuration file.
--- Exception Details ---
Type: System.Data.SqlClient.SqlException
Message: Cannot open database "CitrixSmartAuditor" requested by the login. The login failed.
Login failed for user ‘CITRIX\SMARTAUDITOR01$'.
Stack trace:
   at SmAudDatabaseProxy.DatabaseProxy.get_DatabaseConnection()
   at SmAudDatabaseProxy.DatabaseProxy.LoadPolicyConsoleConfigurationFile(Int16 policyType, Int64& configFileModifiedTimeUtcTicks, Int32& configFileFormatMajorVersion, Int32& configFileFormatMinorVersion, Byte[]& configFile)
   at SmAudBroker.PolicyAdministration.LoadPolicyConsoleConfigurationFile(PolicyType policyType, Int64& configFileModifiedTimeUtcTicks, Int32& configFileFormatMajorVersion, Int32& configFileFormatMinorVersion, Byte[]& configFile)

After installing Citrix SmartAuditor, the following events are seen (usually at 30-second intervals) in the Application Event Logs.:

Event Type: Warning
Event Source: Citrix SmartAuditor Storage Manager
Event Category: None
Event ID: 0
Date: 11/4/2009
Time: 6:35:32 PM
User: N/A
Computer: SMARTAUDITOR01
Description:
Exception caught while establishing database connection.
--- Exception Details ---
Type: System.Data.SqlClient.SqlException
Message: Cannot open database "CitrixSmartAuditor" requested by the login. The login failed.
Login failed for user 'CITRIX\SMARTAUDITOR01$'.
Stack trace:
   at SmAudDatabaseProxy.DatabaseProxy.get_DatabaseConnection()
   at SmAudDatabaseProxy.DatabaseProxy.CheckSupportedSchemaVersion()
   at SmAudDatabaseProxy.DatabaseProxy.TestConnection()
   at SmAudStorageManager.DataQueueConsumer.WaitConnectDatabase()

ICA sessions are not being recorded and ICL files only appear for a short time and then disappear.

Cause

Probable causes can include the following:

• The computer account for the Citrix SmartAuditor Server does not exist in the SmartAuditor Database.

• The computer account has been deleted and re-created using the same name resulting in a new Security Identifier being issued by Windows Active Directory.

Resolution

The computer account for the Citrix SmartAuditor server must be created in the Citrix SmartAuditor Database.

1. Go to the Microsoft SQL Server and launch the Microsoft SQL Server Management Studio.

2. Under Object Explorer in the console, go to Databases\CitrixSmartAuditor\Schemas right-click and select New Schema.

2. A) Under Object Explorer in the console, go to Databases\CitrixSmartAuditor\Security\Schemas right-click and select New Schema.

3. In the Schema name: field enter the computer name of the Citrix SmartAuditor Server in this format Domain\Machine-Name$. For example, if the domain is Citrix and the hostname of the Citrix SmartAuditor server is SMARTAUDITOR01, then the entry should be: CITRIX\SMARTAUDITOR01$. Note that this entry is not case-sensitive.

4. Leave the entry for Schema Owner field blank. This will be taken care of later when the user account is created. Click OK to continue.

5. Back in the SQL Server Management Studio console, under Object Explorer, go to Databases\CitrixSmartAuditor\Users right-click and select New User.

5. A) Back in the SQL Server Management Studio console, under Object Explorer, go to Security\Logins right-click and select New Login...

6. The Database User – New dialog opens. Enter the computer account name (in the same format as used to create the Schema in step 3) for the User name, for the Login name, and for the Default Schema.

6. A) The Login – New dialog opens. Enter the computer account name (in the same format as used to create the Schema in step 3) for the Login name.

7. Under Owned Schemas, click on the check-box for the schema created for this computer account.

7. A) Now go to the CitrixSmartAuditor Database and expand to go to Security –> Users and Right click on the CITRIX\SMARTAUDITOR01$ which you have created and go to Properties. Under Owned Schemas, click on the check-box for the schema created for this computer account.

8. Under Role Members, click on the db_owner role.

The picture below shows the result of steps 6 through 8.

image

9. Click OK to continue.

10. Go back to the Citrix SmartAuditor Server and restart the Citrix SmartAuditor Storage Manager Service.

11. Test by opening the Citrix SmartAuditor Policy Console and by launching ICA sessions that are known to fit the criteria set in the Citrix SmartAuditor Policy Console for a recorded session.

No comments: