2016-11-04 103 views
1

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

现在,当我每次关机码头工人服务和wso2server再次启动,它看起来而不是使用真实IP(10.22.106.101)像一些服务检测搬运工虚拟接口IP(172.17.0.1):

[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

登录:

[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启动,但它可以防止扬鞭的用户界面的工作,因为它试图达到服务于172.17.0.1在超时结束了自该IP没有按” t对应于任何东西。

我能做些什么才能再次检测到真实的IP?

回答

1

您可以设置所需的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--> 

你也可能需要通过IP来代替${carbon.local.ip}在API-manager.xml了。

+0

感谢您的快速回答它把我放在良好的轨道,但你的“你可能”是不是真正满足,就像你不确定你在说什么。有关$ {carbon.local.ip}自动设置的详细信息:http://mail.wso2.org/mailarchive/dev/2014-March/028681.html。因此,当您检测到的IP不是您希望手动取代所有$ {carbon.local.ip}时,您不会“可能”。 – Tristan

-1

除了上面我们还需要编辑的<GatewayEndpoint>/wso2am-2.0.0/repository/conf/api-manager.xml文件并更改URL值替换${carbon.local.ip}

+1

它不是以上的补充。上面的评论说:“你必须手动替换所有$ {carbon.local.ip}发生”。此外,你应该使用“添加评论”而不是创建一个新的答案来说这个。 – Tristan