Citrix – XenServer Loss of connectivity to XenCenter – XAPI



Michael Mills


Formerly the VP of Professional Services for a Citrix VAR in Chicago, IL for the past 10 years, I now spend my time helping organizations successfully implement Desktop Virtualization strategies as the Principal Solutions Consultant at AppSense. After almost 15 years as a Citrix and server virtualization architect, during which time I had the opportunity to help many Fortune 500 organizations with their Citrix architecture and implementations, I have chosen to focus on Desktop Virtualization/Cloud solutions.

In my personal time, when not totally being a techie and immersing myself in new gadgets, I am an avid motorsports fan and professional cross county motocross racer. If not in front of the computer, you will find me in my garage working on one of several “projects”.

I hope you like my articles, but if you don’t….well I suppose that will give us something to talk about wont it, after all what fun is life without a bit on conflict!!
Posted Saturday, December 05, 2009 by Michael Mills | 1 Comments | 2239 views

Tags:  Citrix News |  All Articles

Citrix – XenServer Loss of connectivity to XenCenter – XAPI

While working on the new XenServer farm, I encountered a problem with connectivity from XenCenter to the XenServer Pools.  Essentially what would happen is that I would attempt to connect to the XenServer Pool, or stand alone XenServer for that matter, and ran into connectivity problems.  All I would get is a “Pool is not available or Server is not available” error.  A quick check of the XenCenter.log file on the XenCenter server showed the following:
 2009-11-21 16:41:43,662 DEBUG XenAdmin.Network.XenConnection [Connection to x.x.x.x] – XenConnection: trying to connect to x.x.x.x
2009-11-21 16:47:25,506 DEBUG XenAdmin.Network.XenConnection [Connection to x.x.x.x] – The underlying connection was closed: An unexpected error occurred on a receive.
 Pretty unspecific…
 After some digging I figured out a few important things…
1.       XenCenter connects to the XenServer Pool Master via port 443
  1. The service that provides this conduit on the XenServer is the XAPI service
  2. When I restarted the XAPI service I was able to connect to the Pool with no problems.
 If you ever have this problem, you can verify it is a XAPI problem by checking the following..
1.       Can you connect to the server via SSH or WinSCP?
  1. Can you connect to the Virtual Machines running on the XenServers?
 If you can answer “Yes” to the both of these then chances are the XAPI service is responsible…Now it is possible that there is an underlying systemic problem that needs to be solved, but if you want to get connectivity back you can run the following commands on the XenServer host…
1.       Service xapi stop
a.       Then wait….it took over 2 minutes for the service to stop for me..
2.       Service xapi start
a.       This was a bit faster but still took longer than you would expect.
3.       Connect to the XenServer Pool Master via XenCenter and enjoy!!
 Now…I had a problem on a standalone server that required a bit more forceful stopping of the XAPI service…here are the commands to do that in case you have problems…
1.       ps aux | grep xapi
a.       This will likely produce a long list of process that are running XAPI…if none are listed…then you have a bigger problem!! J
2.       killall -9 xapi
a.       This will kill all XAPI processes…forcefully….this is safe to do on production servers as its only purpose is to provide XenCenter connectivity…and you already cant connect!!
3.       Service xapi stop
a.       Then wait….it took over 2 minutes for the service to stop for me..
4.       Service xapi start
a.       This was a bit faster but still took longer than you would expect.
5.       Connect to the XenServer Pool Master via XenCenter and enjoy!

Comments


Guest on Wednesday, January 27, 2010 says

Thanks a lot, we encountered the same problem on a Xenserver Pool running Version 5.0 and i solved it. Very helpful! Thanks, Ben Splittgerber