Request routing failed withstatus -1 (Undefined)
search cancel

Request routing failed withstatus -1 (Undefined)

book

Article ID: 140866

calendar_today

Updated On:

Products

CA API Gateway API SECURITY CA API Gateway Precision API Monitoring Module for API Gateway (Layer 7) CA API Gateway Enterprise Service Manager (Layer 7) STARTER PACK-7 CA Microgateway

Issue/Introduction

The following error message was logged in the Audit log by the "Route via HTTP(S)" assertion.
***********************************************************************************************
Program routing to http://example.com/api/GET?code=XXXX:
Error msg: Unable to obtain HTTPresponse from http://example.com/api/GET?code=XXXX:
Connection to http://example.com refused.
Caused by : Connection refused
Request routing failed with status -1(Undefined)
***********************************************************************************************

The host was up and running at the time. The API Gateway documentation says the code "-1" means "Host Not Found". It doesn't make sense.

Environment

Component : API GATEWAY

Cause

The API Gateway documentation explains the status code -1 in the "HTTP Routing Response Codes" section as below:

 

Code

Meaning

Description

-1

Host Not Found

The Server referenced in the URL cannot be reached. This code can be returned if either the host does not exist or the host is simply down.

 

Resolution

"Request routing failed with status -1 (Undefined)" doesn't mean "Host Not Found" only. It was caused by "Connection refused" in this case. In the TCP/IP level, the RST packet was returned from the host.