Default language.

Troubleshooting issues when publishing REST API services


You can publish REST services by using Remedy AR System REST API. The REST API uses dedicated Java Server Pages (JSP) Engine Jetty,  which is integrated with the AR System server as a single process.

All REST API calls must be authenticated by using JSON Web Token (JWT) or the Remedy Single-Sign ON (RSSO) token. Clients such as curl, Postman, or  BMC TestHttpClient can make calls to Remedy REST APIs.

Related topic

Symptoms

  • The Jetty server is not accessible
  • REST API connection issue with RSSO are observed
  • The token is not generated
  • The logs are not generated
  • The incident is not created
  • Attachment related Issues are observed
  • ARERR 9093 occurs
  • The attachments are not received by Salesforce (integration)

Scope

  • One or more users experience the problem.

Resolution

Perform the following steps to troubleshoot issues when publishing Remedy REST API:

Step

Task

Description

1

Download the client

REST API client:

(Recommended) TestHttpClient
https://communities.bmc.com/docs/DOC-129733

List of third-party clients:

2

Ensure that the Jetty server is up and running 

By default, the Jetty server runs on port 8008(http) or 8443 (https). 

For information about enabling Jetty server, see Configuring-the-REST-API-by-using-SSL-certificates


For information on troubleshooting Jetty startup issues, see BMC Knowledge Base article ID 000134172

3

Generate a token 

The AR System server performs the normal authentication mechanisms to validate the credentials. If the credentials are valid, the AR Server generates a JSON Web Token (JWT). For more information, see Access-and-authentication-for-the-REST-API

For information about TestHTTPClient Tool, see an article on BMC Communities TestHttpClient - Command line tool to test HTTP(S) services.

For information about how to verify if the REST API is working, see an article on BMC Communities Remedy AR System - REST API: How to verify if it's working.

4

Ensure that the API is excluded in the rsso-agent.properties file.

RSSO Agent installed on AR server is configured by default to filter REST calls received on Jetty. Some customers are OK with this and use RSSO to authenticate REST, if this is not the case follow this KB to disable RSSO from interfering

KA : REST API connection failed after RSSO 9.1.04 integration agent upgrade


5

Ensure that you are using the Interface forms to create an incident

The new Incident ticket needs to be generated based on "HPD:IncidentInterface_Create", rather than "HPD:Help Desk" form.

 Few KA’s which would help creating Incident.

 (i) How to create new Incident ticket through REST API

 (ii)How to update a group using REST API calls to HPD:IncidentInterface Form

 (iii)How to add a task request to incident management using rest API

6

If you are a non admin user, make calls from a single client

BMC Remedy Server restricts all non-administrative users to have active login session only from one host/IP address.

 To ensure Remedy integrations which rely on REST API calls run without any errors, you need to make sure the calls are made from a user with administrator rights. 

 

User is currently connected from another machine or incompatible session." (ARERR 9093)

7

Collect Network trace when you use third party tools

(Which third-party tools?)

Use HttpFileClient Tool as it provides detail and control over what is sent in the network. This would help track the input and output. 

KA: https://communities.bmc.com/docs/DOC-129733

 

8

Analyze the common scenarios

(i)How to send attachments via the Remedy REST API

Refer - https://bmcsites.force.com/casemgmt/sc_KnowledgeArticle?sfdcid=kA33n000000XqnpCAC&type=ProductDescription

 (ii)Wrong query format with fieldnames that contain parentheses

Refer - https://bmcsites.force.com/casemgmt/sc_KnowledgeArticle?sfdcid=kA33n000000YHtqCAG&type=Solution

 (iii)How to use Standalone Postman - SSL issues

Refer - https://bmcsites.force.com/casemgmt/sc_KnowledgeArticle?sfdcid=kA01O000000hK1mSAE&type=FAQ

(iv) How to enable SSL on Jetty - Remedy AR System Server
Refer- https://communities.bmc.com/docs/DOC-129884

8

Enable logs

Enable jetty logs in debug mode Enable Logs

Note : If logs are enabled following option 2, make sure to disable logs once you capture the behavior.

As it creates a lot of information in arerror.log

9

Create a case with BMC Support

Collect and send logs with detailed information when creating a case with BMC Support:

  1. Provide the following information as part of your case:
    • Working and non working use case
    • A description of the behavior occurring or the problem actions
    • Details on who is affected by the problem.
    • Any error messages received

  2. Gather the jetty logs enabled in step 8. Using a zip file allows to create a copy of the files and improve transfer times.
  3. Attach the zip files to your case (up to 2 GB) or FTP the files to BMC

How to use BMC's Managed File Transfer (MFT) to send log files to BMC Support to comply with GDPR policies

 

10

Analyze logs

You can review the logs yourself to try to identify error messages or behaviors.

Use the table below to help identify possible symptoms and solutions

After you determine a specific symptom or error message, use the following table to identify the solution:

Symptom

Where

Action

Reference

The browser receives no response or connection error when accessing a
URL pointing to REST API

 http://server:port/api/

 

image2020-7-23_0-58-34.png

ARS 9x and above

Enable debug logs on jetty and create support case with logs and jetty/etc folder

Rest API Call
returns a CORS restriction message


 "origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource"

Browser accessing web application using REST API

Make sure you have configured the server to allow requests from specific domains (and methods)

 

If this fails. Capture a fiddler logs and create a support case


REST API taking too long to respond and generating "500 Internal Server Error"

ARS 9x and above

For 9.0, 9.1 and 9.1.03

 With Remedy 9.1 SP4 the version of Jetty is 9.3.7 which has enhanced the stability & performance of REST API/Jetty. Hence, it's recommended to upgrade to ARS v9.1.04 version.

 

For 9.1.04 and higher 

Try to replicate the problem and share with us both the logs for analysis

 API+SQL+Filter and Jetty logs.

Timeout while submitting Incident with attachment

 

"messageType": "ERROR", "messageText": "Timeout during data retrieval due to busy server -- retry the operation",
 
"messageAppendedText": "",
 "messageNumber": 93

ARS 9.x and above

Check if you can submit any other request using postman without attachments successfully.

If yes then there could be an issue with JSON payload, make sure you are not missing comma and bracket braces

    "z1D_Details":"Test Attachment",
     "z1D_WorklogDetails":"Test Details"
    "z2AF_Act_Attachment_1":"test.txt"

 

If still, it fails then please collect jetty logs

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*