gpt4 book ai didi

java - 无法启动 glassfish 服务器,因为无法获取/opt/glassfishv3/glassfish/domains/domain1/logs/server.log 的锁定

转载 作者:行者123 更新时间:2023-12-01 08:02:14 25 4
gpt4 key购买 nike

admin@BRMSDEV:/opt/glassfishv3/glassfish/bin$ ./asadmin start-domain domain1
java.io.IOException: Couldn't get lock for /opt/glassfishv3/glassfish/domains/domain1/logs/server.log
at java.util.logging.FileHandler.openFiles(FileHandler.java:389)
at java.util.logging.FileHandler.<init>(FileHandler.java:287)
at com.sun.enterprise.admin.launcher.GFLauncherLogger.addLogFileHandler(GFLauncherLogger.java:85)
at com.sun.enterprise.admin.launcher.GFLauncher.setup(GFLauncher.java:148)
at com.sun.enterprise.admin.cli.StartDomainCommand.createLauncher(StartDomainCommand.java:239)
at com.sun.enterprise.admin.cli.StartDomainCommand.runCommandNotEmbedded(StartDomainCommand.java:122)
at com.sun.enterprise.admin.cli.StartDomainCommand.executeCommand(StartDomainCommand.java:117)
at com.sun.enterprise.admin.cli.CLICommand.execute(CLICommand.java:257)
at com.sun.enterprise.admin.cli.AsadminMain.executeCommand(AsadminMain.java:229)
at com.sun.enterprise.admin.cli.AsadminMain.main(AsadminMain.java:167)
Waiting for DAS to start .Error starting domain: domain1.
The server exited prematurely with exit code 0.

在它死之前,它产生了以下输出:

   Warning:  Cannot open log file: /opt/glassfishv3/glassfish/domains/domain1/logs/jvm.log
admin@BRMSDEV:/opt/glassfishv3/glassfish/bin$ ./asadmin start-domain domain1
java.io.IOException: Couldn't get lock for /opt/glassfishv3/glassfish/domains/domain1/logs/server.log
at java.util.logging.FileHandler.openFiles(FileHandler.java:389)
at java.util.logging.FileHandler.<init>(FileHandler.java:287)
at com.sun.enterprise.admin.launcher.GFLauncherLogger.addLogFileHandler(GFLauncherLogger.java:85)
at com.sun.enterprise.admin.launcher.GFLauncher.setup(GFLauncher.java:148)
at com.sun.enterprise.admin.cli.StartDomainCommand.createLauncher(StartDomainCommand.java:239)
at com.sun.enterprise.admin.cli.StartDomainCommand.runCommandNotEmbedded(StartDomainCommand.java:122)
at com.sun.enterprise.admin.cli.StartDomainCommand.executeCommand(StartDomainCommand.java:117)
at com.sun.enterprise.admin.cli.CLICommand.execute(CLICommand.java:257)
at com.sun.enterprise.admin.cli.AsadminMain.executeCommand(AsadminMain.java:229)
at com.sun.enterprise.admin.cli.AsadminMain.main(AsadminMain.java:167)
Waiting for DAS to start .Error starting domain: domain1.
The server exited prematurely with exit code 0.

在它死之前,它产生了以下输出:

Warning:  Cannot open log file: /opt/glassfishv3/glassfish/domains/domain1/logs/jvm.log
Warning: Forcing option -XX:LogFile=/tmp/hs_pid2234.log
Jun 27, 2014 8:36:05 AM com.sun.enterprise.glassfish.bootstrap.ASMain main
INFO: Launching GlassFish on Felix platform
Jun 27, 2014 8:36:05 AM com.sun.enterprise.glassfish.bootstrap.ASMain main
SEVERE: the domain directory is not writable.
java.lang.RuntimeException: the domain directory is not writable.
at com.sun.enterprise.glassfish.bootstrap.ASMainHelper.verifyAndSetDomainRoot(ASMainHelper.java:233)
at com.sun.enterprise.glassfish.bootstrap.AbstractMain.run(AbstractMain.java:89)
at com.sun.enterprise.glassfish.bootstrap.ASMainOSGi.run(ASMainOSGi.java:71)
at com.sun.enterprise.glassfish.bootstrap.AbstractMain.start(AbstractMain.java:78)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:82)
Command start-domain failed.

我刚刚在我的主机中安装了 glassfish,并使用我的主机 IP 更改了domain.xml,并通过以下命令启动了服务器

./asadmin 起始域domain1

我遇到了上述异常,我是 glassfish 的新手,请帮助我解决这个问题,提前致谢@迪内什

最佳答案

我遇到了同样的问题,更改目录权限解决了该问题。试试这个:

  1. sudo chmod -R 777/opt/glassfishv3/glassfish/
  2. 如果您使用的是 IntelliJ 之类的 IDE,则必须在 IDE 内启动 GlassFish Server。

关于java - 无法启动 glassfish 服务器,因为无法获取/opt/glassfishv3/glassfish/domains/domain1/logs/server.log 的锁定,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24447579/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com