如何删除已创建的服务器WebSphere Application Server Liberty Profile

问题描述 投票:0回答:1

我正在研究码头图像

在docker文件中设置...

# - Liberty installation of required features
RUN /opt/wlp/bin/featureManager install adminCenter-1.0 localConnector-1.0 jaxrs-1.1 jsp-2.2 jdbc-4.0 jndi-1.0 cdi-1.0 servlet-3.0 beanValidation-1.0 --when-file-exists=ignore --acceptLicense

RUN /opt/wlp/bin/server create my-server
...

但得到错误

CWWKE0005E: The runtime environment could not be launched.
CWWKE0045E: It was not possible to create the server called cca-dist-d because the server directory /srv/www/servers/my-server already exists.
ERROR: Service 'appserver' failed to build: The command '/bin/sh -c /opt/wlp/bin/server create my-server' returned a non-zero code: 1

有没有办法在创建之前删除此类服务器或任何建议?

只是因为通知rm -R不起作用:-(

RUN /bin/bash -c 'rm -R  /opt/wlp/bin/server/my-server'
---> Running in 83f*****bd
rm: cannot remove '/opt/wlp/bin/server/my-server': Not a directory
websphere-liberty
1个回答
1
投票

关于Liberty配置文件服务器删除,它就像删除整个目录一样简单。例如

rm -R WLP_HOME / usr / servers / my-server

现在关于您的错误消息,您应该检查服务器存在的原因。听起来你的设置有问题。

如果你想删除my-server,那么你应该删除正确的目录。在你的情况下:

rm -R / srv / www / servers / my-server

服务器从servers directory环境创建到WLP_USER_DIR。并且该变量可用于指定${wlp.user.dir}的备用位置。如果指定了此选项,则运行时将在指定目录中查找共享资源和服务器定义。有关不同环境变量的更多信息,请查看server start scriptREADME file

在你的情况下,似乎WLP_USER_DIR是/srv/www/

© www.soinside.com 2019 - 2024. All rights reserved.