VMware Cloud Community
VSnip
Enthusiast
Enthusiast

vRO 7.5 - Workflow - "Read Timed out"

Hi guys,

I've an error during the execution of a workflow.

[2021-12-12 17:25:27.233] [E] Workflow execution stack:
***
item: 'Worflow-X/item1', state: 'failed', business state: 'null', exception: 'Cannot execute the request: ; Read timed out 


My workflow is part of a group of workflow. These workflows are used to backup vROPS appliances.
Here the full process:

  1. Turn OFF vROPS cluster
  2. Check status Cluster
  3. Launch backup
  4. Check status backup
  5. Turn ON vROPS cluster
  6. Check status Cluster
  7. Send E-mail

The issue is on step 6. 
This error happens when the backup takes more than 1 hour.
I don't know why the step 5 works well and there is a timed out for step 6.

Is there any parameters to change the timeout? 

Thanks!

Reply
0 Kudos
4 Replies
xian_
Expert
Expert

Can you share the code in step6, what request is being made?

Reply
0 Kudos
VSnip
Enthusiast
Enthusiast

Hi @xian_ ,

Here the schema of the step 6

VSnip_0-1639565159104.png

I launch an API request on my vROPS to check the status: https://{{vrops}}/casa/cluster/config

So in the first scriptable task "scripting", we have:

 

//prepare request
//Do not edit 
var inParamtersValues = [];
var request = restOperation.createRequest(inParamtersValues, null);
//set the request content type
request.contentType = "";
System.log("Request: " + request);
System.log("Request URL: " + request.fullUrl);

//Customize the request here
//request.setHeader("headerName", "headerValue");

//execute request
//Do not edit 
var response = request.execute();
//prepare output parameters
System.log("Response: " + response);
statusCode = response.statusCode;
statusCodeAttribute = statusCode;
System.log("Status code: " + statusCode);
contentLength = response.contentLength;
headers = response.getAllHeaders();
contentAsString = response.contentAsString;
System.log("Content as string: " + contentAsString);

 

 

In "Check Status", we have:

 

var StatusSearch = JSON.parse (contentAsString);
for (i in StatusSearch.slices){
	var obj = StatusSearch.slices[i];
	if (obj.node_type == "master"){
		System.log(obj.node_type + " - " + obj.online_state);
		if (obj.online_state == "ONLINE"){
			IsOnline = true;
			statusOut = 'ONLINE';
			}
	}
}

 

 

Reply
0 Kudos
xian_
Expert
Expert

Your cluster might not be ready when you try to execute your rest operation.

Can you try to implement a sleep and retry in case of failure?

Reply
0 Kudos
VSnip
Enthusiast
Enthusiast

Good idea! 
We made another change so if this change doesn't work, I will add a sleep & retry in case of failure. (should be next week)

I'll let you know if it worked or not! 

Thanks for your help. 🙂

Reply
0 Kudos