Analytic Issues

General Issues

You may experience one of the following issues when using the Analytics Catalog service.

Unanticipated System Error Codes

CATALOG002, CATALOG004, CATALOG005, CATALOG006, CATALOG011, CATALOG017, CATALOG024, CATALOG029, CATALOG034, CATALOG035, CATALOG040, CATALOG041.

These are unanticipated system errors that can indicate the request signature or body is malformed.

Cause

One of the following causes may exist.

  • API signature is wrong.
  • API method type (GET, POST, etc) is wrong.
  • Headers are missing or malformed.
  • Specified resource does not exist.
Solution

Try the following.

  • Verify the request parameters (URI, HTTP method, headers) against the API documentation.
  • Check that the request body is valid. For example, if the API sends JSON, use a JSON validator to verify the validity of the JSON structure, and verify it matches the expected structure from the API documentation.
  • If a resource ID was specified in the URI, verify that it is a valid ID.
  • Verify that another API works. If they are both unsuccessful, contact Support to verify that the service and dependent database are running. See afs-orchestration-issues.html#concept_qkq_xd5_25.

500 Internal Error Without a Message

Cause

This is an unanticipated system error that can indicate the request signature or body is malformed.

One of the following causes may exist.

  • API signature is wrong.
  • API method type (GET, POST, etc) is wrong.
  • Headers are missing or malformed.
  • Specified resource does not exist.
Solution

Try the following.

  • Verify the request parameters (URI, HTTP method, headers) against the API documentation.
  • Check that the request body is valid. For example, if the API sends JSON, use a JSON validator to verify the validity of the JSON structure, and verify it matches the expected structure from the API documentation.
  • If a resource ID was specified in the URI, verify that it is a valid ID.
  • Verify that another API works. If they are both unsuccessful, contact Support to verify that the service and dependent database are running. See afs-orchestration-issues.html#concept_qkq_xd5_25.

400 Bad Request, 404 Not Found, 405 Method Not Allowed

These are unanticipated system errors that can indicate the request signature or body is malformed.

Cause

One of the following causes may exist.

  • API signature is wrong.
  • API method type (GET, POST, etc) is wrong.
  • Headers are missing or malformed.
  • Specified resource does not exist.
Solution

Try the following.

  • Verify the request parameters (URI, HTTP method, headers) against the API documentation.
  • Check that the request body is valid. For example, if the API sends JSON, use a JSON validator to verify the validity of the JSON structure, and verify it matches the expected structure from the API documentation.
  • If a resource ID was specified in the URI, verify that it is a valid ID.
  • Verify the REST API headers are configured correctly. For information about how to find the URI values needed, see Binding an Application to an Analytics Framework Instance. For information about configuring headers, seeConfiguring REST Request Headers.
  • Verify that another API works. If they are both unsuccessful, contact the Support team to verify that the service and dependent database are running. See afs-orchestration-issues.html#concept_qkq_xd5_25.

401 Unauthorized

Cause

The provided user token is invalid or has expired.

Solution

Obtain a new token from your identity provider.

403 Forbidden

Cause

The user does not have the proper scopes or access for the zone.

Solution

Verify that the token being passed in has the correct scope. This can be verified when the access token is obtained from the scopes field of the token response. For more information, see Updating the OAuth2 Client for Services.

Analytics Catalog Entry Management

You may experience one of the following issues when creating or updating a catalog entry.

CATALOG003, CATALOG005, CATALOG030, CATALOG033

Cause
One of the following causes may exist.
  • The request catalog entry ID does not exist.
  • The specified analytic catalog entry has been deleted.
Solution
  • Verify the ID against the source of the ID value.
  • Retrieve the list of analytics with the same name (api/analytics/versions?name="xxx") and, if the desired catalog entry exists, reacquire the ID from the desired entry in the list.

Artifact Management

You may experience one of following issues with an analytics’s executable artifact.

CATALOG028

Cause

One of the following causes may exist:

  • The config.json file for the executable artifact of the Python analytic is missing or invalid.
  • The analytic files exist within a subdirectory of the uploaded ZIP file.
Solution

Try the following.

  • Verify that the config.json file exists in the root of the executable artifact.
  • Verify that the config.json file is in proper JSON format.
  • The config.json file for a Python analytic must contain the expected fields. Check that the file contents are in a supported format. For more information, see Python Analytic Development.

    Option 1.

    {
      "main-module": "driver/AnalyticDriver.py",
      "main-function": "driver",
      "non-conda-libs": [
        "boto"
      ],
      "conda-libs": [
        "numpy",
        "scipy"
      ]
    }

    Option 2.

    {
      "entry-method": "<entry-directory>.<entry-class>.<entry-method>",
      "non-conda-libs": [
        "boto"
      ],
      "conda-libs": [
        "numpy",
        "scipy"
      ]
    }

    Option 3 is supported for backward compatibility only and is not recommended.

    {
        "<analytic_name>" : {
            "tags" : {
                “analytic-root” : "<analytic_directory>",
                "analytic-testbench" : "<analytic_test bench>",
                "driver-root": "<analytic_driver>",
                "driver-main": "<analytic_driver>/<analytic_driver_file>",
                "mapper": "<request_mapper_function>",
                "resultprovider": "<result_provider_function>"
            },
            "libs" : ["boto"],
            "conda-libs" : ["numpy","scipy"],
            "memory" : "<memory>",
            "instances" : "<instances>"
        }
    } 
  • Recreate the ZIP file from the root directory which contains the analytic files and directories (config.json, driver, etc.). When created properly, the extracted ZIP file contents should include the analytic files and directories and not be in a subdirectory.

CATALOG038

Cause

The config.json file for the executable artifact for a MATLAB analytic may be missing or invalid.

Solution

Try the following.

  • Verify that the config.json file exists in the root of the executable artifact.
  • Verify that the config.json file is in proper JSON format.
  • Verify that the config.json file has all three attributes (className, methodName, and matlabVersion) defined. For example:
    {
    "className":"com.ge.predix.insight.analytic.demo.matlab.DemoMatlabAdderEntryPoint",
    "methodName":"add2Numbers",
    "matlabVersion":"r2011b"
    }

CATALOG045

Cause

You are trying to delete a wrapped artifact generated by the platform.

Solution

Try the following.

  • Wrapped artifacts generated by the platform can not be deleted.
  • Verify that you are not deleting the artifact that was generated by the analytic wrapping (this is not allowed).
  • If the problem persists, contact Support. See Support Ticket Information.

Taxonomy Management

You may experience one of the following issues when creating or updating a taxonomy.

CATALOG023

Cause

The request to load the taxonomy is malformed.

Solution

Verify that the input structure matches the JSON structure. See Adding Taxonomy Locations.

CATALOG025

Cause

The provided taxonomy location is invalid.

Solution

Verify that the provided taxonomy location exists. Use the Relative Taxonomy API: /api/v1/catalog/taxonomy.

Analytic Validation and Deployment

You may experience one of the following issues when validating an analytic.

CATALOG009

Cause

Unable to log into Cloud Foundry.

Solution

Cloud Foundry has rejected the internal login credentials used by your Analytics Catalog instance. Contact the Support team. See Support Ticket Information.

CATALOG014

Cause

The analytic failed to start in Cloud Foundry.

Solution

Try the following.

  • Verify the contents of the config.json file in the executable artifact.
  • For Python analytics, check that "libs" and "conda-libs" contain valid Python libraries.
  • The analytic may require more system resources than the default allocation. Try using the Deployment API with different system resource values in the request. See Deploying a Production Analytic to Cloud Foundry.

CATALOG013

Cause

Unable to construct the analytic URL.

Solution

Try the following.

  • Verify that the analytic name and version match the constraints by reviewing the documentation (for example, no special characters).
  • If the problem persists, contact Support. See Support Ticket Information.

CATALOG015

Cause

Failed to execute the analytic.

Solution

Try the following.

CATALOG019

Cause

Execution of analytic returned an error.

Solution

Try the following.

  • Verify that the correct input structure is being passed to the analytic.
  • Try executing the analytic directly.
  • Download and test the analytic locally.

Analytic is Stuck in Processing State

When trying to deploy an analytic to Cloud Foundry it may get stuck in the PROCESSING state.

Cause
The Analytic Catalog service stopped for an unknown reason.
Solution
If the analytic has been stuck in PROCESSING state for over 10 minutes, redeploy the analytic.

Java Analytic is Unable to Use Third-Party Libraries

Analytic validation or deployment may complete successfully but the analytic output contains a stack trace error when calling a third-party dependency, such as a ClassNotFound exception.

Cause

Maven packaging has not been set up to include third-party libraries in the packaged JAR file.

Solution

In addition to declaring your third-party libraries in the <dependencies> section of the analytics’s pom.xml file, you need to instruct Maven to include the libraries in the packaged JAR file. One method is to utilize the Maven dependency plugin by including the following definition in the <plugins> section of the analytics’s pom.xml file. For example:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
    <version>2.1</version>
    <executions>
        <execution>
            <id>copy-dependencies</id>
            <phase>prepare-package</phase>
            <goals>
                <goal>copy-dependencies</goal>
            </goals>
            <configuration>

                <outputDirectory>${project.build.directory}/classes/lib</outputDirectory>
                <overWriteReleases>false</overWriteReleases>
                <overWriteSnapshots>false</overWriteSnapshots>
                <overWriteIfNewer>true</overWriteIfNewer>
            </configuration>
        </execution>
    </executions>
</plugin>

After this has been set-up, re-package the analytic and upload it to the Analytics Catalog.

Deployed Analytic Fails to Execute

The recently deployed analytic fails to execute for an unknown reason.

Solution

Analytic Execution Fails With Error

A Java or Matlab analytic fails during validation or execution with the following error in the logs.

"java.lang.InstantiationException: {entry point className, as configured in config.json}"
Solution
A Java or Matlab analytic entry point class must have a default constructor (a constructor with no input parameters). To fix this issue, define a default constructor and redeploy the analytic. See Java Analytic Development or Matlab Analytic Development.

Analytic Development Issues

You may experience one of the following issues when developing an analytic to use with the analytic framework.

Python Analytic Deployment Fails

Deploying a python analytic you developed fails due to a disk space issue. This happens when either testing the analytic or deploying it to production.

Cause
The python build pack installs the default libraries specified as well as any dependent libraries. The combined size of all the python libraries can be very large and create disk space issues, causing analytic deployment to fail. For example, the dependent MKL library is also pulled in. The MKL library in particular is very large.
Solution
If you experience disk space issues when deploying your python analytic, you can add the Nomkl library in the "conda-libs" section of the config.json file. Adding "nomkl" to the first position in the list will disable the automatic download of the MKL library and replace it with non-MKL versions. This substitution will save on disk space. Note that the MKL features will be turned off when using "nomkl".

The following is an example of how to specify "nomkl" in the config.json file.

{
  "entry-method": "analytics.AnalyticDriverClass.run_analytic",
  "non-conda-libs": [
    "boto",
    "uncertainties",
    "pint==0.7.2",
    "scikit-learn",
    "scikit-image"
  ],
  "conda-libs": [
    "nomkl",
    "numpy",
    "pandas",
    "scipy"
  ],
  "memory": "1G",
  "instances": "1"
}

If the disk space error does not resolve after adding "nomkl" library, contact Support. See Support Ticket Information.

Support Ticket Information

When contacting the Support team regarding an issue, have the following information available.

  • The operations you were trying to perform when you encountered the error.
  • Details such as the request URI, request headers, request body, and HTTP method.
  • The value of the X-App-Correlation-Id header from the response, which can be used to isolate log messages generated by your operation.