This documentation is for WSO2 API Manager 1.9.0. View documentation for the latest release.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 1

...

Code Block
languagehtml/xml
<!--
        Configurations related to enable thrift support for key-management related communication.
        If you want to switch back to Web Service Client, change the value of "KeyValidatorClientType" to "WSClient".
        In a distributed environment;
        -If you are at the Gateway node, you need to point "ThriftClientPort" value to the "ThriftServerPort" value given at KeyManager node.
        -If you need to start two API Manager instances in the same machine, you need to give different ports to "ThriftServerPort" value in two nodes.
        -ThriftServerHost - Allows to configure a hostname for the thrift server. It uses the carbon hostname by default.
        -->

        <KeyValidatorClientType>ThriftClient</KeyValidatorClientType>
        <ThriftClientPort>10399</ThriftClientPort>
        <ThriftClientConnectionTimeOut>10000</ThriftClientConnectionTimeOut>
        <ThriftServerPort>10399</ThriftServerPort>
    <!--ThriftServerHost>localhost</ThriftServerHost-->
    <EnableThriftServer>true</EnableThriftServer>

When you run multiple instances of the API Manager in distributed mode, the Gateway and Key Validator Manager (used for validation and authentication) can run on two different JVMs. When the API Gateway receives API invocation calls, it contacts the API Key Validator service Manager service for verification (given that caching is not enabled at the Gateway level). Communication between API Gateway and Key Validator happens Manager happens in either of the following ways:  

...

The default communication mode is using Thrift. Assume that the Gateway port is offset by 2, Key Validator port Manager port by 5 and the default Thrift port is 10397. If the Thrift ports are changed by the offsets of Gateway and Key ValidatorManager, the Thrift client port (Gateway) will now be 10399 while the Thrift server port (Key ValidatorManager) will change to 10402. This causes communication between the Gateway and Key Validator to Manager to fail because the Thrift client and server ports are different.

To fix this, you must change the Thrift client and server ports of Gateway and Key Validator to Manager to the same value. In this case, the difference between the two offsets is 3, so you can either increase the default Thrift client port by 3 or else reduce the Thrift server port by 3.

...

The API Manager has a Service which listens for workflow callbacks. This service configuration can be found at <AM_HOME>/repository/deployment/server/synapse-configs/default/proxy-services/WorkflowCallbackService.xml. Open this file and change the port value of the <address uri accordingly. 

...