Citrix XenApp: Event 10001 – A usable server cannot be found on which to launch the application. Check your worker group definitions and load balancing policies to verify appropriate servers are assigned

After rebooting my Citrix XenApp server,  I was presented with an error in the application event log for the Citrix application stating the following: “A usable server cannot be found on which to launch the application. Check your worker group definitions and load balancing policies to verify appropriate servers are assigned”.

Details blanked out to protect the innocent

After doing a lot of Google searching, I came across a forum with someone with the same problem, to verify the issue I ran the following command:

It gave me a result of “1000” which apparently isn’t right

So to resolve this issue you have to rebuild the perfmon counters, in my example I am using Microsoft Windows 2008


If you need to rebuild the counters for Microsoft Windows Server 2003, see this article here

Additionally, you will find a summary of what the qfarm values are here:

0 to 9998 = This is a normal range for the load manager
99999  = No load evaluator is configured
10000 = load is at 100 percent (full)
10000! = Application disabled for this server
10001 = Out of licenses
10002 = No ICA connections are available for that server
20000 = Incorrect server edition or a license mismatch
99990 = No permission to run qfarm

It fixed the problem for me, hopefully for you too.

Should you have any questions, comments or suggestions, please don’t hesitate to comment below. If you like what you have read, please share it on your favourite social media medium.

Enable SNMP Traps on a VMware ESX 5.1 + Physical Host

I reinstalled my VMware ESX servers the other month and haven’t got around to setting the SNMP traps back up for Observium to use so I thought I’d make a quick article to show how it is done (as I had to look it up again).

1. Log into the console or shell to the box

2. Run the following command to set the trap name (Replace TRAPNAME with the community name you use)

2. Enable the trap

3. Log into vSphere

4. Select the host

5. Select the configuration tab

6. Select Software -> Security Profile

7. Under Firewall, click properties

8. Find the SNMP Server under label

9. Go into the options of the service

10. Change to “Start and stop with host”

11. Click on Start

 

Your traps should now be working

Should you have any questions, comments or suggestions, please don’t hesitate to comment below. If you like what you have read, please share it on your favourite social media medium.

 

Installing Piwik for Website Visitor Tracking on Apache

 

Okay so I have been using Piwik for about a year now and find it to be  flawless so I thought I’d do a write up about it.

From the Piwik website: Piwik is the leading open source web analytics platform that give s you valuable insights into your website’s visitors, your marketing campaigns and much more, so you can optimize your strategy and online experience of your visitors.

Installing

Assumptions

This is assuming the following is already configured:

  • A valid public domain
  • The said public domain has A records pointing to a publicly visible Apache web server
  • The said Apache web server has a valid vhost configuration for said domain
  • The said Apache web server has PHP 5.5 or greater installed and working
  • The said Apache server has internet access to download files
  • The said web server has mySQL installed and configured correctly

Configuring Apache

Create a directing for the Piwik install, I will be using example.com as an example domain

Download Piwik

Install Unzip (if not installed)

Unzip the contents of the zip file

Change ownership and permissions

Configuring mySQL

Note1: Do not use the “mysql>” at the beginning of the command, that is just to indicate you are in mysql command prompt.

Note2: mySQL commands require a “;” at the end of the command

Log into mySQL

Create  a new database

Use the database

Create a user

Grant permissions for the piwik account to the piwik database (don’t use password123)

Finish Install

Browse to the Piwik installation using your browser (I am using example.com)

 

Select “Next”

 

Make sure everything has green ticks next to them and click “Next”

Leave the database server as 127.0.0.1

Type in the username

Type in the password

Type in the database name

Select PDO/MYSQL

Click “Next”

 

Ensure tables are created and click “Next”

Type in the desired admin login name, password and email address and press “Next”

Type in the website name, URL, time zone and whether or not it is a ecommerce site or not and then press “Next”

 

Take a copy of the Javascript tracking code and select “Next”

 

Click on “Continue to Piwik” to continue

 

If prompted, upgrade database

 

I recommend donating using the secure PayPal feature, select “Continue to Piwik”

Sign in to start using Piwik

Should you have any questions, comments or suggestions, please don’t hesitate to comment below. If you like what you have read, please share it on your favourite social media medium.

Apple Mac Native VPN Drops Cisco IPSec VPN Connections

When using the Mac OS X (currently 10.9.4) native VPN client to connect over VPN to a Cisco device you might find it disconnects every 45 to 60 minutes without any warning and no attempt to redial to the VPN server. If you are like me and have a lot of sessions running, reconnecting them all again can be a real pain and that’s not even considering the transfers that also terminate and have to be restarted.

I was surprised to find this has been a “bug” for a while now, there does seem to be a fix but it’s designed for people that know Linux somewhat..

Here is how I solved the problem:

1. Connect to the VPN (this generates a file)

2. Copy the generated conf file to /etc/racoon

3. Edit the racoon file (I’m using vi but you could use vim or nano)

4. At the end of the file comment out the following line:

It should look like this:

5. Add the following line (Change 1.2.3.4 to the IP address of your VPN server)

Save and close

6. Edit the following file /etc/racoon/1.2.3.4.conf (change 1.2.3.4 to the ip address of your VPN server)

7. Disable dead peer detection by changing the value to “0”:

8. Change proposal check from “obey” to “claim”

9. Change the proposed lifetime in each proposal from 3600 to 86400 (24 hours):

Note: Change them all, not just one!

10. Disconnect and reconnect

Should you have any questions, comments or suggestions, please don’t hesitate to comment below. If you like what you have read, please share it on your favourite social media medium.

Set up Apache as a reverse proxy using mod_proxy

Okay so I love Apache and at every chance I will use it over Microsoft IIS or any other web serving service, unless a specific application is only written for Microsoft IIS – such as (Citrix Web Interface) !!

So in the case of only having one public IP and Citrix Web Interface behind it but wanting to host on Apache, I had to set up an Apache box to proxy all traffic for a certain domain name to the IIS box. Did I explain that well, probably not, … lets draw a picture!

 

Apache mod_proxy

mod_proxy is the Apache module for redirecting web pages, it isn’t just one module but rather a collection of them:

  • mod_proxy
  • modproxyhttp
  • modproxyftp
  • modproxyconnect
  • modproxyajp
  • modproxywstunnel
  • modproxywstunnel
  • modproxybalancer
  • mod_cache
  • mod_headers
  • mod_deflate

Installing Apache mod_proxy

This assumes you have Apache installed and running, if not just run the following to install:

Install Essential Build Tools

The package is required to install from source code

Install Module and Dependancies

Activating the Modules

We need to enable the necessary modules before configuring Apache, to check to see what modules are available, run the following:

Input the following modules to load:

proxy proxy_ajp proxy_http rewrite deflate headers proxy_balancer proxy_connect proxy_html

 

Restart Apache

Configuring Apache vHosts for mod_proxy

In this example I will be using “citrix.example.com” to a webserver at 192.168.0.11 as a domain and IP to get mod_proxy to redirect to, you will need to change this to suit your needs.

Create a vhost

Copy and paste the following into the conf file

Save and quit (:wq)

Enable Site

Enable the site by running the following:

Restart Apache

Finally, restart Apache web server

Should you have any questions, comments or suggestions, please don’t hesitate to comment below. If you like what you have read, please share it on your favourite social media medium.