Identification Engine: Discovery status is FAILURE, Identification sections in pattern failed: section: AWS Datacenter identification, error: Match step predicate is not matched.

Swapnil25
Tera Contributor

Hi team,

I am facing this issue while selecting Schedule discovery --> Discovery Manager/cloud discovery --> New --> Add account--> Select Datacenter (Error) .

Identification sections in pattern failed: section: AWS Datacenter identification, error: Match step predicate is not matched.

Logs for AWS Datacenter identification

{
"name" : "Discovery Log",
"status" : "FAILURE",
"children" : [ {
"name" : "Pre Pattern Execution",
"id" : "pre_pattern_execution_script",
"status" : "SUCCESS",
"level" : 2,
"messages" : [ {
"message" : "2020-05-08 13:58:39: Getting pre pattern execution data generated by script."
}, {
"message" : "2020-05-08 13:58:39: setAttribute(service_account,........)\r\nThe max object size reached the maximum limit of [1000]. To adjust this use the mid property mid.sm.discolog.max_object_size.",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: setAttribute(hosted_relation_type,Hosted on::Hosts)",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: setAttribute(hosted_relation_id,5f985e0ec0a8010e00a9714f2a172815)",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: setAttribute(service_account_id,c8bce51b1ba01010153ced3abc4bcb04)",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: setAttribute(pattern_runtime_mode,horizontal)",
"severity" : "DEBUG"
} ],
"type" : "NONE"
}, {
"name" : "Selecting Pattern for Execution",
"id" : "set_pattern_name",
"status" : "SUCCESS",
"level" : 2,
"messages" : [ {
"message" : "2020-05-08 13:58:39: Pattern: Amazon AWS Datacenter discovery"
}, {
"message" : "2020-05-08 13:58:39: setAttribute(pattern,Amazon AWS Datacenter discovery)",
"severity" : "DEBUG"
} ],
"type" : "NONE"
}, {
"name" : "AWS Datacenter identification",
"status" : "TERMINATION",
"children" : [ {
"name" : "Create Service Account From Input Params",
"status" : "SUCCESS",
"level" : 3,
"messages" : [ {
"message" : "2020-05-08 13:58:39: Library 'Create Service Account From Input Params' executing",
"severity" : "DEBUG"
} ],
"type" : "STEP_TYPE"
}, {
"name" : "Create service account table if doesn't exist",
"status" : "NOP",
"level" : 3,
"messages" : [ {
"message" : "2020-05-08 13:58:39: Step condition is false. step not executed.",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: Execution time: 0 ms",
"severity" : "DEBUG"
} ],
"type" : "STEP_TYPE"
}, {
"name" : "Add credentials and account ID to service account table if don't exist",
"status" : "NOP",
"level" : 3,
"messages" : [ {
"message" : "2020-05-08 13:58:39: Step condition is false. step not executed.",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: Execution time: 16 ms",
"severity" : "DEBUG"
} ],
"type" : "STEP_TYPE"
}, {
"name" : "Populate cmdb_ci_cloud_service_account",
"status" : "SUCCESS",
"level" : 3,
"messages" : [ {
"message" : "2020-05-08 13:58:39: setAttribute(cmdb_ci_cloud_service_account,........)\r\nThe max object size reached the maximum limit of [1000]. To adjust this use the mid property mid.sm.discolog.max_object_size.",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: Execution time: 0 ms",
"severity" : "DEBUG"
} ],
"type" : "STEP_TYPE"
}, {
"name" : "Get AWS Host",
"status" : "SUCCESS",
"level" : 3,
"messages" : [ {
"message" : "2020-05-08 13:58:39: setAttribute(awsHost,signin.aws.amazon.com/console)",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: Execution time: 0 ms",
"severity" : "DEBUG"
} ],
"type" : "STEP_TYPE"
}, {
"name" : "Set Query URL",
"status" : "SUCCESS",
"level" : 3,
"messages" : [ {
"message" : "2020-05-08 13:58:39: setAttribute(amazonQueryURL,https://ec2.signin.aws.amazon.com/console/?Action=DescribeRegions&Version=2016-11-15)",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: Execution time: 0 ms",
"severity" : "DEBUG"
} ],
"type" : "STEP_TYPE"
}, {
"name" : "Get AWS regions",
"status" : "MIXED",
"level" : 3,
"messages" : [ {
"message" : "2020-05-08 13:58:39: setAttribute(headers,)",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: setAttribute(method,GET)",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: setAttribute(formatted,true)",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: setAttribute(arrayName,rest_resp_region)",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: setAttribute(body,)",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: setAttribute(url,https://ec2.signin.aws.amazon.com/console/?Action=DescribeRegions&Version=2016-11-15)",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: setAttribute(body,null)",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: setAttribute(headers,null)",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: Exception occurred while executing operation Cloud REST - add response to context. Custom operation Failed to run script due to the following error: JAVASCRIPT_CODE_FAILURE: com.snc.sw.exception.CommandFailureException: Invalid parameter for cloud request: Invalid URL: https://ec2.signin.aws.amazon.com/console/?Action=DescribeRegions&Version=2016-11-15. Check the URL (script_include:AwsApiCommand; line 245). Custom operation Failed to run script due to the following error: JAVASCRIPT_CODE_FAILURE: com.snc.sw.exception.CommandFailureException: Invalid parameter for cloud request: Invalid URL: https://ec2.signin.aws.amazon.com/console/?Action=DescribeRegions&Version=2016-11-15. Check the URL (script_include:AwsApiCommand; line 245)",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: Execution time: 93 ms",
"severity" : "DEBUG"
} ],
"type" : "STEP_TYPE"
}, {
"name" : "Verify if we have any valid response",
"status" : "TERMINATION",
"level" : 3,
"messages" : [ {
"message" : "2020-05-08 13:58:39: Execution time: 0 ms",
"severity" : "DEBUG"
} ],
"type" : "STEP_TYPE"
} ],
"level" : 2,
"type" : "IDENTIFICATION_SECTION_TYPE"
}, {
"name" : "discovery",
"id" : "discovery",
"status" : "FAILURE",
"children" : [ {
"name" : "Check Processing Success",
"id" : "Check Processing Success",
"status" : "FAILURE",
"level" : 3,
"messages" : [ {
"message" : "2020-05-08 06:58:40: Identification Engine: Discovery status is FAILURE, Identification sections in pattern failed: section: AWS Datacenter identification, error: Match step predicate is not matched. "
} ],
"type" : "NONE"
} ],
"level" : 2,
"type" : "NONE"
} ],
"level" : 0,
"messages" : [ {
"message" : "2020-05-08 13:58:39: Task is running on MID server AWS_MID",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: setAttribute(cmdb_ci_cloud_service_account,[{}])",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: setAttribute(cmdb_ci_aws_datacenter,[{}])",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: setAttribute(cmdb_ci_cloud_service_account,[{}])",
"severity" : "DEBUG"
}, {
"message" : "2020-05-08 13:58:39: setAttribute(cmdb_ci_aws_datacenter,[{}])",
"severity" : "DEBUG"
} ],
"type" : "NONE"
}


Regards,

Swapnil

13 REPLIES 13

After you Discovered Datacenters, does the service account form shows Logical Datacenters tab at the bottom of the form?

Discovery configuration -  Logical Datacenter is available but their is nothing under that tab.

It should look similar to the attached print screen, except mine is for Azure and yours should be populated with AWS Regions:

find_real_file.png

As the next step, make sure your AWS credentials comply to the following document;

remove all hyphens from AWS Account Id field on the service account form;

make sure that the Discovery pattern at version 1.0.61 or greater:

find_real_file.png

I think if you go back and review the creds supplied for discovery you should fix that problem, if you are familiar with aws command line you can try get-regions or describe-regions commands to validate that credentials return data or not 

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,

There are few error apart from this in your log:

1) The max object size reached the maximum limit of [1000]. To adjust this use the mid property mid.sm.discolog.max_object_size

So please add this property and increase the size to 50k.

 

2) Exception occurred while executing operation Cloud REST ServiceNow

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

 

First solve this and may that help to solve the 3rd one.

Thanks,
Ashutosh

Hi Ashutosh,

 

Thanks for suggestion, completed 1 task but for 2 its for google cloud platform for different error.

 

Regards,

Swapnil