Wednesday, 17 August 2011

Citrix IMA and MFCom services hung at Starting…

Recently we had a bit of a Data Collector Election storm on a XenApp 6 farm, and about the same time noticed that newly built servers joining the farm or being moved from one data centre to another had a problem with the “Citrix MFCOM Service” (MFcom) and “Citrix Independent Management Architecture” (IMAservice) services hung at Starting. 

The initial fix was removing them from the farm and rejoining them, which was a little time consuming.

We later found that if the local host cache (each server has one of these, its a record of the farm it exists in) was recreated, the server should be able to participate in the farm again.  This required the IMA and MFCOM services to be forced to close since they were hung on starting, so we used this script, with an attempt at a graceful stop of the services (with pings to give it time to stop), followed by TASKKILL to make sure the service was over, then a reboot.  Hopefully this will be useful to someone!

Copy the following text into a new batch file and run it (As Administrator, if you use UAC) on a server with hung services, it should sort it out:

sc stop mfcom
ping localhost -n 10 > nul
sc stop CitrixWMIService
ping localhost -n 5 > nul
sc stop imaservice
ping localhost -n 10 > nul
taskkill /IM imasrv.exe /F
taskkill /IM IMAAdvanceSrv.exe /F
taskkill /IM mfcom.exe /F
dsmaint recreatelhc
dsmaint recreaterade
shutdown -r -t 10


Thanks to this post for pointing us in the right direction:


Huge said...

Thanks for this. I'm running xenapp 5 and it's not quite working for me. First time i tried it was unsuccessful. I ran through manually and found mfcom service took about 1/2 hour to stop. And only then after i killed the service with taskkill.

sc stop imaservice - this did not work at all, i could however kill the service with taskkill

So after both services had stopped completely i ran the two dsmaint commands, after a reboot i'm back to two stuck services again! hah. stupid computers.

Huge said...

actually, i should have read the logs! ima authentication account was recreated a while back and it had expired!

deary me

Post a Comment