传统websphere docker-将xml复制到节点

iswrvxsc  于 2021-07-09  发布在  Java
关注(0)|答案(0)|浏览(206)

我正在尝试对一个旧的应用程序进行dockerize。这项工作的一部分涉及将命名空间绑定、资源、安全性和变量(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配置没有替代方案。
更新:使用 docker run bash 根据lwestby的建议,我能够检索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

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题