0
votes

I have hosted WSO2 API Manager into my virtual machine with static ip address.

I can open my Carbon, Publisher and Store page by entering these addresses:

https://my.ip.address:9443/publisher
https://my.ip.address:9443/store
https://my.ip.address:9443/carbon

When I add my API in my publisher page, it creates endpoint in 172.x.x.x.x address which is only for internal use.

So in order to have access to my endpoints outside I have written these lines in my \wso2\wso2am-2.1.0\repository\conf\api-manager.xml into APIGateway:

<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>
            <!-- Server URL of the API gateway -->
            <ServerURL>https://localhost:${mgt.transport.https.port}${carbon.context}services/</ServerURL>
            <!-- Admin username for the API gateway. -->
            <Username>${admin.username}</Username>
            <!-- Admin password for the API gateway.-->
            <Password>${admin.password}</Password>
            <!-- Endpoint URLs for the APIs hosted in this API gateway.-->
            <GatewayEndpoint>http://${carbon.local.ip}:${http.nio.port},https://${carbon.local.ip}:${https.nio.port},http//my.ip.address:${http.nio.port},https://my.ip.address:${https.nio.port}</GatewayEndpoint>
        </Environment>
    </Environments>
</APIGateway>

Now when I publish my APIs Production and Sandbox URLs are:

 http://my.ip.address:8280/path/to/my/api
 https://my.ip.address:8243/path/to/my/api

However, when I try to make requests to my API urls, I get timeout errors.

Why this is happening?

1
please enable wire logs and update the question with the logs. lakshanigamage.blogspot.com/2015/03/…Bee
@Bhathiya Then where I can get these logs?Mr.D
in repository/logs/wso2carbon.logBee
@Bhathiya I have opened this file. It has shown me very big sequence of data. Copy-pasting all of them seems to be useless. What I should be searching there?Mr.D
The logs should be printed on console (command line) as well. You can easily isolate logs for a single request there.Bee

1 Answers

0
votes

The main problem was that my system administrator didn't open 8280 and 8243 ports for users that outside of local network.