如何解决传统的Websphere docker-将XML复制到节点
我正在尝试对较旧的应用程序进行docker化。这项工作的一部分涉及将名称空间绑定,资源,安全性和变量(XML文件)导入Docker容器。
我遇到的问题是使用COPY命令:
COPY --chown=was:root resources/xml/ /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/config/cells/DefaultCell01/nodes/DefaultNode01
使用此命令后,Websphere服务器崩溃,并且Docker容器退出。
完整的DockerFile:
FROM ibmcom/websphere-traditional:8.5.5.17
ENV ENABLE_BASIC_LOGGING=true
COPY tWAS/PASSWORD /tmp/PASSWORD
COPY resources/db2/ /opt/IBM/db2drivers/
COPY --chown=was:root resources/xml/ /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/config/cells/DefaultCell01/nodes/DefaultNode01
COPY --chown=was:root application.ear /work/app/Application.ear
COPY --chown=was:root tWAS/1_app_deploy.py /work/config/
RUN /work/configure.sh
我在某种程度上猜测,我尝试复制的目录在服务器启动时不可用(无法确认何时/是否生成了目录),或者是权限问题。不幸的是,它很快崩溃并显示以下错误:
Starting server ...................
ADMU0116I: Tool information is being logged in file
/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1/startServer.log
ADMU0128I: Starting tool with the AppSrv01 profile
ADMU3100I: Reading configuration for server: server1
ADMU0111E: Program exiting with error:
com.ibm.websphere.management.exception.AdminException
ADMU1211I: To obtain a full trace of the failure,use the -trace option.
ADMU0211I: Error details may be seen in the file:
/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1/startServer.log
我知道可以使用wsadmin脚本创建新的名称空间绑定的选项(这将需要大量工作),但是其他XML配置没有其他选择。
更新:
按照lwestby的建议使用docker run bash
,我能够检索到startServer.log:
[8/25/20 2:41:59:744 UTC] 00000001 ManagerAdmin I TRAS0017I: The startup trace state is *=info.
[8/25/20 2:41:59:843 UTC] 00000001 AdminTool A ADMU0128I: Starting tool with the AppSrv01 profile
[8/25/20 2:41:59:848 UTC] 00000001 AdminTool A ADMU3100I: Reading configuration for server: server1
[8/25/20 2:41:59:866 UTC] 00000001 ImplFactory W WSVR0072W: Ignoring undeclared override of interface,com.ibm.websphere.cluster.topography.DescriptionManager,with implementation,com.ibm.ws.cluster.propagation.bulletinboard.BBDescriptionManager
[8/25/20 2:41:59:966 UTC] 00000001 SDKUtils A ADML0004E: An exception occurred when attempting to expand variable $(JAVA_HOME) com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable JAVA_HOME
....
[8/25/20 2:42:02:938 UTC] 00000001 DefaultLaunch I ADML3001W: The defaultEnvironment property is missing from the systemlaunch.properties file.
[8/25/20 2:42:02:939 UTC] 00000001 LaunchCommand A ADML0004E: An exception occurred when attempting to expand variable ${USER_INSTALL_ROOT} com.ibm.wsspi.runtime.variable.UndefinedVariableException: Undefined variable USER_INSTALL_ROOT
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。