VMware Cloud Community
TheEvilOverlord
Contributor
Contributor

Problems getting a response from vCenter's TaskManager

I am using vRO to query the TaskManager of a vCenter instance.  Sometimes an array of recent tasks is returned.  Other times, NULL is returned.  During this time the vSphere client was open and the recent tasks list was updating in real time without issues.  There were enough recent tasks that the recent task pane inside the vSphere client was never empty, even when vRO was getting back NULL as an answer.  Take a look at this log:

[2016-06-23 08:06:33] [I] Looking for preexisting, running VM Clone tasks...

[2016-06-23 08:06:33] [I] Getting SDK Connections...

[2016-06-23 08:06:33] [I] There are 1 vCenter instances to inspect.

[2016-06-23 08:06:33] [I] VM clone task already running.  Delaying for 61 seconds before starting a VM Clone task.

[2016-06-23 08:07:34] [I] VM clone task already running.  Delaying for 88 seconds before starting a VM Clone task.

[2016-06-23 08:09:03] [I] Error: Could not get list of recent tasks.

[2016-06-23 08:10:20] [I] Error: Could not get list of recent tasks.

[2016-06-23 08:11:55] [I] Error: Could not get list of recent tasks.

[2016-06-23 08:13:28] [I] Error: Could not get list of recent tasks.

[2016-06-23 08:15:16] [I] Error: Could not get list of recent tasks.

[2016-06-23 08:15:57] [I] Error: Could not get list of recent tasks.

[2016-06-23 08:17:49] [I] Error: Could not get list of recent tasks.

[2016-06-23 08:19:00] [I] Error: Could not get list of recent tasks.

[2016-06-23 08:20:58] [I] VM clone task already running.  Delaying for 112 seconds before starting a VM Clone task.

[2016-06-23 08:22:51] [I] VM clone task already running.  Delaying for 109 seconds before starting a VM Clone task.

[2016-06-23 08:24:40] [I] VM clone task already running.  Delaying for 101 seconds before starting a VM Clone task.

[2016-06-23 08:26:21] [I] VM clone task already running.  Delaying for 104 seconds before starting a VM Clone task.

[2016-06-23 08:28:06] [I] VM clone task already running.  Delaying for 68 seconds before starting a VM Clone task.

[2016-06-23 08:29:15] [I] Starting clone process.

Three other similar workflows that were running at the same time also experienced this inability to retrieve a list of recent tasks from vCenter.  By looking at the timestamps in the logs, I determined that all four workflows experienced the same problem with TaskManager at the same time; roughly 8:08 AM to 8:20 AM. 

Here is the section of my code that enumerates tasks on vCenter:

var arrvCenters = VcPlugin.allSdkConnections;

System.log('There are ' + arrvCenters.length + ' vCenter instances to inspect.');

var TaskManager;

var arrVcTasks;

// Set boolDelay = true so we enter the loop

var boolDelay = true;

while (boolDelay == true) {

    // Set boolDelay = false, so there is a chance we can exit the loop

    boolDelay = false;

    // Calculate the time delay before we need it.

    // 60 seconds * 1000 milliseconds * random value from 0 to 1.

    time = Math.floor(120 * 1000 * Math.random());

    try {

        // Inspect each vCenter instance

        for (var i = 0; i < arrvCenters.length; i++) {

            // TypeOf: VcTaskManager

            TaskManager = arrvCenters[i].taskManager;

            arrVcTasks  = TaskManager.recentTask;

            if (arrVcTasks == null) {

                throw ('Could not get list of recent tasks.');

            }

            // For Each Task...   

            for (var j = 0; j < arrVcTasks.length; j++) {

                // TypeOf: VcTaskInfo

                var objTaskInfo = arrVcTasks[j].info;


vRO version: 7.0.0.3310137

vSphere Client version: 5.5.0.1993072

vCenter Server version: 5.5.0.2183111


There were zero alarms shown in the vSphere client related to my vCenter cluster. 


Any ideas where I should begin my troubleshooting?

Tags (2)
0 Kudos
0 Replies