Pattern error while discovering F5 Load Balancer

munwong
Mega Expert

I am trying to discover a F5 Load Balancer but I am getting this error "Failed Exploring CI Pattern, Pattern name: F5 Load Balancer, To Check Pattern Log Press Here". It failed at the "Transform HEX to DEC IP". Discovery failed and it wasn't able to finish the identification process, therefore, CI not created. Help!!

Transform HEX to DEC IP
2019-05-20 14:12:20: JAVASCRIPT_CODE_FAILURE: Caused by error in Ad hoc script 'EvalClosure-Transform HEX to DEC IP' at line 30

27: var nodeNameItems = nodeNameField.split("/");
28: var nodeName = nodeNameItems[nodeNameItems.length-1];
29: if ( nodeName != null && nodeName.trim() != "" ){
==> 30: rtrn = Packages.com.snc.sw.util.DNSUtils.resolveToOneIP(nodeName);
31: }
32: }
33: else

Check Processing Success
2019-05-20 11:12:25: Identification Engine: Discovery status is FAILURE, unable to get error message.
3 REPLIES 3

robertgeen
Tera Guru

I would start by putting the pattern into debug mode and walking it through for that F5 Load Blanacer. Go to the step where it's transforming hex to dec IP and look at what is in nodeName variable as there could be invalid data. If this is the case your next step will be to backtrack before this and see where it's getting that from. Let me know how it goes.

We were in debug mode and looked at the step "Transform HEX to DEC IP", this is what we see. Do you think the yellow highlighted is the invalid data that causes the Javascript to fail?

 

find_real_file.png

 

find_real_file.png

Chris Tessier
Tera Contributor

I recently saw the same issue, and thought I would update this post with the solution that worked.

The issue was with this particular function:

rtrn = Packages.com.snc.sw.util.DNSUtils.resolveToOneIP(nodeName);

 

If the DNS fails or doesn't resolve for one of the nodes, then the whole script execution will fail. I was able to resolve the issue by wrapping this around a try, catch statement.

Here is a similar example with Azure Website pattern:

https://hi.service-now.com/kb_view.do?sysparm_article=KB0829236