【问题标题】:IBM Websphere Liberty Profile:How to map Public IP Address in WebsphereIBM Websphere Liberty Profile:如何在 Websphere 中映射公共 IP 地址
【发布时间】:2013-09-28 00:05:02
【问题描述】:

我正在尝试在 Websphere LP server.xml 文件中映射我的服务器公共 IP 地址,但是当我尝试从外部访问它时出现连接错误。我尝试给 host="localhost" 并尝试从服务器本身访问,它工作正常。

我需要在 Websphere LP 中配置什么才能从外部访问它吗?

Server.xml 文件

<server description="new server">

    <!-- Enable features -->
    <featureManager>
        <feature>jsp-2.2</feature>
        <feature>localConnector-1.0</feature>
    </featureManager>

    <httpEndpoint host="*" httpPort="8007" httpsPort="9443" id="defaultHttpEndpoint"/>



    <applicationMonitor updateTrigger="mbean"/>


    <library id="worklight-6.0.0">
        <fileset dir="C:\IBM\Liberty\usr\shared\resources" includes="worklight-jee-library-6.0.0.jar"/>
    </library>

    <library id="apps-common">
        <fileset dir="C:\IBM\Liberty\usr\shared\resources" includes="org.hsqldb.hsqldb_2.2.5.jar"/>
    </library>

    <application context-root="/DemoApp" id="DemoApplication" location="DemoApplication.war" name="DemoApplication" type="war">
        <classloader commonLibraryRef="worklight-6.0.0,apps-common"/>
    </application>
</server> 

感谢任何帮助。

【问题讨论】:

  • “外面”是什么意思?另一台机器或另一个网络?您可以从同一台机器“通过 IP”访问您的服务器吗?
  • 来自另一个网络....我无法通过从服务器机器提供我的服务器 ip 来访问我的服务器.....但是如果我提供 localhost 我可以访问...
  • 请查看更新后的帖子,在我制作的 Server.xml 文件中
  • 您的主机是否从外部机器/网络“可见”?您是否有任何防火墙阻止了端口 8007?你得到什么样的连接错误?

标签: websphere websphere-liberty


【解决方案1】:

根据 httpEndpoint 配置元素的 InfoCenter 文档,此处:http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/topic/com.ibm.websphere.wlp.doc/autodita/rwlp_metatype_4ic.html?resultof=%22%68%74%74%70%65%6e%64%70%6f%69%6e%74%22%20#mtFile121

* 的主机名将绑定到所有可用的网络接口 - 您不需要在 Liberty 端做任何额外的事情,我相信这可以回答您的问题。

将主机名设置为“localhost”意味着只能从您的计算机访问 http 端点。

使用提供的配置(主机名 *),这应该可以远程工作 - 因此可能是防火墙问题。

您可以检查 /servers/yourServer/logs/messages.log 文件以验证您的端点绑定到哪些接口 - 查找格式为

的消息

WWKO0219I: TCP 通道 defaultHttpEndpoint 已启动,现在正在侦听主机 localhost(IPv4:127.0.0.1)端口 9080 上的请求。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-12-19
    • 2017-01-21
    • 1970-01-01
    • 2013-02-03
    • 1970-01-01
    • 1970-01-01
    • 2014-12-06
    • 2012-08-21
    相关资源
    最近更新 更多