Symptoms

When installing/upgrading an application instance the task fails, the following error can be found it logs:

Sep 17 20:13:45 sandbox : INF [1:5721:b38eeb70:45760 1:651:af4fbb70 SAAS]: [task:26831 APSC] REST method returns 200 OK
Sep 17 20:13:45 sandbox : ERR [1:5721:b38eeb70:45760 1:651:af4fbb70 SAAS]: [task:26831 APSC] REST communication error: JsonKit::jsonParserError: Line 1: syntax error

or

Oct 9 17:49:45 server1: ERR [openapi:10.1.1.1:137 1:20930:f32ffb90 lib]: [txn:60759 SDK::ChangeSubscriptionLimitsObserver::onChangeSubscriptionLimits] ExSystem: module_id:'Common', ex_type_id:'1',Message:'Internal error: void Plesk::APS::ApplicationServiceInstanceReconfigurator::reconfigureServiceInstance() : [APSC] Line 1: syntax error.', deprecated_codes = (0, 0), properties = { reason: 'void Plesk::APS::ApplicationServiceInstanceReconfigurator::reconfigureServiceInstance() : [APSC] Line 1: syntax error', }
Oct 9 17:49:45 server1 : ERR [openapi:10.1.1.1:137 1:20930:f32ffb90 lib]: [txn:60759 SDK::ChangeSubscriptionLimitsObserver::onChangeSubscriptionLimits] failed to notify observer sc_id 50 [SDK::ChangeSubscriptionLimitsObserver] (CORBA::Exception)

Cause

This error means that response from end-point is sent not in JSON format.

Resolution

To troubleshoot the problem:

  1. Enable APS development mode in Operations Automation PCP to log more information:

    System > Settings > Core > System Properties > APS development mode

  2. Tail main Operations Automation debug log to a file while reproducing the problem (rerunning the task):

    tail -f /var/log/poa.debug.log > log

  3. Check the resulting log above the 'Line 1: syntax error' error. Received data is logged along with request to get it manually from command line, it looks like this:

    curl -D- -X POST -H 'APS-Controller-URI: https://10.10.1.1:6308/' -H 'APS-Instance-ID: 4a836e40-d9a5-43bd-bec4-2279b6fa0288' -H 'APS-Transaction-ID: ca17e7ab-891c-4751-afd5-7b996a08e7d5' -H 'Accept: text/html' -H 'Host: endpoint.sandbox.test.tld' -d @/tmp/0da43c44-2c1e-4e8d-a9d2-716fde3f6df2.20130923T130937.238999 http://endpoint.sandbox.test.tld/globals

  4. Fix endpoint to respond correctly, to test the response run the curl command found in log on step 3.

Internal content