Article ID: 128381, created on Feb 18, 2016, last review on Feb 18, 2016

  • Applies to:
  • Operations Automation

Symptoms

Script readCSPAccounts.py fails with the error after calling getImportDataForCustomers:

~# ./readCSPAccounts.py --o365APS2-app-instance-id=8 --vendor-id=1000003
...
2016-02-18 19:22:44.814  INFO GET https://localhost:6308//aps/2/resources/27f4022f-525d-4a58-aa03-519475875db5/getImportDataForCustomers?vendorId=1000003 ...
...
2016-02-18 19:22:45.125 ERROR API Error:
2016-02-18 19:22:45.126 ERROR {
  "code": 500,
  "message": "The underlying connection was closed: The connection was closed unexpectedly.",
  "additionalNonlocalizableMessage": ""
}

Error: HTTP Error 500: Internal Server Error

On MOSI server, the following error may be observed in sitelog: 2016-02-18 19:37:58,682 [ 10] DEBUG POAOpenAPI : REQUEST: pem.getServiceTemplate ... 2016-02-18 19:37:58,682 [ 10] ERROR aps_endpoint: Office365AppController.GetImportDataForCustomers finished by exception System.Net.WebException: The underlying connection was closed: The connection was closed unexpectedly.

In OA Public API settings (at System > Settings > Public API) the Accept Connections is set to Only from allowed networks.

Cause

The MOSI IP is not in the list of Allowed Networks.

Resolution

Add the MOSI backnet API to the list of Allowed Networks in System > Settings > Public API

5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF