WSO2 API 经理,新网关端点不工作
WSO2 API Manager, new gateway endpoint not woking
我已经使用静态 IP 地址将 WSO2 API 管理器托管到我的虚拟机中。
我可以通过输入这些地址打开我的 Carbon、Publisher 和 Store 页面:
https://my.ip.address:9443/publisher
https://my.ip.address:9443/store
https://my.ip.address:9443/carbon
当我在发布者页面中添加 API 时,它会在 172.x.x.x.x
地址中创建端点,该地址仅供内部使用。
因此,为了在外部访问我的端点,我将 \wso2\wso2am-2.1.0\repository\conf\api-manager.xml
中的这些行写入 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>
现在,当我发布 API 的生产和沙盒 URL 时:
http://my.ip.address:8280/path/to/my/api
https://my.ip.address:8243/path/to/my/api
但是,当我尝试向我的 API 网址发出请求时,出现超时错误。
为什么会这样?
主要问题是我的系统管理员没有为本地网络以外的用户打开 8280
和 8243
端口。
我已经使用静态 IP 地址将 WSO2 API 管理器托管到我的虚拟机中。
我可以通过输入这些地址打开我的 Carbon、Publisher 和 Store 页面:
https://my.ip.address:9443/publisher
https://my.ip.address:9443/store
https://my.ip.address:9443/carbon
当我在发布者页面中添加 API 时,它会在 172.x.x.x.x
地址中创建端点,该地址仅供内部使用。
因此,为了在外部访问我的端点,我将 \wso2\wso2am-2.1.0\repository\conf\api-manager.xml
中的这些行写入 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>
现在,当我发布 API 的生产和沙盒 URL 时:
http://my.ip.address:8280/path/to/my/api
https://my.ip.address:8243/path/to/my/api
但是,当我尝试向我的 API 网址发出请求时,出现超时错误。
为什么会这样?
主要问题是我的系统管理员没有为本地网络以外的用户打开 8280
和 8243
端口。