[英]Failed to start glassfish server because Couldn't get lock for /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.
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 我刚刚在主机中安装了glassfish,并使用主机ip更改了domain.xml并通过以下命令启动了服务器
./asadmin start-domain domain1 ./asadmin起始域domain1
I got the above exceptions ,I am new to glassfish please help me out how to over come this issue , Thanks in advance @dinesh 我有上述例外,我是Glassfish的新手,请帮助我解决这个问题,谢谢@dinesh
I had the same problem and changing the directory permissions solved that issue. 我遇到了同样的问题,更改目录权限解决了该问题。 Try this:
尝试这个:
sudo chmod -R 777 /opt/glassfishv3/glassfish/
Looks like you don't have writing permissions to the folder /opt/glassfishv3/glassfish/domains/domain1/logs/ and / or file server.log ... and / or the folder / file doesn't exist. 似乎您没有对文件夹/ opt / glassfishv3 / glassfish / domains / domain1 / logs /和/或文件server.log的写入权限...和/或文件夹/文件不存在。
Try sudo
or change the folder's permission settings. 尝试
sudo
或更改文件夹的权限设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.