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.

Thursday, October 20, 2011

How to enable DesktopViewer for Citrix Webinterface and PNA site.

Sometime desktop viewer is not available when it is launch via WebInterface . This can be made enabled via changing WebInterface.conf

image

This file will exist under each of the site which is created under IIS

image

Edit the file and remove the # and make it Off to ON

clip_image001

Wednesday, October 19, 2011

How to hide SEP (Symantec) notification for published XenApp application

When application is published from windows 2008 R2 machine having Symantec Endpoint Protection running , it shows up under connection center .

clip_image002[4]

If you have multiple application there would be many such notification under connection center . In order to suppress it , GPO can be used to populate . These value can be found under  CTX101644

clip_image002[6]

After a registry deployment these notification will be disappear .

clip_image002[8]

Saturday, October 15, 2011

How to Hide selective drive for XenApp 6 or XenDesktop

There are many ways people go for hiding selective drives and hiding drives. I have tried creating ADM but does not looks to be a viable option .

The "NoDrives" value uses a 32-bit word to define local and network drive visibility for each logical drive in the computer. The lower 26 bits of the 32-bit word correspond to drive letters A through Z. Drives are visible when set to 0 and hidden when set to 1.

There are two registry entry which can make this happen

User Key: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
System Key: [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer]
Value Name: NoDrives
Data Type: REG_DWORD (DWORD Value)

To determine the value, you need to do some little math

The "NoDrives" value uses a 32-bit word to define local and network drive visibility for each logical drive in the computer. The lower 26 bits of the 32-bit word correspond to drive letters A through Z. Drives are visible when set to 0 and hidden when set to 1.

If you are not happy working in Hex, add these decimal numbers to hide the drive(s):

A: 1, B: 2, C: 4, D: 8, E: 16, F: 32, G: 64, H: 128, I: 256, J: 512, K: 1024, L: 2048, M: 4096, N: 8192, O: 16384, P: 32768, Q: 65536, R: 131072, S: 262144, T: 524288, U: 1048576, V: 2097152, W: 4194304, X: 8388608, Y: 16777216, Z: 33554432, ALL: 67108863

For example to hide drive A and drive D, you would add 1 (A) + 8 (D) which means the value should be set to "9".

To disable all the drives set the value to "67108863".

Now say you just want to show H drives to the user and hide rest of them then

All value =67108863 H: = 128 . Just to show H drive =67108863-128=67108735

The value for "NoDrives"= 67108735

To deploy this using GPO you need to do following setting under GPO,

This example is to show all except H: drive on XA box.

image