WSO2与Docker不兼容 [英] WSO2 not compatible with Docker

查看:260
本文介绍了WSO2与Docker不兼容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不得不关闭wso2server来测试同一台机器上的其他API管理工具。另一个工具提供了在Docker上运行的快速设置,所以我不得不安装docker。

I had to shutdown wso2server to test an other API management tool on the same machine. The other tool provided a quick setup running on Docker so I had to install docker.

现在,当我关闭每个docker服务并再次启动wso2server时,它看起来像一些服务检测Docker虚拟接口IP(172.17.0.1)而不是使用真实的IP(10.22.106.101):

Now, when I shutdown every docker services and start wso2server again, it looks like some services detect docker virtual interface IP (172.17.0.1) instead of using the real IP (10.22.106.101) :

[2016-11-04 16:33:21,452]  INFO - CarbonUIServiceComponent Mgt Console URL  : https://172.17.0.1:9443/carbon/
[2016-11-04 16:33:21,452]  INFO - CarbonUIServiceComponent API Publisher Default Context : https://172.17.0.1:9443/publisher
[2016-11-04 16:33:21,452]  INFO - CarbonUIServiceComponent API Store Default Context : https://172.17.0.1:9443/store

从预期IP的前一天开始记录:

Log from a previous day with expected IP:

[2016-09-15 15:38:24,534]  INFO {org.wso2.carbon.ui.internal.CarbonUIServiceComponent} -  Mgt Console URL  :
 https://10.22.106.101:9443/carbon/ {org.wso2.carbon.ui.internal.CarbonUIServiceComponent}
[2016-09-15 15:38:24,534]  INFO {org.wso2.carbon.ui.internal.CarbonUIServiceComponent} -  API Publisher Defa
ult Context : https://10.22.106.101:9443/publisher {org.wso2.carbon.ui.internal.CarbonUIServiceComponent}
[2016-09-15 15:38:24,534]  INFO {org.wso2.carbon.ui.internal.CarbonUIServiceComponent} -  API Store Default
Context : https://10.22.106.101:9443/store {org.wso2.carbon.ui.internal.CarbonUIServiceComponent}

这不阻止WSO2启动,但是它可以防止Swagger-UI工作,因为它尝试在172.17.0.1上终止服务,因为该IP不对应任何东西。

This doesnt prevent WSO2 to start, but it prevents Swagger-UI to work because it's trying to reach services on 172.17.0.1 ending in timeout since this IP doesn't correspond to anything.

为了再次检测真实的IP,我该怎么办?

What can I do in order to have the real IP is detected again ?

推荐答案

IP $ carbon.xml

<!--
   Host name or IP address of the machine hosting this server
   e.g. www.wso2.org, 192.168.1.10
   This is will become part of the End Point Reference of the
   services deployed on this server instance.
-->
<!--HostName>www.wso2.org</HostName-->

<!--
Host name to be used for the Carbon management console
-->
<!--MgtHostName>mgt.wso2.org</MgtHostName-->

您可能需要替换 $ {carbon.local.ip} / code>在api-manager.xml中需要IP。

And you may have to replace ${carbon.local.ip} in api-manager.xml by required IP too.

这篇关于WSO2与Docker不兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆