48
XenApp 6 Case Studies and Troubleshooting Rick Berry, Escalation Engineer Mark Callahan, Escalation Engineer May 24 th , 2011

Troubleshooting XenApp 6

Embed Size (px)

DESCRIPTION

Troubleshooting XenApp 6

Citation preview

Page 1: Troubleshooting XenApp 6

XenApp 6 Case Studies and TroubleshootingRick Berry, Escalation EngineerMark Callahan, Escalation EngineerMay 24th, 2011

Page 2: Troubleshooting XenApp 6

• Case study for UPM issue on XenApp 6

• Case study on XenApp 6 filtered policy issue

• Questions and wrap-up

Agenda

Page 3: Troubleshooting XenApp 6

Case study for UPM issue on XenApp 6

Page 4: Troubleshooting XenApp 6

• Customer was experiencing hung sessions at logon

• Some users could log in, others could not

Problem Definition

Page 5: Troubleshooting XenApp 6

• “Black Hole”

• User Profile Manager process still running

• Logged in users would eventually be affected

Citrix Confidential - Do Not Distribute

Symptoms

Page 6: Troubleshooting XenApp 6

Citrix User Profile Manager

Page 7: Troubleshooting XenApp 6

Functional Overview - Logon

Local Windows Devices

XenApp Servers

XenDesktop Streamed/Delivered Desktops

Profile management ServiceFile Servers

Profiles stored via File Share My Settings

Page 8: Troubleshooting XenApp 6

Functional Details

GPO\User Configuration\Windows

Settings\Folder Redirection\My

Documents

My Documents

\profiles\UserName\

\\server\UserHome\

Folder Redirection via Network

XenApp Server[User Logon Event Location]

Active Directory

Collect

Configuratio

n

File Server

File Server

Intelligent Sync

Profile management Service

User Logon

\HKLM\Software\Policies\Citrix\UserProfileManager.

Page 9: Troubleshooting XenApp 6

• Complete System Dump

• PerfMon

• User Profile Manager Logs

Citrix Confidential - Do Not Distribute

Troubleshooting Methodology

Page 10: Troubleshooting XenApp 6

• Examine Kernel memory

• Examine Winlogon process

Citrix Confidential - Do Not Distribute

Troubleshooting MethodologyComplete System Memory Dump

Page 11: Troubleshooting XenApp 6

• Performance Monitor – monitor User Profile Manager and Winlogon threads

Troubleshooting MethodologyPerformance Monitor

NORMAL

PROBLEM

Page 12: Troubleshooting XenApp 6

Troubleshooting MethodologyUser Profile Manager Logs

[PID];WaitUntilChangeJournalIsProcessed: Waiting to finish change journal processing of partition: C

Ah Ha! A suspicious log entry!

Page 13: Troubleshooting XenApp 6

NTFS JournalingEvent NTFS file system action

Initial write operation The NTFS file system writes a new USN record with the USN_REASON_DATA_OVERWRITE reason flag set. For more information on possible reason flags, see the USN_RECORD structure.

Setting of the file time stamp

The NTFS file system writes a new USN record with the flag setting USN_REASON_DATA_OVERWRITE | USN_REASON_BASIC_INFO_CHANGE.

Second write operation The NTFS file system does not write a new USN record. Because USN_REASON_DATA_OVERWRITE is already set for the existing record, no changes are made to the record.

File truncation The NTFS file system writes a new USN record with the flag setting USN_REASON_DATA_OVERWRITE | USN_REASON_BASIC_INFO_CHANGE | USN_REASON_DATA_TRUNCATION.

Close operation If the user making changes is the only user of the file, the NTFS file system writes a new USN record with the following flag setting: USN_REASON_DATA_OVERWRITE | USN_REASON_BASIC_INFO_CHANGE | USN_REASON_DATA_TRUNCATION | USN_REASON_CLOSE.

Page 14: Troubleshooting XenApp 6

• NTFS change journal was showing an increased size of the identification field.

Troubleshooting Methodology

SCREENSHOT

Page 15: Troubleshooting XenApp 6

• Based on the data learned from the NTFS change journal examination, a code change was made to handle changes to the size of the Update Sequence Number record and a hotfix was developed.

Resolution

Page 16: Troubleshooting XenApp 6

Resources discussed

Page 18: Troubleshooting XenApp 6

Log Parser for Citrix Profile Management

Memory Dump File Not Being Generated on Provisioned Target

Microsoft Windows Change Journals

Resources – Citrix Profile Manager

Page 19: Troubleshooting XenApp 6

Case study on XenApp 6 filtered policy issue

Page 20: Troubleshooting XenApp 6

• Customer had a new XenApp 6 farm in place• XenApp 6 Citrix policies (both computer and user settings) were being applied via Active Directory Group Policy

Objects (GPOs)• Some of the Citrix policy settings were filtered for Access Gateway connections and others were filtered by client IP• When end users connect to the XenApp 6 server from an Access Gateway site, the filtered policy settings were not

applying to the session

Problem definition

Page 21: Troubleshooting XenApp 6

XenApp 6 policies overview

Page 22: Troubleshooting XenApp 6

• Manage XenApp servers collectively by grouping servers into worker groups

• You can assign published applications and Citrix policies to worker groups

• Servers added to worker groups inherit settings

XenApp 6 Group-based administration

Worker Group 1

Worker Group 2

XenApp Farm

Published Application:Notepad.exe

Citrix Policy:Enable Client Drive Mapping

Page 23: Troubleshooting XenApp 6

• Worker Group is a new filter for applying Citrix policies

• Automatic configuration of new XenApp servers by placing them in an existing worker group

Applying Citrix Policies to Worker groups

Page 24: Troubleshooting XenApp 6

Citrix policy creation and administration

1. Create policies as Citrix IMA-based policies using Delivery Services Console (Used if AD does not exist or access is limited)

2. Create policies as Active Directory-based policies using Group Policy Management Console (GPMC)

Note: All Citrix policy settings are configurable using either administration method

Page 25: Troubleshooting XenApp 6

• Citrix policies added via the DSC are stored in the datastore

• Two types of policies categorized by computer policies and user policies

• Can be “filtered” for granular control or “unfiltered” to apply to all servers or users

• Policy settings are stored in the servers registry

Citrix policies via the Delivery Services Console

Page 26: Troubleshooting XenApp 6

• Filtered policy• Applies to specific group of users or servers• Uses a variety of filters (IP, AG, Groups, Client name)• Use case: Disable CDM for the Marketing domain group

• Unfiltered policy• Applies to all servers or users• Used when filters or granular control isn’t necessary• Use case: Specifying the license server that all farm servers will use

Filtered versus unfiltered policies

Page 27: Troubleshooting XenApp 6

• Allows integration of Citrix policies into the Windows GPO engine

• Adds a Citrix node in the Group Policy Management Console and Group Policy Object Editor

• Installed with Delivery Services Console• Must be installed on the same machine where

Group Policy Objects are administered• Can be installed on a standalone machine used for

administrative purposes

Citrix policy extension

Page 28: Troubleshooting XenApp 6

• Computer policies • Enables or disables server settings that were once under the farm and server

properties in previous versions• Registry location:

• 32-bit components: HKLM\Software\Policies\Citrix

• 64-bit components: HKLM\Software\Wow6432Node\Policies\Citrix

• User policies • Enables or disables specific features for user sessions• Registry location:

• 32-bit components: HKLM\Software\Policies\Citrix\<SessionID>

• 64-bit components: HKLM\Software\Wow6432Node\Policies\Citrix\<SessionID>

Citrix policy settings on the server

Page 29: Troubleshooting XenApp 6

GPO processing and precedence

Local PoliciesLocal Policies

Citrix Group Policy ObjectsCitrix Group Policy Objects

Site Group Policy ObjectsSite Group Policy Objects

Domain Group Policy ObjectsDomain Group Policy Objects

OU Group Policy ObjectsOU Group Policy Objects

PR

OC

ES

SIN

G

PR

EC

ED

EN

CE

Page 30: Troubleshooting XenApp 6

Citrix policies general roubleshooting checklist

Identify how the policies are being applied (e.g. Active Directory, DSC, both)?

Are the Citrix policy files present on the server?

What does the group policy results wizard show?

CDF Tracing results (see CTX113199 for modules).

Setup and review Citrix policy debugging logs.

Are the Citrix policy registry settings in place?

Page 31: Troubleshooting XenApp 6

Troubleshooting Methodology

• Identify how the policies are being applied (e.g. Active Directory, DSC, both)? Are they pulling down properly?

Page 32: Troubleshooting XenApp 6
Page 33: Troubleshooting XenApp 6
Page 34: Troubleshooting XenApp 6

Troubleshooting methodology for the case

• Identify how the policies are being applied (e.g. Active Directory, DSC, both)? Are they pulling down properly?

• What does output from Group Policy Results Wizard show? Keep in mind GPMC has to be run from XenApp 6 server.

Page 35: Troubleshooting XenApp 6
Page 36: Troubleshooting XenApp 6

• Identify how the policies are being applied (e.g. Active Directory, DSC, both)? Are they pulling down properly?

• What does out from Group Policy Results Wizard show? Keep in mind GPMC has to be run from XenApp 6 server.

• Enable Citrix policy debugging (see CTX128413)

Troubleshooting Methodology

Page 37: Troubleshooting XenApp 6

Setting these values to 0xFFFFFFFF writes the debug information to a log file: %SYSTEMROOT%\Temp\CitrixCseEngine.log

Setting these values to 0x0000FFFF writes the debug information to a debugger such as DebugView

NOTE: The same values have to be written to HKLM\SOFTWARE\Wow6432Node\Citrix\GroupPolicy

For more details see CTX128413

Page 38: Troubleshooting XenApp 6

• Reviewing %SYSTEMROOT%\Temp\CitrixCseEngine.log we need to verify the logged in user

User Name = REDGETLAB\rickbeuser1, SID = S-1-5-21-3992822370-2973014269-1922904879-1172, Session ID = 3

Computer Identity - Name = 60426497M1

• Next we search on the display name of our policy so we can get the GUID since the GUID is referenced more in the log

Name={52243C73-ED52-4539-B484-02098F5A88F4}, DisplayName=Test Policies, Link=LDAP://OU=RickBe,DC=REDGETLAB,DC=CTX

Troubleshooting Methodology – Debug logs

Page 39: Troubleshooting XenApp 6

• We know that the Access Gateway filter on the policy was using a wildcard (apply to any Access Gateway site), so for the Access Gateway filter we can search on AGInUse

FullArmor.GroupPolicyFramework:And(Citrix.Policy.Templates:AGInUse.isValid, Citrix.Policy.Templates:AGFarm.isValid

Citrix.Policy.Templates:WildcardMatch("*"

Citrix.Policy.Templates:AGTags.value,"*",true

Troubleshooting Methodology – Debug logs

Page 40: Troubleshooting XenApp 6

• Our session in question was session 3:

HKLM\SOFTWARE\Policies\Citrix\3\Events

"LastUpdate"="2011-03-27 04:12:12Z“

• Looking at the Evidence key:

HKLM\SOFTWARE\Policies\Citrix\3\Evidence

“AGFarm”=

"AGInUse"=dword:00000000

Troubleshooting Methodology – Registry review

These are issues!!

Page 41: Troubleshooting XenApp 6

• Reviewing the debug logs and comparing this to the registry entries being made allowed us to narrow down the issue to how the policy filters were being evaluated

• Through our analysis it was determined that there was an issue with the filter expression logic when the Access Gateway filter was being used

Root cause isolation

Page 42: Troubleshooting XenApp 6

• The investigation into this issue resulted in code change for the Delivery Services Console which was tested successfully by the customer

• This code change is currently being packaged into a hotfix for the Delivery Services Console

Resolution

Page 43: Troubleshooting XenApp 6

Resources discussed

Page 44: Troubleshooting XenApp 6

CTX125152 - Citrix Group Policy Engine Facts in XenApp 6

CTX127612 - How Policies are Applied when an ICA Session Connects to XenApp 6.0

CTX127611 - How Citrix IMA Policies for XenApp 6.0 Fit in to Microsofts GPO Processing and Precedence Model

CTX124241 - Technical Guide for Upgrading/Migrating to XenApp 6

Citrix Blog Site - XenApp 6 Policies Deep Dive

Resources – Citrix Policy Architecture

Page 45: Troubleshooting XenApp 6

CTX128413 - XenApp 6 and XenDesktop 5 Group Policy Tracing

CTX111961 - CDFControl Tool

CTX113199 - IMA Modules to Select When Obtaining a CDF Trace for a Policy Problem

Resources – Citrix Policy troubleshooting

Page 46: Troubleshooting XenApp 6

Questions?

Page 47: Troubleshooting XenApp 6

Before you leave…

• Session surveys are available online at www.citrixsummit.com starting Thursday, May 26• Provide your feedback and pick up a complimentary gift at the registration desk

• Download presentations starting Friday, June 3, from your My Organizer Tool located in your My Synergy Microsite event account

Page 48: Troubleshooting XenApp 6