XenApp 6.5 Session starts then disappears

Source: Did You Restart?

We started experiencing issues where a user would launch their XenApp 6.5 session, but the application never showed on screen.  When watching in the AppCenter (using quick refreshes) you can see the application start, drop into a disconnected state, and then logoff.

After some very fast Google searches and looking at Citrix forums there is a lot of information on this.  Unfortunately, I found that none of them hit on the root cause in my environment.

Possible causes found from various posts and Citrix KB articles:

Possible caused by VMware EVC – not in my case

In my case EVC was turned on, but it had always been turned on and I haven’t seen this issue before or rather it had been extremely rare and usually resolved by rebooting a XenApp server in error.  So why would EVC suddenly cause me an issue when we’ve been running for a year with no issue?

Possible caused by Citrix EUEM (Edgesight)

Not in my environment.  At one time I attempted to use Edgesight, but quickly found that the C++ libraries conflicted with our main application.  It’s been disabled since and I haven’t gotten back around to turning it on since the fix was released.

Default 1 minute time-out exceeded for long logons

This one doesn’t actually really hit on a cause imo, rather the effect.  The effect here is that logons are taking a long time and so it hits the timeout.  The cause is unknown, that’s where we need to dig in and find out why in order to make logins more timely.  Just increasing the “timeout” while helpful in the short term doesn’t fix the root cause.

The root issue in my case
After having looked at all the above my partner in crime says to me “AD users and computers seems slower to load lately”.  That’s strange.

After a quick look at all the Domain Controllers in the environment the issue becomes very obvious.  The DC’s CPU’s are pegged out, as is their RAM…  We can all do the math there, run out of RAM and it’s going to start paging and burn up CPU.

After a quick addition of RAM (and added an additional CPU for kicks) all is wonderful again.  XenApp launches significantly faster and the timeout is no longer reached causing the timeout.

Don’t just increase the timeout!  See if there is an underlying issue first.

Citrix Director 7.6 with XenApp 6.5 – Installation / Setup

Source: Did You Restart?

Citrix Director 7.6 with XenApp 6.5 – Installation / Setup

If you’ve seen some of the demonstrations of the new Citrix Director 7.6 it’s pretty cool!

I wanted to provide the director so that other IT staff here could easily terminate specific process / applications.  They tend to terminate entire sessions when really only a specific process is necessary (frozen app that crashed – we have one in particular that is troublesome).

Below is how I setup and got it to work.  There are actually some pretty decent guides available from Citrix that cover all these steps in decent detail.
http://support.citrix.com/proddocs/topic/xenapp-xendesktop-76/xad-monitor-director-wrapper.html
http://blogs.citrix.com/2014/10/16/citrix-director-7-6-deep-dive-part-2-support-for-xenapp-6-5/
http://support.citrix.com/article/CTX200330

Citrix XenApp 6.5 with Hotfix Rollup Pack 2 and 5.
XenApp servers running Windows 2008 R2 SP1
Citrix Director 7.6.1 running on Windows 2012 R2

We’ll need at least the following machines for my mock setup:
1 x Windows 2012 R2 for the Citrix Director. name = Director
1+ x XenApp 6.5 running as the controller (no applications hosted). name = XAController
1+ x XenApp 6.5 session host mode (no xml). name = XA01
Note: you don’t have to install any machines as host mode if you don’t want to, I have redundant controller’s that don’t host any apps, and then install all my “app” servers as session host mode.

Setup Citrix Director: (Director)

  1. Install and configure your Windows 2012 R2 server
  2. Install IIS
    1. Web Server
      1. Common HTTP Features:
        1. Default Document
        2. Directory Browsing
        3. HTTP Errors
        4. Static Content
        5. HTTP Redirection
      2. Health and Diagnostics:
        1. HTTP Logging
        2. Logging Tools
        3. Tracing
      3. Performance:
        1. Static Content Compression
        2. Dynamic Content Compression
      4. Security:
        1. Request Filtering
        2. Basic Authentication
        3. Windows Authentication
      5. Application Development:
        1. .Net Extensibility 4.5
        2. ASP
        3. ASP.NET 4.5
        4. CGI
        5. ISAPI Extensions
        6. ISAPI Filters
        7. Server side Includes
      6. Management Tools:
        1. IIS 6 Management Compatibility:
          1. IIS 6 Metabase Compatibility
          2. IIS 6 Scripting Tools
          3. IIS 6 WMI Compatibility
        2. IIS Management Scripts and Tools
          1. Management Service
    2. Install the below features:
      1. .Net Framework 4.5 Features:
        1. WCF Services:
          1. HTTP Activation
          2. TCP Port sharing
      2. Windows Process Activation Service:
        1. Process Model
        2. Configuration APIs
  3. Install dotnet 4.5.1
  4. From the XenApp / XenDesktop 7.6 installation iso download
    1. Navigate to x64Desktop DirectorDesktopDirector.msi and install
    2. go to x64Citrix PolicyCitrixGroupPolicyManagement_x64.msi and install
  5. Open cmd prompt (runas administrator)
    1. navigate to inetpubwwwrootdirectortools
    2. DirectorConfig.exe /registerdotnet
    3. DirectorConfig.exe /xenapp XAController (this is your XenApp Farm’s Controller name).
      1. To add more than 1 name separate with a comma.  XAController1, XAController2
      2. There is no need to enter non-controller XenApp servers here.  So Session host mode XenApp servers that do not run the xml service for instance should not be configured in this setting.
  6. Ensure that your firewall is configured to allow ports 443, 80, 2513

Setup Session Host XenApp Server: (XA01)

  1. Attach your XenApp 7.6 iso to your server
    1. Alternately you can copy the following files from your download to a central location:
      1.  x64Virtual Desktop ComponentsConfigRemoteMgmt.exe
      2.  x64Virtual Desktop ComponentsInterop.NetFwTypeLib.dll
      3.  SupportDirectorWMIProviderDirectorWMIProvider_x64.msi
  2. Install SupportDirectorWMIProviderDirectorWMIProvider_x64.msi
  3. Ensure dotnet 4.0.30319 or higher is installed
  4. Open a cmd prompt (runas administrator)
    1. navigate to x64Virtual Desktop Components (or where you put the files)
    2. winrm qc
      1.  yes if prompted
    3.   ConfigRemoteMgmt.exe /configwinrmuser “mydomainsecuritygroup” /all
  5.  Ensure that port 2513 is open

Remote Assistance: (XA01)

  1. On the XenApp session host server ensure that the feature “Remote Assistance” is installed.
  2. Configure the GPO for remote assistance
    1. computer config/administrator templates/system/remote assistance
      1. offer remote assistance and helpers.

PrePopulate Domain at Logon: (Director)

  1. Now we can also prepopulate the domain box at the logon screen
  2. This site lays it out very nicely. http://blog.citrix24.com/desktop-director-pre-populate-domain-name-logon-page/
    1. Edit inetpubwwwrootdirectorLogOn.aspx
    2. Find the section with the following: asp:TextBox ID=”Domain” runat=”server” CssClass=”text-box”
    3. Add the following:  Text=”my.domain.com” readonly=”true”
    4. refresh the screen

Force SSL and redirect Default Web Site: (Director)

  1. I like to force SSL for most of my sites.  Also I like to redirect the Default so I don’t have to type in the directories.
  2. Redirect Default Website
    1. On Default Web Site open HTTP Redirect
    2. Check the “redirect requests to this destination”
    3. Enter the path https://servername/Director  (instead of servername you could also use a DNS name that you setup that is easier to remember)
    4. Check “redirect all requests to exact destination”
    5. Apply
    6. Restart the website
  3. Force SSL
    1. On the default site open bindings
    2. Add https
    3. select the servername ssl cert
    4. OK
    5. Highlight the http binding
    6. Remove
    7. Restart the website and then test navigation to https://servername
    8. Also test http://servername and it shouldn’t work.