Jump to content
Welcome to our new Citrix community!
  • 0

Strange annoyance for end users when connecting to their VDA

jeff willis


I have a very strange problem that's more of a nuisance than anything else.


Version info:

We are using Citrix Virtual Apps and Desktop 1912 LTSR CU3 for both the server and client.

The 'VDA desktops' we have are all Server 2019 OS instances in AWS. 

The VDA has been installed with single-session OS configuration  ( due to licensing costs )

Our environment has recently been moved to AWS.  We used to run our desktops with VMware on hardware that we owned.


Since moving to AWS and the costs associated with running instances in Amazon, our management has implemented a 'cost savings' initiative by forcing the instances to Hibernate each night.

I suggested that instead of hibernating them that we shut them off completely instead, but since I'm just an infrastructure guy, I lost the fight against the developers that use the instances. They want to have their applications running and ready for them each morning when they connect instead of them having to take a few minutes to get everything spun up again.

Before I get to the issue at hand I have been researching this for several weeks and I understand that Citrix does not support hibernation.

Like I said before, I would rather just shut them off completely but I'm just a little fish in this big pond and it has been made clear that hibernation is here to stay and that I need to figure out a remedy for this annoyance.

The hibernation scripts work fine.  When you try to connect to the instance in the morning ( while the instance is hibernating )  the on-demand functionality works as well.

I can see the instance power on in the EC2  and for all indications the computer is running and available.


The Problem:

When a user attempts to connect to the instance ( on the first try )  it will sit for about 60 seconds  and then present them with an error ' cannot start desktop'

If they click OK to this message  and then attempt to open the instance again they are able to connect successfully.

The instance is in the same state as it was before hibernation ( all of their apps are running )  and they can go about their day.

We have educated the userbase about this initial error and for the most part everyone is fine with having to do a second attempt to connect in the morning.

So the problem is definitely not a work stoppage but rather an annoyance.


My management has asked me to try and figure out how we can get the users to be able to connect with just one attempt.


Things I have tried:

I at first thought the the instance may not be properly registered after hibernation so I created a scheduled task triggered on a 'wakeup event' to restart this citrix service immediately post hibernation:

Get-Service BrokerAgent | restart-Service

This made no difference.


After reading through tons of event viewer logs I discovered several errors that would indicate the the VDA was refusing the connection because the user already had an active session.

My reasoning was that the instance was going into hibernation while the session was still active and thus saving that 'state'.  so when it woke back up the next morning windows would still think the connection state was active instead of 'disconnected'


So the next step I did was to create a new scheduled task triggered on pre-hibernation that would essentially 'disconnect' the user while still keeping them logged in.

This is how I tried do that:

Get-Service CitrixRDR | stop-Service
Get-Service PicaDvcControllerSvc | stop-Service
Get-Service "Citrix EUEM" | stop-Service
Get-Service cpsvc | stop-Service

Get-Service PorticaService | stop-Service

When these commands run, the VDA immediately closes the desktop viewer, and accomplishes what I wanted.


Then  there is a scheduled task that runs post hibernation that does this:

Get-Service PorticaService | start-Service

Get-Service CitrixRDR | start-Service
Get-Service PicaDvcControllerSvc | start-Service
Get-Service "Citrix EUEM" | start-Service
Get-Service cpsvc | start-Service

Get-Service BrokerAgent | restart-Service


This didn't make any difference either.

The end user still gets the initial ' cannot start desktop'  but is able to connect on successfully on the 2nd attempt.


I then spent a considerable amount of time playing with all of the other Citrix services to see if there might be one that if I restarted,  it would fix it.

None of the service restarts made any difference,  so I'm pretty sure that restarting services on the instance isn't going to fix this.


The next thing I want to focus on would be in the storefront itself.

Since I know that a 2nd attempt to connect to the VDA is always successful, is it possible to configure storefront to make a 2nd connection attempt after the first failure.


If that's possible then it would satisfy my management, since the end user would only be clicking once to connect, and storefront would be doing the 2nd connection attempt behind the scenes.


I'm just completely at a loss on what else to try and don't want to have to tell the higher ups that they just have to live with it.


Any advice you could provide would be very welcome.





Link to comment

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...