Search code examples
wso2gateway

WSO2 Distributed setup - no access to API via Gateway


I read a lot of information about this topic but I have no answer.

I have 3 servers with following components

  1. server1 - WSO2 IS + OpenLDAP
  2. server2 - WSO2 Gateway
  3. server3 - Publisher + Store

All of theese servers working with LDAP and I have no problems to login to IS, Gateway, publisher and store with my Ldap login.

In Publisher config file I wrote Gateway server2 but when I publish new test API I have access to this API (server3:8243/ddd/v1/aaa), but via gateway I have no access https://server2:8243/ddd/v1/aaa and I got an Error 404.

How I need to configure my WSO2 Publisher or Gateway.

P.S. At this moment I have no genereated ssl keys in a keystore. Can you tell me how to resolve this problem for testing my TEST API?


Solution

  • When you publish an API from the publisher, it pushes the Synapse artifact of the API to the gateway node. But in your case, as you haven't changed any configuration in Publisher/Store node, it points to the server itself.

    You can edit the server 3 and point server 2 which is your gateway node. Edit the api-manager.xml file in APIM/repository/conf location.

    <APIGateway>
       <Environments>
           <Environment type="hybrid" api-console="true">
                <Name>Production and Sandbox</Name>
                <Description>This is a hybrid gateway that handles both production and sandbox token traffic.</Description>          
                <ServerURL>https://[API-Gateway-Host-or-IP]:9443/services/</ServerURL>
                <Username>${admin.username}</Username>
                <Password>${admin.password}</Password>          
                <GatewayEndpoint>http://[API-Gateway-Host]:8280,https://[API-Gateway-Host]:8243</GatewayEndpoint>
           </Environment>
       </Environments>
    </APIGateway>