gpt4 book ai didi

java - 启动 GoldFish 服务器时出错 : Ubuntu 13. 10

转载 作者:行者123 更新时间:2023-11-30 03:41:35 29 4
gpt4 key购买 nike

我咨询了herehere但无法解决我的问题。

当我在终端 /opt/glassfish4/glassfish/bin/asadmin start 上键入此内容时,我得到以下结果:

Remote server does not listen for requests on [localhost:4848]. Is the server up?
Unable to get remote commands.
Closest matching local command(s):
restart-domain
restart-local-instance
start-database
start-domain
start-local-instance

Command start failed.

同样,当我输入 /opt/glassfish4/glassfish/bin/asadmin --port 5656 start-domain 时,我得到

java.io.IOException: Couldn't get lock for /opt/glassfish4/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:98)
at com.sun.enterprise.admin.launcher.GFLauncher.setup(GFLauncher.java:191)
at com.sun.enterprise.admin.servermgmt.cli.StartDomainCommand.createLauncher(StartDomainCommand.java:220)
at com.sun.enterprise.admin.servermgmt.cli.StartDomainCommand.executeCommand(StartDomainCommand.java:117)
at com.sun.enterprise.admin.cli.CLICommand.execute(CLICommand.java:321)
at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:360)
at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:298)
at org.glassfish.admin.cli.AsadminMain.main(AsadminMain.java:56)
Waiting for domain1 to start .Error starting domain domain1.
The server exited prematurely with exit code 1.
Before it died, it produced the following output:

Launching GlassFish on Felix platform
Exception in thread "main" java.lang.RuntimeException: the domain directory is not writable.
at com.sun.enterprise.glassfish.bootstrap.MainHelper.verifyDomainRoot(MainHelper.java:244)
at com.sun.enterprise.glassfish.bootstrap.MainHelper.findInstanceRoot(MainHelper.java:347)
at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:78)
at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)

Command start-domain failed.

我感觉路径 /opt/glassfish4/glassfish/bin/asadmin 中存在问题。我正在开发我的第一个 JSF Web 应用程序,但无法运行 glassfish 服务器。我正在使用 Netbeans 和 ubuntu 13.10。谁能给我指路吗?

谢谢!

最佳答案

错误信息

java.io.IOException: Couldn't get lock for /opt/glassfish4/glassfish/domains/domain1/logs/server.log

Exception in thread "main" java.lang.RuntimeException: the domain directory is not writable.

表明您用于启动服务器的用户帐户在您的 Glassfish 域文件夹中没有写入权限。

要解决此问题,请更改权限或使用具有足够权限的用户启动 asadmin 命令。

如果这不能解决问题,则可能有另一个进程锁定了您的 server.log 文件,但我想您会注意到这一点。确保您可以运行

lsof /opt/glassfish4/glassfish/domains/domain1/logs/server.log

查看是否有任何进程正在使用该文件。

另请参阅:

关于java - 启动 GoldFish 服务器时出错 : Ubuntu 13. 10,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26746848/

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