Every second API Proxy call fails with a 401 Unauthorized

I have an API proxy that works half the time. After each call that returns with a successful 200, the subsequent exact same call fails with a 401 Unauthorized.

When I run a Trace, only the 200's show up in Trace.

I use the same API Key for all calls, same URL and headers.

It seems like it is bouncing between 2 load balanced servers and one server is working and the other is denying my request.

Solved Solved
0 6 945
1 ACCEPTED SOLUTION

This did turn out to be an issue with the Trial environment during a maintenance on the messaging system. It did eventually resolve itself. It appears only one of the nodes got updated with my change to fix a 401 issue with the back end. The other node did not get updated for a couple of days. Once updated, with the API proxy change, the requests went back to operating normally.

View solution in original post

6 REPLIES 6

@Gary Sole , It's on cloud / onprem ? Trial or paid account ?

It is a cloud trial account.

I have tried saving the API Proxy as a new revision, removing the ResponseCache and resaving. Neither resolved the situation. A change I made shortly before the issue was changing the API Key for the backend service. So that could be where the 401 is coming from. But, I have no visibility into that, because there is no trace of anything but the success calls. I have tried different URL's, that are not in Cache. I suspect, that the cloud deploy is going to 2 servers. One server has the latest updates with the new backend key, the other does not. The one that does not have updates, also does not register with the trace tool, but does service incoming requests with the old version of the API proxy.

It is possible that what you suspect is actually what happened. There were some problems with deployments in trial accounts late last week.

Can you try again and see if the problem has resolved itself? Undeploy and redeploy, then retest. Let us know?

This did turn out to be an issue with the Trial environment during a maintenance on the messaging system. It did eventually resolve itself. It appears only one of the nodes got updated with my change to fix a 401 issue with the back end. The other node did not get updated for a couple of days. Once updated, with the API proxy change, the requests went back to operating normally.

great. I'm glad to hear the problem was resolved.