You are on page 1of 105

SUM405: Troubleshooting and

Debugging Receiver for iOS


and Android
By
Ghaith ali khalaf
Why Mobility?

2 © 2013 Citrix
Why Now?

3 © 2013 Citrix
A fast growing, rapidly changing mobile market

Source: Gartner (January 2012) Source: Gartner (September 2011)

© 2013 Citrix
Mobility is top priority for organizations
And a big challenge for IT!

5 © 2013 Citrix
How do you find the problem?

© 2013 Citrix
Citrix Mobile Infrastructure
Devices Network Web Resources

StoreFront
Access Gateway
01011 01011 01011 01011

Third Party Web Interface


VPN

© 2013 Citrix
Agenda

Network and ICA Connection Troubleshooting

NEW! Advanced Logs on Receiver for iOS


Logcat with Receiver for Android

Wrap it up!

Questions
8 © 2013 Citrix
Network and ICA Connection
Troubleshooting
Isolate the Issue Resources

Detailed Reproduction Steps


• XenApp / XenDesktop?

10 © 2013 Citrix
Isolate the Issue
Web

Reproducible Environment
• XenApp / XenDesktop StoreFront
• StoreFront / Web Interface / Services Site

Web Interface
Services Site

11 © 2013 Citrix
Isolate the Issue

Reproducible Environment
• XenApp / XenDesktop
• StoreFront / Web Interface / Services Site
• User-based or Device-based
• Frequency of the Issue

12 © 2013 Citrix
Detailed Reproduction
Repro Steps
• Clear Sequential Repro Steps with timing
(Start Tracing at 6:09pm on 4/2)
1. Logon to WI from Browser at 6:10
2. Launch XenApp Desktop at 6:11
• Expected Behavior
3. Hear Windows logon sound
• Unexpected Behavior
3. Cannot hear Windows logon sound at 6:12
13 © 2013 Citrix
External Reproduction
Complex backend or proprietary software
• Provide Store Account configuration
• Test user account
• Security Token
requirements present
a challenge

14 © 2013 Citrix
Test Other Citrix Receivers

• Previous Receiver
ᵒ Possible Regression
• Beta / EAP Receiver
ᵒ Already Fixed
• From Browser or Receiver
• Android vs iOS
• Windows Receiver
15 © 2013 Citrix
Network Troubleshooting
Network

Checking the Network


• Netscaler AG- VPN or ICA Proxy?
ᵒ Other VPN Access Gateway

• Local Users or External Users only


• 3/4G or Wireless Network
• Single or Dual Authentication Third Party
• Public or Private CA Certificates VPN

• Intermediate Certificate on the Gateway


16 © 2013 Citrix
Network Troubleshooting

Identify Network devices within the connection


• Look for unique or custom configurations or design
• Check for third party logs or tracing
• Identify Closest Working Scenario

Collect Working and Non-working Network Traces

17 © 2013 Citrix
ICA Enumeration and Connection
• ICA is Citrix’s primary TCP Protocol - 1494
ᵒ ICA wrapped in CGP / Session Reliability – 2598
• Determine Enumeration or Connection
ᵒ Authentication in Enumeration
ᵒ Session Launch in Connection
• Create Account/Store in Mobile to Enumerate
ᵒ Enumerate via Web Interface each time
• Launch App or Desktop from Browser or Receiver
18 © 2013 Citrix
Network Traces Analysis Tips
Finding the ICA Session
• Filter by Regular Expressions
ᵒ tcp.port == 1494 || tcp.port == 2598
ᵒ ip.addr == 10.12.33.105 && ip.addr == 10.12.26.144

© 2013 Citrix
Network Traces Analysis Tips
Finding the ICA Session
• Filter by Regular Expressions
ᵒ tcp.port == 1494 || tcp.port == 2598
ᵒ ip.addr == 10.12.33.105 && ip.addr == 10.12.26.144
• Add Name Resolution
• Use Display Time Format

© 2013 Citrix
Network Traces Analysis Tips
Finding the ICA Session
• Find TCP Handshake – SYN, SYN-ACK, ACK
• Use Follow TCP Stream
• Verify the ICA Sounder

© 2013 Citrix
Network Traces Analysis Tips
Identifying Issues
• Time issue occurred during trace
• Use Expert Info Features
• Look for Network Saturation
• Look for Retransmissions and Resets
• Find which side of conversation initiates the
problem
• Compare with a working trace
© 2013 Citrix
Network Traces with Netscaler AG

• nstrace.sh command with nsroot access


ᵒ Secure Shell (SSH) access with tool like PuTTY or
Secure Console
ᵒ Secure Copy (SCP) download with tool like WinSCP or
SFTP
• Netscaler’s Web Console
ᵒ Start new trace under System-> Diagnostics
• Decrypt a SSL Trace with Private Key
© 2013 Citrix
Other Data for ICA Connection Issues

• Event Logs of XenApp or XenDesktop host


ᵒ Licensing Issues
ᵒ Authentication Issues
• Event Logs of Authenticating Server
ᵒ Web Interface or XML Broker
• STA Logs in CtxSta.config for Ticketing Issues
• Enable Web Interface tracing in web.config file
• IIS Logs for Web Site issues
24 © 2013 Citrix
Citrix Diagnostic Facility (CDF) Traces

• Key Citrix Diagnostic Data requires parsing


• CDF is based off Event Trace for Windows (ETW)
ᵒ Providers, Controllers and Consumers
• Identify which XenApp Server to Trace
ᵒ Citrix XenApp Server and XenDesktop Host
• Session Launching issues
ᵒ Zone Data Collector and XML Broker
• Application Enumeration or Load-Balancing issues
25 © 2013 Citrix
Capturing CDF Traces
Citrix Diagnostic Facility
• Steps to gather CDF Traces
ᵒ Scout - CTX130147
ᵒ CDF Control – CTX111961
• Use Circular Traces for Intermittent issues
• Provide Citrix Technical Support with .etl trace file

26 © 2013 Citrix
CDF Trace Demo
Data Collected

• Network Traces – .pcap, .cap


• Network IP Info

© 2013 Citrix
Data Collected

• Network Traces – .pcap


• Network IP Info
• CDF Traces - .etl
• Repro Info

© 2013 Citrix
Data Collected

• Network Traces – .pcap


• Network IP Info
• CDF Traces - .etl
• Repro Info
• Event Logs - .csv

© 2013 Citrix
Data Collected

• Network Traces – .pcap


• Network IP Info
• CDF Traces - .etl
• Repro Info
• Event Logs - .csv

© 2013 Citrix
LongCommandLine parameter
fails for iOS and Android
Case Study #1
LongCommandLine parameter fails for iOS
and Android
Case Study #1
• Troubleshooting
ᵒ Occurs on Receivers for iOS, Android and Mac not Windows
ᵒ Occurs only when session sharing
ᵒ Happens from Local, External, Web Interface or Storefront
ICA FILE

[IE]
Address=10.12.33.101:1494
InitialProgram=#IE
LongCommandLine=http://www.citrix.com/l
ang/English/home.asp
ClientAudio=On
AudioBandwidthLimit=1
33 © 2013 Citrix
LongCommandLine parameter fails for iOS
and Android
Case Study #1
• Debugging
ᵒ Obtained CDF Traces with successful and failed launch
ᵒ Found launch attempts with Enter:HostLaunchRequest()
ᵒ Successful launch

34 © 2013 Citrix
LongCommandLine parameter fails for iOS
and Android
Case Study #1
• Debugging
ᵒ Obtained CDF Traces with successful and failed launch
ᵒ Found launch attempts with Enter:HostLaunchRequest()
ᵒ Failed launch

35 © 2013 Citrix
LongCommandLine parameter fails for iOS
and Android
Case Study #1
• Results
ᵒ Discovered defect in all non-windows Receivers
ᵒ Fixed for iOS, Android, Linux and Mac

ICA FILE

[IE]
Address=10.12.33.101:1494
InitialProgram=#IE
LongCommandLine=http://www.citrix.com/l
ang/English/home.asp
ClientAudio=On
AudioBandwidthLimit=1
36 © 2013 Citrix
Advanced Logs for
Receiver for iOS
Introduction to Advanced Logs on iOS

• Advanced Logs introduced in Receiver for iOS 5.7


• AeTracing – Advanced Extensible Tracing
• Plain Text Log File
• Time and Date Stamp - dd-mm-yyyy hh:mm:ss
• Message Types- INFO, WARN, VERBOSE, ERROR

38 © 2013 Citrix
Enabling Advanced Logs

• Enable Advanced Logs in the Receiver Settings

39 © 2013 Citrix
40 © 2013 Citrix
Two Ways of Gathering Advanced Logs

• Send Feedback and


Request Help from
Support
• From Synced iTunes
under File Sharing

41 © 2013 Citrix
Send Feedback and Request Help from
Support

42 © 2013 Citrix
Email

43 © 2013 Citrix
From Synced iTunes under File Sharing

44 © 2013 Citrix
Advanced Logs

• Advanced Logs disabled after Send Feedback


• Find Issue within all compressed Advanced Logs
• Keywords to search for issues
ᵒ ERROR
ᵒ NOT
ᵒ FAIL

45 © 2013 Citrix
Supportability for Citrix Receivers

See the Citrix Receiver Feature Matrix


http://www.citrix.com/content/dam/citrix/en_us/docum
ents/products/citrix-receiver-feature-matrix.pdf

© 2013 Citrix
© 2013 Citrix
Supportability for iOS

iOS Receiver Admin Troubleshooting


• Workspace control feature is not supported
• Connecting with a proxy is not supported
• Applications might open in different sessions
Limited Support for Session Reliability
✗ 2598/CGP ✗ Client Buffer ✔ Session Freeze

© 2013 Citrix
Advanced Logs Messages
Discover Store config by email
Advanced Logs Analysis
VERBOSE: -[CRLaunchPadViewController
changeStore:]

© 2013 Citrix
Enumerating Apps from Web Interface
Advanced Logs Analysis
INFO: -[StoreManager getMobileAppEnumForStore

© 2013 Citrix
Select Published Desktop icon
Advanced Logs Analysis
VERBOSE: -[CRLaunchPadViewController
appClicked:]

© 2013 Citrix
Published Desktop ICA File
Advanced Logs Analysis
INFO: -The ICA: [Encoding]

© 2013 Citrix
ICA Session begins
Advanced Logs Analysis
INFO: setSessionViewWasShown

© 2013 Citrix
ICA Session Display Settings
Advanced Logs Analysis
INFO: Session Width:

© 2013 Citrix
User Notification Messages
Advanced Logs Analysis
INFO: updateLaunchStatus: statusMessage:

© 2013 Citrix
Session successfully loaded
Advanced Logs Analysis
INFO: Settings succesfully loaded for session view 

© 2013 Citrix
Receiver returns to main screen
Advanced Logs Analysis
INFO: updateVideoOut

© 2013 Citrix
User Disconnect Session
Advanced Logs Analysis
VERBOSE: closeSession:

© 2013 Citrix
iOS Receiver crash dump

• iOS uses CrashReporter


• .crash report includes Stack Trace
• Located on Synced iTunes machine
ᵒ Mac - ~\Library\Logs
ᵒ Win - \AppData\Roaming\Apple
computer\Logs\CrashReporter\

© 2013 Citrix
iOS Data Collected

• Advanced Logs - .zip of .txt


• Repro timing info

© 2013 Citrix
iOS Data Collected

• Advanced Logs - .zip of .txt


• Repro timing info
• Crash Reporter - .crash and .log

© 2013 Citrix
iOS Data Collected

• Advanced Logs - .zip of .txt


• Repro timing info
• Crash Reporter - .crash and .log

© 2013 Citrix
iPad users are unable to
connect through Access
Gateway
Case Study #2
iPad users are unable to connect through
Access Gateway
Case Study #2
• Troubleshooting
ᵒ Occurs with iOS but not Windows Receivers
ᵒ Only through Access Gateway not for Internal Users
ᵒ SHA2 Certificates are on the device

Access Gateway
65 © 2013 Citrix
iPad users are unable to connect through
Access Gateway
Case Study #2
• Debugging
ᵒ No connection attempt from VDA, so no CDF Traces
ᵒ Advanced Logs captured during the failure

66 © 2013 Citrix
iPad users are unable to connect through
Access Gateway
Case Study #2
• Debugging
You have not chosen to trust "Entrust Certification Authority -
L1C", the issuer of the server's security certificate.

67 © 2013 Citrix
iPad users are unable to connect through
Access Gateway
Case Study #2
• Results
ᵒ Checked the Citrix Client Feature Matrix
ᵒ FIPS/SHA2 Security is a Limitation
in the Receiver for iOS

68 © 2013 Citrix
iOS Receiver disconnects
issues after timeout
Case Study #3
iOS Receiver disconnects issues after
timeout
Case Study #3
• Troubleshooting
ᵒ Occurs only on Receivers for iOS
ᵒ Only happens with Access Gateway connections

70 © 2013 Citrix
iOS Receiver disconnects issues after
timeout
Case Study #3
• Debugging
ᵒ Obtained Advanced Logs from iOS Receiver

71 This app is no longer available from the server or you are no


© 2013 Citrix
iOS Receiver disconnects issues after
timeout
Case Study #3
• Results
ᵒ Discovered defect caching the credentials on the Receiver
ᵒ Fixed the code and the user now returns to logon screen
after timeout

72 © 2013 Citrix
Logcat with
Receiver for Android
Introduction to LogCat on Android

• Android uses LogCat to dump system debug output


ᵒ Using Android’s Log class
• Android Receiver always sends output to LogCat
• Plain Text Log File
• Time and Date Stamp - dd-mm-yyyy hh:mm:ss
• Problematic Keywords:
ᵒ ERROR, FATAL EXCEPTION, FAIL
74 © 2013 Citrix
Logcat Message Tags
V/ - verbose
D/ - debug
I/ - informational
W/ - warning
E/ - error
F/ - fatal
S/ - silent
75 © 2013 Citrix
Two Ways of Gathering LogCat on Android

• Send Feedback and Request Help from Support


• From Third Party Utility

76 © 2013 Citrix
Collect LogCat from Receiver for Android
From Receiver for Android
• Send Feedback and Request Help from Support

77 © 2013 Citrix
Collect LogCat from Receiver for Android
Request Help from Support Email

78 © 2013 Citrix
Request Help from Support Email
Send Feedback Email

79 © 2013 Citrix
Request Help from Support Email
Send Feedback Email

80 © 2013 Citrix
Two Ways of Gathering LogCat on Android
From LogCat utility
• aLogcat

81 © 2013 Citrix
aLogcat on Android
Logcat utility
• aLogcat is a third party app for collecting LogCat logs
• Regular expression filtering
ᵒ com.citrix&E/
• Citrix Receiver filter
ᵒ com.citrix
• Send logs from aLogcat
ᵒ Email, ShareFile and more
82 © 2013 Citrix
Supportability of Receiver for Android

Android Receiver Admin Troubleshooting


• Color depth limitation for sessions
• Workspace control feature is not supported
• Connecting with a proxy is not supported
Full Support for Session Reliability
✔ 2598/CGP ✔ Client Buffer ✔ Session Freeze

© 2013 Citrix
LogCat Messages
Discover StoreFront
LogCat Analysis
Discovery document URL=

© 2013 Citrix
Successful Logon from Services Site
LogCat Analysis
Authentication successful

© 2013 Citrix
Web Interface Site Loading
LogCat Analysis
onLoadResource

© 2013 Citrix
Begin ICA Launch from StoreFront legacy
LogCat Analysis
DownloadIcaFileAndLaunchEngineTask

© 2013 Citrix
Begin ICA Launch from Services Site
LogCat Analysis
DownloadIcaFileAndLaunchEngineTask

© 2013 Citrix
User Disconnects ICA Session
LogCat Analysis
Process com.citrix.Receiver:wfica

© 2013 Citrix
Android Receiver crash dump

• Android dump Stack Trace in LogCat - /E

© 2013 Citrix
Android Data Collected

• LogCat log
• Repro timing info

© 2013 Citrix
Unknown Error from Android
connecting through AG the
second time
Case Study #3
Unknown Error from Android connecting
through AG the second time
Case Study #3
• Troubleshooting
ᵒ Occurs only on Receivers for Android
ᵒ Occurs after one successful connection

Access Gateway

94 © 2013 Citrix
Unknown Error from Android connecting
through AG the second time
Case Study #3
• Debugging
ᵒ Network Traces checked out
ᵒ Obtained LogCat from Android Receiver

95 © 2013 Citrix
Unknown Error from Android connecting
through AG the second time
Case Study #3
• Results
• Defect discovered in Android Receiver
• Resolved in Receiver for Android 3.1.2

Access Gateway

96 © 2013 Citrix
Wrap it up!
Citrix Connection Troubleshooting

• Isolate Reproduction for Data Collection


• Separate failing components
• Gather and Investigate Diagnostic Data
ᵒ Event Logs, Network Traces
ᵒ Citrix CDF Tracing
• Note the IP info during Network Traces
• Focus on Working vs. Non-working Data
98 © 2013 Citrix
Logging for iOS and Android

• Mobile Receiver logging is quick and easy


• Readable text messages
• Search logs for ICA Session Starting Point
ᵒ iOS- VERBOSE & CRLaunchPadViewController
ᵒ Android- CTX|CITRIX|RECEIVER.COM

99 © 2013 Citrix
Logging for iOS and Android

• Search logs for problematic keywords


ᵒ iOS- ERROR, NOT, FAIL
ᵒ Android- ERROR, FAIL, FATAL EXCEPTION
• Search questionable messages in working logs
• Provide Concise Repro Steps
• Collect details and data for Citrix Technical Support

100 © 2013 Citrix


Resources
Troubleshooting Citrix Receiver for Mobile Devices
http://support.citrix.com/article/CTX125533
How to Record a Network Packet Trace on a NetScaler Appliance
http://support.citrix.com/article/CTX128655
Case Study: Troubleshooting ICA Session Disconnection with CDF and Network Traces
http://support.citrix.com/article/CTX113251
How to Enable and Collect Advanced Logs for Receiver for iOS
http://support.citrix.com/article/CTX136380
Case Study: Unable to Launch Applications from Android Device
http://support.citrix.com/article/CTX131827

101 © 2013 Citrix


Before you leave…

• Recommended related breakout sessions:


ᵒ SUM212: How to create a fabulous user experience with Citrix Receiver
ᵒ SUM604: Enterprise mobility planning and design workshop
• Conference surveys are available online at www.citrixsynergy.com starting
Friday, May 24 at 9:00 a.m. PT
ᵒ Provide your feedback by 4:00 p.m. PT that day and you’ll receive a $30
Amazon.com gift card via email
• Download presentations starting Monday, June 3, from your My
Conference Planning tool located within the My Account section

© 2013 Citrix
Tweet about this session
with #SUM405 and
#CitrixSynergy

© 2013 Citrix
Questions & Answers
Work better. Live better.

You might also like