Have you ever received the error You cannot access this session because no licenses are available when trying to open a Citrix published application or desktop? and perhaps this error is coming up while testing/sizing your environment with a load testing tool such as @LoginVSI. Well that was my case a couple of weeks back while I was load testing my new XenDesktop 7.5 environment.
In my case, I was receiving this error when using LoginVSI 4.1.1 to launch multiple sessions through Citrix Web Interface 5.4 during a test. The error was very random and happened with different test accounts in different pooled XenDesktop VDTs. The only constant was that it will happen when the test was for 8 or more concurrent sessions.
Researching the error online will bring up different articles like CTX130961 or CTX136266 but they didn’t relate to my issue.
How to fix the error?
I found three possible ways of fixing this issue, two of them while working with @LoginVSI support. I would like to send a big THANK YOU to the whole company and especially to Omar Bouhaj as he worked with to troubleshoot this issue. I had a question for them, very professional and rapid to respond.
So what are the fixes… I’m coming to it but first I’m going to talk about why you might be receiving the error. It is important to understand why things happen, at least for me is.
When using LoginVSI to drive your test and using the Citrix Web Interface connector, the default connection process in the Launcher machine is:
- Launcher opens IE pointing to the specified Web Interface, waits 5 seconds
- Launcher enters userID and password, waits 5 seconds
- Web Interface displays all icons for the UserID
- Launcher clicks on the icon specified, waits 5 seconds
- ICA file is received and starts opening the application/desktop
- Launcher clicks on “Log Off”. Super important step
- Launcher closes IE.
- Process starts again for next userID
The issue
Depending on the utilization of your farm or Web Interface server, hopefully you are using your QA environment and not your production environment , the response times could be longer than the 5 seconds that LoginVSI has by default. Additionally you might have your Web Interface configured to log off users when they log off from Web Interface (image below) to save on Citrix licenses.
If that is the case, the launcher might be closing the Web Interface session before the ICA session is completed created which basically release the Citrix licenses. To be completely honest this was news to me as I always thought the Citrix licenses is checked out when the ICA is established and had nothing to do with the Web Interface. I looks like when you click “Log Off” on the Web Interface, it will send a notice to the licensing server or something.
First Solution
The first and probably easiest way to to fix this issue is configure the Web Interface to not log off active sessions when login off from it. This configuration is on the Workspace control configuration for the specific Site that you are testing. If you only have one production Web Interface server, can create a second site and configure it this way so you don’t impact your production users. By using this approach you won’t have to change anything that has been set on your LoginVSI test.
Second Solution
The second option requires you to be running LoginVSI 4.1.1 (latest version when I wrote this article) or newer. They have added options to control the wait times on the different steps. You would need to manually change the connection string using your LoginVSI management console; there is not GUI at this time but the documentation is really good, look at the Citrix Web Interface connector options in this link.
The two options that you would need to add are:
- t1 – The seconds pause (time) between the user logging on and the resources being visible and the user (CTXConnector) attempting to click the resource. Use this option if your icons are taking too long to show up on Web Interface
- t2 – The seconds pause (time) between the user clicking the resource and user (CTXConnector) attempting to log off and close Internet Explorer. This is the most important option for this issue.
Your new connection string should look similar to the one below:
“{VSISHARE}\_VSI_Binaries\Connectors\CTXConnector.exe –s http://yourwebinterface/ -u {username} –p {password} -r PublishedResource –t1 NumberofSeconds -t2 NumberofSeconds”
Third Solution
The third option (and the one that I decided to use) is to change the connection method and use Citrix StoreFront. This requires you to have StoreFront running on an IIS server, in my case I installed it on the same server where I had Web Interface running. Using this third option doesn’t require you to change anything on the Web Interface server or manually on the LoginVSI. Simply use the GUI to create a new connection to the published resource.
The new connection string will be something similar to:
“{VSISHARE}\_VSI_Binaries\Connectors\SFConnect.exe” /url http://yourstorefront /user {username} /password {password} /resource PublishedResource /display fullscreen
Happy testing and Thank you very much for reading…