无法启动glassfish服务器,因为无法锁定/opt/glassfishv3/glassfish/domains/domain1/logs/server.log [英] Failed to start glassfish server because Couldn't get lock for /opt/glassfishv3/glassfish/domains/domain1/logs/server.log

查看:102
本文介绍了无法启动glassfish服务器,因为无法锁定/opt/glassfishv3/glassfish/domains/domain1/logs/server.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.

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

Before it died, it produced the following output:

   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.

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

Before it died, it produced the following output:

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并通过以下命令启动了服务器

I just installed glassfish in my host machine and changed the domain.xml with my host ip and started the server through the following command

./asadmin起始域domain1

我有上述例外情况,我是Glassfish的新手,请帮助我解决这个问题, 提前致谢 @dinesh

I got the above exceptions ,I am new to glassfish please help me out how to over come this issue , Thanks in advance @dinesh

推荐答案

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

I had the same problem and changing the directory permissions solved that issue. Try this:

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

这篇关于无法启动glassfish服务器,因为无法锁定/opt/glassfishv3/glassfish/domains/domain1/logs/server.log的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆