This is a hosted Apigee instance, Version 4.18.05.00
I'm seeing a double-problem situation whereby turning on a trace request changes the processing of a request, and Apigee is returning a different response code than the backend is. When tracing is not on, and the backend returns a 502, the response from Apigee is a 'protocol.http.Response405WithoutAllowHeader', and we get nothing in the logs but a timestamp. However, if tracing is turned on, the logs contain all the relevant details that we care about - but still it returns a 405.
The flow is as follows:
A single Proxy Endpoint
DefaultFaultRule calls the message formatter
PreFlow has apikey validation
PostFlow has a simple Javascript log message formatter
Multiple RouteRules, picked based on an attribute on the apikey passed - picks one of 5 TargetEndpoints
PostClientFlow logs the message generated
Each TargetEndpoint
Empty PreFlow
Empty PostFlow
HttpTargetConnection to backend with sslInfo.enabled=true, path specified, and loadbalanced across listed Server elements
I'm not clear on (a) why we get a 405 when the backend returns a 502 and (b) why when in trace mode I get a log line like:
Nov 7 17:09:12 Thu Nov 07 17:09:12 EST 2019Info: Org=myorg|Env=test|Proxy=theproxy|IsApiKey=true|Time=Thu, 07 Nov 2019 22:09:12,70 GMT|TotalTime=27|TargetTime=12|RequestStart=1573164552040|RequestEnd=1573164552070|Direction=Outbound|Transaction-Id=N/A|Verb=POST|In-Url=http://myendpoint/test|ResponseCode=502|ResponseBody={"fault":{"faultstring":"Received 405 Response without Allow Header","detail":{"errorcode":"protocol.http.Response405WithoutAllowHeader"}}}|LoggedBy=format-sa-log-message-v1.1
but in non-trace mode (literally zero other changes, I just click the Postman button again) I get a long line like:
Nov 7 17:09:02 Thu Nov 07 17:09:02 EST 2019Info:
Clearly, somehow the message formatter is being skipped or run out of order but I don't see why it matters if trace mode is enabled or not.
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |