Error while fetching Stat: Invalid API Call

asurajpai
Participant V

Created a new org and env and logged in to the ui with the org user.

When I click on APIs there is an error pop up. Error while fetching Stat Invalid API Call

Also When I execute the following command after creating an org and env, I get the following error;

curl -u suraj.pai.airody@sap.com http://1x.x.x0:8080/v1/organizations/orgsecz4dev/environments/dev/provisioning/axstatus

{ 
  "environments" : [ { 
    "components" : [ { 
      "hosts" : "[localhost, localhost]", 
      "message" : "success", 
      "name" : "qs", 
      "status" : "SUCCESS", 
      "uuid" : "[a8b41b9f-0cc4-4750-8deb-4c30e5e2442a, 5d858acb-f0b8-4673-9031-f410534ca51b]" 
    }, { 
      "hosts" : "[localhost:localhost]", 
      "message" : "", 
      "name" : "pg", 
      "status" : "UNKNOWN", 
      "uuid" : "[34886a1f-1b1a-4aff-8fb0-506a81e29570:1845d22b-aa1c-4b16-a520-9c28706e4f7e]" 
    } ], 
    "message" : "", 
    "name" : "dev" 
  } ], 
  "organization" : "orgsecz4dev", 
  "status" : "FAILURE" 
} 

Please help me in rectifying this issue.

Solved Solved
4 5 1,825
1 ACCEPTED SOLUTION

asurajpai
Participant V

As per @jagjyot, it is a known issue and the solution is to restart the postgres servers of the 13 node cluster.

It would be great if we have the doc updated. @sgilson

View solution in original post

5 REPLIES 5

asurajpai
Participant V

UI Start.out give the following logs:

[error] application - Error response from Gateway: Action: GET URL: http://1x.x.x.0:8080/v1/organizations/orgsecz4dev/environments/dev/stats/?select=message_count%2Cerr... Headers: X-Apigee-Trace-Id: [584ce074-37e4-41a9-bf06-1c8d99984440] X-Apigee-Current-User: [hari.karanam@sap.com] Accept: [application/json] Response Status Code: 400 Response Body: { "code" : "Invalid API Call", "message" : "Invalid API Call", "contexts" : [ ] } Headers: Content-Type: [application/json] Date: [Sun, 03 May 2015 15:51:40 GMT] Content-Length: [87] [error] play - Cannot invoke the action, eventually got an error: utils.GatewayErrorResponseException [error] application - ! @6m36hg5l1 - Internal server error, for (GET) [/ws/orgsecz4dev/dev/analytics/allapitraffic?timeSpan=custo.

The status should have been "SUCCESS" for the first API call. I assume, configuration of AX is not right. Can you try to enable the AX again? Once you configure, make sure you query the right environment (test, prod etc).

However "Invalid API call" is a misleading error message.

I tried to enable AX again by running the bin/enable-ax.sh script. It displays that for the given org:env it is already enabled. Is there any other way to enable for postgres server or so?

@sudheendra1

asurajpai
Participant V

As per @jagjyot, it is a known issue and the solution is to restart the postgres servers of the 13 node cluster.

It would be great if we have the doc updated. @sgilson

We were having this exact some issue with orgs we had just created. The output of the setup-org.sh showed analytics was setup, but we got this error in the UI. Used the above curl and had the same FAILURE result. Restarting our postgres master and slave fixed the issue. Thank you!!!