Citrix XenApp server reboot problem debugging

Recently we have decided to change XA servers reboot method (from scheduled task to XA built-in mechanism). So I’ve made a policy and applied it to worker group.
Here are eDock reference when you can get information how to configure reboot behavior – http://support.citrix.com/proddocs/topic/xenapp65-admin/ps-ref-policies-reboot.html. I set reboot time to 0:30 A.M. next day I wanted to verify if my server was restarted and unfortunately it wasn’t. I decided to track a little bit how reboot works. So let’s start.

First of all, configure reboot policy and filter on one server (using worker group or OU).
At least you have to set:

  • Scheduled reboots
  • Reboot schedule time
  • Reboot schedule start date (I will explain later why I have to set this options also)

You also need to have XenApp Enterprise or Platinum editions.

To verify how Citrix IMA is working we will use CDFControl tool. It’s enough to select only IMA and Citrix Policies traces. Here is short post how to analyze CDF Traces.

reboot_01 reboot_02

Reboot thread is part of IMA process and is executed every 30 seconds. Right now we don’t have any settings so we can see message “Reboot is disabled“.

reboot_03

So let’s try to apply these settings. If you are using policies in Citrix XenApp console restart IMA service. If you are using policies in AD execute “gpupdate /force“. Now verify if settings was properly saved in registry:

HKLM\SOFTWARE\Policies\Citrix\IMA\Restart Options
HKLM\SOFTWARE\Wow6432Node\Policies\Citrix\IMA\Restart Options

If you are now see “Restart Options” key verify if your policy was properly applied. Without it reboot will now work. Here is one Citrix KB describing how to read all registry data: Citrix Policies Regarding Reboots for XenApp 6.x [CTX130232]

Now, open a trace log and search for: “reboot” word:

25888 ?????? 2720 3436 1 2014-02-26 14:00:10.305 ****** *** CDF_ENTRY 5 RebootThread...

Here thread is checking for license type:

2014-02-26 14:00:10.308 CDF_ENTRY 6 ENTRY ---- RpcQueryIsFeatureLicensed
2014-02-26 14:00:10.308 CDF_ENTRY 5 - entry
2014-02-26 14:00:10.308 CDF_INFO 1 : Querying license state of ServerRebootV1
2014-02-26 14:00:10.308 CDF_ENTRY 5 MFLic_QueryCompStatus: Entry
2014-02-26 14:00:10.308 CDF_ENTRY 5 MFLic_QueryCompStatus2: Entry
2014-02-26 14:00:10.308 CDF_ENTRY 5 MFLic_QueryCompStatusHelper: Entry
2014-02-26 14:00:10.308 CDF_INFO 1 MFLic_QueryCompStatusHelper: PLD is MPS_ENT_CCU
2014-02-26 14:00:10.308 CDF_INFO 1 MFLic_QueryCompStatusHelper: Component is ENT and ve
2014-02-26 14:00:10.308 CDF_INFO 1 MFLic_QueryCompStatusHelper: Component is ADV and ve
2014-02-26 14:00:10.308 CDF_INFO 1 MFLic_QueryCompStatusHelper: Component is STD and ve
2014-02-26 14:00:10.308 CDF_INFO 1 MFLic_QueryCompStatusHelper: Component is AST and ve
2014-02-26 14:00:10.308 CDF_INFO 1 MFLic_QueryCompStatusHelper: Component is XDONLY and ve
2014-02-26 14:00:10.308 CDF_ENTRY 5 MFLic_QueryCompStatus: Entry
2014-02-26 14:00:10.308 CDF_ENTRY 5 MFLic_QueryCompStatus2: Entry
2014-02-26 14:00:10.308 CDF_ENTRY 5 MFLic_QueryCompStatusHelper: Entry
2014-02-26 14:00:10.308 CDF_INFO 1 MFLic_QueryCompStatusHelper: PLD is MPS_ENT_CCU
2014-02-26 14:00:10.308 CDF_INFO 1 MFLic_QueryCompStatusHelper: Component is ENT and ve
2014-02-26 14:00:10.308 CDF_INFO 1 MFLic_QueryCompStatusHelper: Found a match for the component ENT
2014-02-26 14:00:10.308 CDF_INFO 1 : Feature ServerRebootV1 license state is 1
2014-02-26 14:00:10.308 CDF_ENTRY 6 EXIT ---- RpcQueryIsFeatureLicensed
2014-02-26 14:00:10.308 CDF_INFO 5 Shut down is on & we're licensed, checking times.

and here is the reason, why my reboot didn’t worked:

2014-02-26 14:00:10.308 CDF_INFO 5 RestartScheduleStartDate = 0000-256-00
2014-02-26 14:00:10.308 CDF_INFO 5 RestartSchedule_Minutes = 14:01
2014-02-26 14:00:10.308 CDF_INFO 5 Now: 2014-02-26 14:00. Reboot: 0000-256-00 14:01
2014-02-26 14:00:10.308 CDF_INFO 1 `anonymous-namespace'::RebootThread: not rebooting (and didn't fail), check for warning messages and logon disables

As you can see, there is some strange date: RestartScheduleStartDate = 0000-256-00. As you will see later, reboot will occur when both dates: “Now: 2014-02-26 14:00. and Reboot: 0000-256-00 14:01” will match.

Every 30 seconds IMA is checking the reboot condition:

2014-02-26 14:00:30.304 CDF_ENTRY 5 RebootThread...
2014-02-26 14:00:30.304 CDF_ENTRY 5 UpdateRebootScheduleSettings...
2014-02-26 14:00:30.304 CDF_ENTRY 5 UpdateGlobalRebootSettings...
2014-02-26 14:00:30.304 CDF_INFO 1 UpdateGlobalRebootSettings: 0, warn start enum: 4, interval enum: 4, customMsg: 0, msg text[<NULL>], disable mins: 60
2014-02-26 14:00:30.304 CDF_INFO 5 Checking whether to shut down.
2014-02-26 14:00:30.304 CDF_ENTRY 5 GotLicense called...
2014-02-26 14:00:30.304 CDF_INFO 5 Shut down is on & we're licensed, checking times.
2014-02-26 14:00:30.304 CDF_INFO 5 RestartScheduleStartDate = 0000-256-00
2014-02-26 14:00:30.304 CDF_INFO 5 RestartSchedule_Minutes = 14:01
2014-02-26 14:00:30.304 CDF_INFO 5 Now: 2014-02-26 14:00. Reboot: 0000-256-00 14:01

and in this case reboot will not start.

So I’ve set in policy “Reboot schedule start date” to 2014-02-25 (one day before). And what happened now:

2014-02-26 14:14:52.685 CDF_INFO 5 Shut down is on & we're licensed, checking times.
2014-02-26 14:14:52.685 CDF_INFO 5 RestartScheduleStartDate = 2014-02-25
2014-02-26 14:14:52.685 CDF_INFO 5 RestartSchedule_Minutes = 14:16
2014-02-26 14:14:52.685 CDF_INFO 5 Now: 2014-02-26 14:14. Reboot: 2014-02-25 14:16
2014-02-26 14:14:52.685 CDF_INFO 1 `anonymous-namespace'::RebootThread: scheduled reboot time passed, updating for next try
2014-02-26 14:14:52.685 CDF_INFO 1 `anonymous-namespace'::RebootThread: next reboot date: 2/26/2014

As you can see, IMA verified that the previous reboot was one day before, so next reboot date was scheduled for 2014-02-26 (so today). And now, the current and reboot time mach:

2014-02-26 14:16:12.683 CDF_ENTRY 5 RebootThread...
2014-02-26 14:16:12.683 CDF_ENTRY 5 UpdateRebootScheduleSettings...
2014-02-26 14:16:12.683 CDF_ENTRY 5 UpdateGlobalRebootSettings...
2014-02-26 14:16:12.683 CDF_INFO 1 UpdateGlobalRebootSettings: 0, warn start enum: 4, interval enum: 4, customMsg: 0, msg text[<NULL>], disable mins: 60
2014-02-26 14:16:12.683 CDF_INFO 5 Checking whether to shut down.
2014-02-26 14:16:12.683 CDF_ENTRY 5 GotLicense called...
2014-02-26 14:16:12.683 CDF_INFO 5 Shut down is on & we're licensed, checking times.
2014-02-26 14:16:12.683 CDF_INFO 5 RestartScheduleStartDate = 2014-02-26
2014-02-26 14:16:12.683 CDF_INFO 5 RestartSchedule_Minutes = 14:16
2014-02-26 14:16:12.683 CDF_INFO 5 <strong>Now: 2014-02-26 14:16. Reboot: 2014-02-26 14:16</strong>
2014-02-26 14:16:12.683 CDF_INFO 1 `anonymous-namespace'::RebootThread: actually rebooting!
2014-02-26 14:16:12.683 CDF_INFO 1 `anonymous-namespace'::FireRebootHandlersEvent: entry
2014-02-26 14:16:12.683 CDF_INFO 1 `anonymous-namespace'::FireRebootHandlersEvent: event type: 3
2014-02-26 14:16:12.683 CDF_ENTRY 5 - entry
2014-02-26 14:16:12.683 CDF_INFO 1 Post notification from (1Ch:1012h), MessageVersion=0x100
2014-02-26 14:16:12.683 CDF_INFO 1 `anonymous-namespace'::FireRebootHandlersEvent: exit
2014-02-26 14:16:12.683 CDF_INFO 5 Logging off users.

Post author

There are 7 Comments

  1. Posted by Martin Reply

    So continuing here: I am getting the error:

    469737 ?????? 4044 11012 4 2-9-2014 10:31:29.853 ****** *** CDF_INFO 1 : Querying license state of ServerRebootV1
    469777 ?????? 4044 11012 4 2-9-2014 10:31:29.853 ****** *** CDF_INFO 1 : Feature ServerRebootV1 license state is 0
    469810 ?????? 3380 3668 0 2-9-2014 10:31:29.853 ****** *** CDF_INFO 5 License not available. Reboot will be skipped.

    • Posted by David Birrer Reply

      You need a XenApp Enterprise oder Platiumum License to Reboot via Policy Advanced licenses are not enough

  2. Posted by Martin Reply

    Ok, I asked months ago already what license we have. I was assurred we have Platinum, turns out we have Advanced here….

    • Posted by jarek Reply

      Oh, this is not a good information – about that license version. But you finally found solution why reboot was not working.
      You can always try to use “scheduled tasks” and simple script to reboot each server or look for something like this:
      Citrix Chain Reboot Script – http://blog.itvce.com/?p=79. I considered this at the beginning (before I use policy for that). But in my environment I don’t need 24/7 working servers.
      If you have any further questions, please don’t hesitate to contact me.

  3. Posted by dhiraj kumar Reply

    Hi,

    I have changed the worker group of server to be rebooted on say tuesday, but the IMA registry key still contains reboot schedule for thursday which was the case in my earlier setting. now i have tried everything but the data in reg key on server is not changing to tuesday and it gets reboot on thursday.

    • Posted by jarek Reply

      Hello Dhiraj,

      did you try to collect CDFTraces? If not, please start CDFTracing, then change policy (in console or in AD?) then reboot IMA service, and stop CDFTraces. We will see what it will show.

  4. Posted by Vijay Reply

    Hi,

    Could you please share what are the procedure we should follow while reboot the XENAPP server and XENapp LIC server?

    Precheck and Post of reboot the Xeaapp server and XENapp LIC server?

Leave a Reply