Troubleshooting API ML
As an API Mediation Layer user, you may encounter problems with the functioning of API ML. This article presents known API ML issues and their solutions.
#
Enable API ML Debug ModeUse debug mode to activate the following functions:
- Display additional debug messages for the API ML
- Enable changing log level for individual code components
Important: We highly recommend that you enable debug mode only when you want to troubleshoot issues. Disable debug mode when you are not troubleshooting. Running in debug mode while operating API ML can adversely affect its performance and create large log files that consume a large volume of disk space.
Follow these steps:
- Set the MFS_LOG_LEVEL parameter to "debug" in the MFSxPRM member. The member resides in the RUNHLQ.CMFSOPTN data set.
- Restart the API ML internal services (Gateway, Discovery Service, and Catalog) as applicable to the problem that you are troubleshooting. You successfully enabled debug mode.
- Repeat the procedure that initially caused the problem.
- Review the debug messages and contact Support, if necessary.
- After you finish troubleshooting the error, set the MFS_LOG_LEVEL parameter back to the initial setting:
- Restart all API ML services (Gateway, Discovery Service, and Catalog). You successfully disabled debug mode.
#
Change the Log Level of Individual Code ComponentsYou can change the log level of a particular code component of the API ML internal service at run time.
Follow these steps:
Enable API ML Debug Mode as described in Enable API ML Debug Mode. This activates the application/loggers endpoints in each API ML internal service (Gateway, Discovery Service, and Catalog).
List the available loggers of a service by issuing the GET request for the given service URL:
Where:
scheme
API ML service scheme (http or https)
hostname
API ML service hostname
port
MFS_DS_PORT for the Discovery Service (by default, set to gateway port + 1), and MFS_AC_PORT for the Catalog (by default, set to gateway port + 2).
Tip: One way to issue REST calls is to use the http command in the free HTTPie tool: https://httpie.org/.
Example:
Alternatively, you extract the configuration of a specific logger using the extended GET request:
Where:
{name}
is the logger name
Change the log level of the given component of the API ML internal service. Use the POST request for the given service URL:
The POST request requires a new log level parameter value that is provided in the request body:
Where:
level
is the new log level: OFF, ERROR, WARN, INFO, DEBUG, TRACE
Example:
#
Known Issues#
API ML stops accepting connections after z/OS TCP/IP stack is recycledSymptom:
When z/OS TCP/IP stack is restarted, it is possible that the internal services of API Mediation Layer (Gateway, Catalog, and Discovery Service) stop accepting all incoming connections, go into a continuous loop, and write a numerous error messages in the log.
Sample message:
The following message is a typical error message displayed in STDOUT:
Solution:
Restart API Mediation Layer.
Tip: To prevent this issue from occurring, it is strongly recommended not to restart TCP/IP stack while the API ML is running.