Search Engine: Elastic

Article ID: 130404, created on Mar 10, 2017, last review on Jul 14, 2018

  • Applies to:
  • Operations Automation

Symptoms scripts fails exactly after 45 minutes with the error No message received. Here's the example of the faulty output:

[root@osscore O365-Import]# ./ --o365APS2-app-instance-id 123  --tenant-id-attribute-name CSPAccountID --vendor-id 1001011
2017-03-01 13:59:33.786 [DEBUG] OpenAPI init, settings: {'host': 'localhost', 'user': None, 'https': False, 'password': '***', 'timeout': None, 'port': 8440}

*********************************** Processing started ***********************************

2017-03-01 13:59:34.137 [INFO] GET https://localhost:6308//aps/2/resources/e638611e-5f91-4521-9c90-4190a6d05ef2/getPartnerContracts ...
2017-03-01 14:00:02.551 [INFO] Status: 200
2017-03-01 14:00:02.551 [INFO] Response headers:
contracts loaded: 7049
2017-03-01 14:00:04.560 [INFO] POST https://localhost:6308//aps/2/resources/e638611e-5f91-4521-9c90-4190a6d05ef2/getImportDataForCustomers?vendorId=1001011&msTenantIdAttributeName=CSPAccountID ...
2017-03-01 14:45:04.638 [ERROR] API Error:
2017-03-01 14:45:04.638 [ERROR] {
        "error": "Poco::Net::NoMessageException",
        "message": "No message received"

Another possible error message is:

2017-04-19 01:01:27.493 [ERROR] API Error:
2017-04-19 02:40:41.121 [ERROR] {
        "error": "class Poco::TimeoutException",
        "message": "Timeout"


The default REST API timeout of OA APS Controller is not enough to process the large account by script. The time required to process all vendor accounts depends on the total amount of already existing customers and their vendors in OAP perspective: the more different resellers exist, the more operations are performed by the script to export and parse current service templates, service plans, resources configuration on per-vendor basis.

The behavior will get optimized in scope of APSA-17547.


The best approach is to use a filter by domain and import the required customers one by one. To get the details on this procedure, contact Odin Technical Support.

APSA-17547 has been addressed since Office 365 version 16.8.6, upgrade the application in order to obtain the fix.

Workaround before the fix is described below.

If the planned import is going to be performed in a single run, another alternative is to increase the platform REST API timeout to some very large value and run the read script at non-business hours. To do that:

  1. Use python script on OA Management Node to set the required timeout for the operation to 5 hours:

    # python 300
  2. Restart pem service (no need to restart pau, we only need to reload SaaS):

    # service pem stop
    # service pem start
  3. Re-run the Office 365 script.

  4. Decrease the value back to default:

    # python 45
  5. Restart OA services again:

    # service pem stop
    # service pem start

NOTE: pem service restart will cause temporary Control Panel unavailability.

NOTE: Since OSA 7.0 pem service was renamed to pa-agent, so use the new name to restart the service:

# service pa-agent stop
# service pa-agent start

Important: it is not recommended to leave the REST API timeout high on permanent basis, it may pose stability risks to the platform.

5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF