Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

MC2

Rest

REST Services

MC2 provides various Rest REST interfaces to support available features such as including the generic load, extract, health check , pace-reportservices etcand pace report services. It is a multi-tier architecture for security, scalability, and fault tolerances. Before understand understanding how to troubleshoot MC2's ReST REST services, it is essential to understand review all the components involved from the configuration to run time. If you already familiar all these components, please skip to troubleshooting section.To enable MC2 ReST services, it  

The MC2 REST services includes the following components: 

  • Eagle Web Server
  • MC2 extractservice lb
  • MC2 extractservice worker
  • MC2 pyruleservice
  • Pace-reportservice

High Level Diagram

Following picture The diagram below depicts the high-level flows of current MC2 Rest REST Services. 



MC2

ReST

REST services deployment and

enabling

enablement

MC2 can may be enabled by the following steps:

  • Install the Eagle/MC2 "all-services" packages from the EagleML Installer. Reference EagleML / MC2 Release Deployment for detail detailed steps of the deployment.
  • After deploydeploying, users needs to further configure the Eagle Web Services Frontend front-end to enable ReST REST and SOAP services. Reference Reference the Installation additional configurations for MC2 for configuration details.
  • After frontend front-end configuration, make sure  restart the Eagle WebServer and/or IIS to ensure the configuration taking changes take effect.

MC2

Rest

REST Endpoints Routing

MC2 currently supports the following Rest REST Services:

  • MC2 REST Endpoints for Simple Extracts
  • MC2 REST encpoints Endpoints for the Generic Extractor (POST only)
  • EBSEDS/EQL Endpoints (POST only)
  • Health Check Endpoints (backend access only)
  • Pace PACE report service (additional services outside MC2) to run OLAP reports (both POST and GET requests).




MC2 Rest Service Routes

For the MC2 Generic Load/Extract, it travels through the following route:

Rest REST Client → Web Server (Security Validation) → MC2 Load Balancer → MC2 Worker.

For an MC2 EBS EDS Request, it travels through the following route:

Rest REST Client → Web Server (Security Validation) → MC2 Load Balancer → Pyruleservice.

For Pace PACE Report Service Rest REST Request, it will take the route below:

Rest REST Client → Web Server (Security Validation) → MC2 Load Balancer → Pace PACE Report Service.


When encounter errors, If an error occurs, it depends on the type of request and error code , to resolve.  Review and identify the route and then check each endpoint of the route to diagnose the trouble endpoint(s).


Anchor
MC2 Rest Troubleshooting
MC2 Rest Troubleshooting
General Troubleshooting guide

When invoke invoking MC2 rest REST services, it returns a status code which follows the standard of HTTP respond response codes:

  • 200+   OK
  • 400+   bad client request
  • 500+   internal server error

Possible client-side requests issues:

When Rest REST Invocation responds with an error code int range of 400+, it usually indicates that the error is on the client end with the exception of when server endpoint is down.

Frequently bad request error codes are:

  • 400 - Bad request
  • 401 - Unauthorized
  • 403 - Forbidden
  • 404 - Not Found

Checklist when When encountering client-side errors are:

  • If the response code = 400 or 404, check if request the requested URL is correct or the server URL is accessible.
  • If the response code = 401, check if the correct authentication parameters, user name or password, is specified correctly as part of request.
  • If the response code = 403, the specified URL is not allowed.


Possible server

endpoints

endpoint services issues:

When Rest the REST Invocation failed fails with error code >= 500, it indicates as a server site errorsside error.

Is

Review the following items:

  • Are all corresponding backend endpoints are up and running?
  • Is Are are all System configurations accurate?
  • Is Are all deployed Endpoints versions compatibility
  • others ...
  • compatible?

There are multiple ways to check if all backend services are up and running. It is easier to log in to the backend servers or with backend accesses access to perform the following checks.:

  • Check MC2 health using healthcheck urlthe Healthcheck Url

From the browser, check the health check url http://{appserver}:{healthcheckport}/health. On the returning jsonJSON, check if all services are "UP".

  • From the backend, check if the MC2 services (extractservicelb, extractserviceworker, kafkaservice and pyruleservices) are up and running:

Please reference reference the MC2 Troubleshooting to check if all the required services endpoint is are up and running.

  • Check version incompatibilities

It is strongly recommended that all MC2 components need to be are from the same release. Please reference reference the Installed Version Check and verify all installed versions.

For an issue related to the pace-reportservice endpoint, check the following:

  • Is the pace-reportservice deployed?

"pace-reportservice" is deployed on $EAGLE_ROOT_TO_APP/estar/tpe/servers/pace-reportservice. Ensure there is a deployed version in the path.

  • Is the pace-reportservice up and running?

Login to backend, check run the command "ps -ef | grep pace-reportserivce" and see review if the process is up and running.



Frequently Encountered Issues and Troubleshooting Steps

Receive Eagle landing page when invoke

Rest

REST service

When submit Rest submitting the REST request, receiving the request produces the landing page contents instead of the expected JSON data response, .  This is usually due to a configuration issue and/or issues on the Eagle WebServer. Following Use the following steps to diagnose the issue:

Checking configuration

Check the ${EagleAppToRoot}/tpe/cfg/starsecuity.ini configurations specified in in the Installation additional configurations for MC2 and validate all corresponding configuration from all WebServer nodes.

Repeat the above actions for all the WebServer nodes and ensure the changes has have been made for all WebServer nodes.

Checking the status of WebServer(s)

From the System Management Console (sample image below), check all of the listed services type equals "Type" equal to  "WEBSERVER" have the "last recycle" time greater than the timestamp of the starsecurity.ini and status are the "Status Message" reflects the value of "UP".

Image Modified




URLs for a quick check of the rest endpoints

Following URLs can be used for a quick diagnosis of the health of MC2 rest endpoints

replace webserver with webserver hostname or IP address

http://{webserver}/eagle/v2/api-doc

https://{webserver}/mc2/swagger-ui.html or http://{webserver}/mc2/swagger-ui.html

or more extract specific URLs such as:

https://{webserver}/eagle/v2/entities?maxrows=1