我有一个自由的码头容器,巫婆似乎开始很好,但当我试图通过浏览器进入服务器是不可及的。我使用IBMSample1.war进行测试,以确保它不是war文件。我的问题是日志文件看起来很好:
[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.在这里,码头文件:
FROM websphere-liberty:kernel
COPY server.xml /config/
COPY build/libs/Sample1.war /config/dropins/
RUN installUtility install --acceptLicense defaultServer我不知道如何在没有错误的情况下调试。谢谢
在这里,我的Server.xml:
<server description="default servlet engine">
<!-- Enable features -->
<featureManager>
<feature>servlet-3.1</feature>
</featureManager>
<httpEndpoint host="localhost" httpPort="9080" httpsPort="9443"
id="defaultHttpEndpoint" />
发布于 2018-09-11 11:18:20
您的服务器运行时似乎没有错误,而且Sample1 war也是使用web /Sample1部署的。
如前所述,你需要的是:
server.xml host="localhost“更改为host="*"docker run -d -p 80:9080 -p 443:9443 your-liberty-name上面告诉我们使用端口80和443 (标准端口,不需要在url中指定它们),-ip取决于您是运行本地坞容器还是远程端口。如果运行本地,则输入您的ip/localhost。
我还建议下载用于eclipse的工具,它允许您在IDE环境中非常轻松地管理服务器。
有一些很好的链接:
https://stackoverflow.com/questions/52242883
复制相似问题