Wednesday, October 12, 2011

Citrix XenApp 5.0 - 6.5: Discovery Process Error Fail to Start MFCOM and IMA Service

I’ve been having this annoying issue with Citrix XenApp 6.5 where it fails to complete discovery process. It also happened to me in the past when testing XenApp 5.0 and I never found the fix till now.

Current system configuration:
- VM with Windows 2008 R2 x64
- XenApp 6.5 Enterprise installation
- Running on a whitebox EXSi 4.1 u 1
When launching Citrix AppCenter and run discovery it will error out with:
Errors occurred when using SERVERNAME in the discovery process.
An unexpected error occurred. Check that the server name is correct, that the server is on, that Citrix XenApp is installed on this server, and that the Citrix MFCOM Service is running.
image




image

Part of the issue is Citrix MFCOM Service is stuck in starting status, and Citrix IMA (aka Citrix Independent Management Architecture) is not started. Citrix IMA will also fail to start.

image

Step to resove this issue:
While researching and testing I found out that there are several different steps that will lead you a solution. I used different approaches to fix the same problem on two different setup. Make sure you test this on a non production system first. Note: My issue was with fresh VM loaded Windows Server 2008 R2 and XenApp 6.5, I believe this will help with Xenapp 5 and 6 as well. The key is to get MFCOM service properly started

Step 1a
– Try to fix the IMA Service Fails to Start and MFCOM Service Hangs in a Starting State. Issue possibly caused by corrupted Imalhc.dsn and RadeOffline.dsn file (both file are located under C:\Program Files (x86)\Citrix\Independent Management Architecture\)

image

Verify the content of the files:
Imalhc.dsn - file content
[ODBC]
DRIVER=Microsoft Access Driver (*.mdb)
PageTimeout=5
MaxBufferSize=2048
FIL=MS Access
DriverId=25
DBQ=C:\Program Files (x86)\Citrix\Independent Management Architecture\Imalhc.mdb
WSID=SERVERNAME

RadeOffline.dsn - file content
[ODBC]
DRIVER=Microsoft Access Driver (*.mdb)
PageTimeout=5
MaxBufferSize=2048
FIL=MS Access
DriverId=25
DBQ=C:\Program Files (x86)\Citrix\Independent Management Architecture\RadeOffline.mdb
WSID=SERVERNAME

Start command prompt with admin elevated access and perform run these commands(exclude comments):

sc stop mfcom                                      < stop mfcom service
sc stop CitrixWMIService                     < stop CTX WMI service
sc stop imaservice                                  < stop IMA serice
taskkill /IM imasrv.exe /F                     < kill IMA process
taskkill /IM IMAAdvanceSrv.exe /F       < kill IMA process
taskkill /IM mfcom.exe /F                     < kill mfcom process
dsmaint recreatelhc                                 < recreate database
dsmaint recreaterade     
      
reboot the machine. Check if the services are up and running. Got to step 2 and launch the XenAppServerRoleManager and try to reconfigure the farm. If this fails move to step 1b.

Step 1b - IMA Service and SMA Service Fail to Start and the MFCOM Service is Unresponsive during the Start State
  1. Stop the mfcom.exe service by using the Task Manager.
  2. Set the IPSEC Service to Automatic and restart it.
  3. Start the IMA Service and the MFCOM Service
  4. Reboot and try Step 2

Step 1c – Install Update for Root Certificates from MFST
Download and install Update for Root Certificates [June 2011] (KB931125)
image

After successfully installing the root certificate and rebooting the PC, the discovery process will still fail with the same error because now the Citrix IMA and MFCOM is stuck in starting status. On a previous setup the root certificate did resolve my problem. Try step 2 again, launching XenAppServerRoleManager will recycle the IMA services and might work. If this fails try step 1c.

image

Step 1d Check for missing or bad XenApp patches and hotfixes for your version of XenAPP.

There are several post in Citrix Forum instructing to update patches and hotfixes to fix the MFCOM issue. You can google "XenApp Hotfix for MFCOM" there are a lot of information. XenApp a tool call Intallation Manager you can use to distribute hot fixes, patches, and file/registry updates. If you search for XenApp 6.5 you should see a download link for "Intallation Manager for Windows 2008 R2". I personally haven't had the chance to play with it yet but will when I get more involved with XenApp.

Where to find? Log into Citrix | Download | XenAPP |  as of today XenApp 6.5 is available but the Intstallation Manager for Windows Server 2008 R2 is only available in the XenApp 6.0 version.



Step 2
Launch XenAppServerRoleManager to Reconfigure the XA Server.
Next thing to do is launch XenAppServerRoleManager (located in C:\Program Files (x86)\Citrix\XenApp\XenAppRoleManager\) and reconfigure the farm. 

image

Once the Citrix XenApp Server Role Manager window comes up click on Edit Edit Configuration under XenApp.

image

image

image

image

image

Step 3 - XenApp Server user account password changed. (Credit goes to commentor)

If the account used to configure your XA server had password change issue command to reconfigure the data store:

dsmaint config /user:supernova\satya /pwd:Passw0rd101
/dsn:"C:\Program Files (x86)\Citrix\Independent Management Architecture\mf20.dsn"




Good luck. Go back to step 1 if this fails.

11 comments:

  1. Thanks much for this post. I was able to resolve the issue.
    AE

    ReplyDelete
  2. Hi I had a similar issue to this, however all the services were up and running.

    Turn out to be that one of the sql server that the citrix database was on was offline. Once its online it discovery is working again.

    ReplyDelete
  3. Actually Step 2 Helped me........ GOD Bless You...........

    ReplyDelete
  4. Thanks a LOt....... The Step 2 Helped me ............... GOD bless You......

    ReplyDelete
  5. This can also happen, if you installed the XA server with a user and later on you change its password to something else.

    In such scenario, use following command to re-config the Data store with new password:
    dsmaint config /user:supernova\satya /pwd:Passw0rd101
    /dsn:"C:\Program Files (x86)\Citrix\Independent Management Architecture\mf20.dsn"

    Hope this helps.

    Cheers,
    Satya

    ReplyDelete
    Replies
    1. Thanks a lot Satya, you saved me a lot of time :)

      Delete
    2. Many thanks!
      I install hotfix on XenApp 6.5 and IMA service don't start.
      This message resolve my problems )

      Delete
    3. Thanks a lot Satya, this saved my time too.

      Delete
    4. This worked for stuck mfcom and IMA services. Ta!

      Delete
  6. Ahhh, stupid me.
    Maybe something to add to your blog post;

    I was too ..... to actually configure my farm after installing the XenApp server. The Citrix Role Manager kept popping up asking me for a license configuration. I figured it was the license server configuration, since it was a testing environment, I didn't want one.

    And I was missing both DSN configurations and mfcom would not start. I was pulling my hair out until I figured out my mistake:

    ** Actually doing the required configuration and setting up a new farm through the Role Manager... ** Lame, I know. ;-)

    ReplyDelete
  7. Thanks a lot Satya!, you solved my Problem.

    ReplyDelete