问题描述
我试图从命令行运行websphere liberty配置文件服务器。我按照此处介绍的步骤操作:
我创建了名为server1的服务器。
但是当提取完成后,我尝试使用以下命令启动服务器: server start server1
p>
服务器引发错误: CWWKE0054E:无法打开文件C:\wlp\wlp\usr\servers\server1\ logs\C:\Users\Furquan\AppData\Local\Temp\\ihp_custom_batches.log。
。现在我知道这不可能是一个有效的路径,但我不知道在哪里和如何改变它。请帮忙 !!
此错误与您拥有的 LOG_FILE
环境变量相关在你的环境中由一些其他程序定义。要解决这个问题,您有以下的反对:
- 删除
LOG_FILE
env变量,如果您的系统不再需要它 -
如果您不这样做,请通过
server.env
您可以在具有以下内容的wlp \usr\servers\serverName
目录中创建:LOG_FILE = console.log
-
这不是建议,将使您的安装不支持,在某些安装可能会被更新覆盖) - 修改
server.bat
命令行脚本 - 在脚本中找到以下如果未定义LOG_FILE(
设置X_LOG_FILE = console.log
)else $ b set X_LOG_FILE =!LOG_FILE!
)
$ b b
在之后设置X_LOG_FILE =!LOG_FILE!
只是添加另一行,将使用默认值覆盖它 set X_LOG_FILE = console .log
一般来说,我推荐第二个解决方案(使用 server.env
file),因为它是最便携的,并且可以在任何环境下工作。
i am trying run the websphere liberty profile server from the command line. I am following the steps told here : https://developer.ibm.com/wasdev/downloads/liberty-profile-using-non-eclipse-environments/
I have created the server with the name server1.
But when the extraction completes and I try to start the server using the command : server start server1
the server throws an error : CWWKE0054E: Unable to open file C:\wlp\wlp\usr\servers\server1\logs\C:\Users\Furquan\AppData\Local\Temp\\ihp_custom_batches.log.
. Now I know this cant be a valid path, but I dont know where and how to change it. Please help !!
This error is related to the LOG_FILE
environment variable that you have defined in your environment by some other program. To solve that, you have the following opions:
- Remove
LOG_FILE
env variable, if it is no longer needed by your system If you cant do that, override it via
server.env
file, that you can create in thewlp\usr\servers\serverName
directory with the following content:LOG_FILE=console.log
As last resort (this is not recommended, will make your installation NOT SUPPORTED and in certain installations might get overwritten by updates) - modify the
server.bat
command line script - in the script find the following section:if not defined LOG_FILE ( set X_LOG_FILE=console.log ) else ( set X_LOG_FILE=!LOG_FILE! )
And after the line set X_LOG_FILE=!LOG_FILE!
just add another line that will override it with the default like this set X_LOG_FILE=console.log
In general, I'd recommend second solution (with the server.env
file), as it is the most portable and will work in any environment.
这篇关于websphere - CWWKE0054E错误无法打开文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!