首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >没有在码头集装箱中运行的WebSphere自由

没有在码头集装箱中运行的WebSphere自由
EN

Stack Overflow用户
提问于 2018-09-09 08:52:47
回答 1查看 2K关注 0票数 1

我有一个自由的码头容器,巫婆似乎开始很好,但当我试图通过浏览器进入服务器是不可及的。我使用IBMSample1.war进行测试,以确保它不是war文件。我的问题是日志文件看起来很好:

代码语言:javascript
复制
[AUDIT   ] CWWKE0001I: The server defaultServer has been launched.
[AUDIT   ] CWWKE0100I: This product is licensed for development, and limited production use. The full license terms can be viewed here: https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/license/base_ilan/ilan/18.0.0.2/lafiles/en.html
[AUDIT   ] CWWKG0093A: Processing configuration drop-ins resource: /opt/ibm/wlp/usr/servers/defaultServer/configDropins/defaults/keystore.xml
[AUDIT   ] CWWKZ0058I: Monitoring dropins for applications.
[AUDIT   ] CWWKT0016I: Web application available (default_host): http://localhost:9080/Sample1/
[AUDIT   ] CWWKZ0001I: Application Sample1 started in 0.394 seconds.
[AUDIT   ] CWWKF0012I: The server installed the following features: [servlet-3.1].
[AUDIT   ] CWWKF0011I: The server defaultServer is ready to run a smarter planet.

在这里,码头文件:

代码语言:javascript
复制
FROM websphere-liberty:kernel

COPY server.xml /config/
COPY build/libs/Sample1.war /config/dropins/
RUN installUtility install --acceptLicense defaultServer

我不知道如何在没有错误的情况下调试。谢谢

在这里,我的Server.xml:

代码语言:javascript
复制
<server description="default servlet engine">

<!-- Enable features -->
<featureManager>
    <feature>servlet-3.1</feature>
</featureManager>
<httpEndpoint host="localhost" httpPort="9080" httpsPort="9443"
              id="defaultHttpEndpoint" />

EN

回答 1

Stack Overflow用户

发布于 2018-09-11 11:18:20

您的服务器运行时似乎没有错误,而且Sample1 war也是使用web /Sample1部署的。

如前所述,你需要的是:

  1. 将httpEndpoint中的server.xml host="localhost“更改为host="*"
  2. 请确保您使用端口映射运行码头。 docker run -d -p 80:9080 -p 443:9443 your-liberty-name
  3. 打开浏览器并输入url (我猜您运行了Sample1演示程序,其中包含一个SimpleServlet )。 http://the-ip/Sample1/SimpleServlethttps://the-ip/Sample1/SimpleServlet

上面告诉我们使用端口80和443 (标准端口,不需要在url中指定它们),-ip取决于您是运行本地坞容器还是远程端口。如果运行本地,则输入您的ip/localhost。

我还建议下载用于eclipse的工具,它允许您在IDE环境中非常轻松地管理服务器。

有一些很好的链接:

IBM -创建码头容器.

码头枢纽网络自由..。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/52242883

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档