Glassfish 无法启动
Glassfish fails to start
所以我试图重新启动 glassfish 服务器,但它无法启动。可能是什么错误?
asadmin> start-domain
java.io.FileNotFoundException: /home/ubuntu/glassfish-3.1.1/glassfish/domains/domain1/logs/server.log (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
at java.io.FileOutputStream.<init>(FileOutputStream.java:142)
at java.util.logging.FileHandler.open(FileHandler.java:173)
at java.util.logging.FileHandler.openFiles(FileHandler.java:441)
at java.util.logging.FileHandler.<init>(FileHandler.java:287)
at com.sun.enterprise.admin.launcher.GFLauncherLogger.addLogFileHandler(GFLauncherLogger.java:100)
at com.sun.enterprise.admin.launcher.GFLauncher.setup(GFLauncher.java:178)
at com.sun.enterprise.admin.cli.StartDomainCommand.createLauncher(StartDomainCommand.java:205)
at com.sun.enterprise.admin.cli.StartDomainCommand.executeCommand(StartDomainCommand.java:105)
at com.sun.enterprise.admin.cli.CLICommand.execute(CLICommand.java:264)
at com.sun.enterprise.admin.cli.MultimodeCommand.executeCommands(MultimodeCommand.java:226)
at com.sun.enterprise.admin.cli.MultimodeCommand.executeCommand(MultimodeCommand.java:144)
at com.sun.enterprise.admin.cli.CLICommand.execute(CLICommand.java:264)
at com.sun.enterprise.admin.cli.AsadminMain.executeCommand(AsadminMain.java:306)
at com.sun.enterprise.admin.cli.AsadminMain.main(AsadminMain.java:238)
Waiting for domain1 to start ..............................................................................................................................................................................................................................
有好心人指教吗?
显然无法创建或打开日志文件:
/home/ubuntu/glassfish-3.1.1/glassfish/domains/domain1/logs/server.log
您应该确保文件夹结构存在并且进程(及其用户)可以访问。
根据 "Permission denied" 错误判断,请尝试以下操作之一:
1) 使用 Glassfish 将目录的写入权限授予您的 Linux 用户
2) 使用 sudo 命令启动 asadmin
所以我试图重新启动 glassfish 服务器,但它无法启动。可能是什么错误?
asadmin> start-domain
java.io.FileNotFoundException: /home/ubuntu/glassfish-3.1.1/glassfish/domains/domain1/logs/server.log (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
at java.io.FileOutputStream.<init>(FileOutputStream.java:142)
at java.util.logging.FileHandler.open(FileHandler.java:173)
at java.util.logging.FileHandler.openFiles(FileHandler.java:441)
at java.util.logging.FileHandler.<init>(FileHandler.java:287)
at com.sun.enterprise.admin.launcher.GFLauncherLogger.addLogFileHandler(GFLauncherLogger.java:100)
at com.sun.enterprise.admin.launcher.GFLauncher.setup(GFLauncher.java:178)
at com.sun.enterprise.admin.cli.StartDomainCommand.createLauncher(StartDomainCommand.java:205)
at com.sun.enterprise.admin.cli.StartDomainCommand.executeCommand(StartDomainCommand.java:105)
at com.sun.enterprise.admin.cli.CLICommand.execute(CLICommand.java:264)
at com.sun.enterprise.admin.cli.MultimodeCommand.executeCommands(MultimodeCommand.java:226)
at com.sun.enterprise.admin.cli.MultimodeCommand.executeCommand(MultimodeCommand.java:144)
at com.sun.enterprise.admin.cli.CLICommand.execute(CLICommand.java:264)
at com.sun.enterprise.admin.cli.AsadminMain.executeCommand(AsadminMain.java:306)
at com.sun.enterprise.admin.cli.AsadminMain.main(AsadminMain.java:238)
Waiting for domain1 to start ..............................................................................................................................................................................................................................
有好心人指教吗?
显然无法创建或打开日志文件:
/home/ubuntu/glassfish-3.1.1/glassfish/domains/domain1/logs/server.log
您应该确保文件夹结构存在并且进程(及其用户)可以访问。
根据 "Permission denied" 错误判断,请尝试以下操作之一:
1) 使用 Glassfish 将目录的写入权限授予您的 Linux 用户
2) 使用 sudo 命令启动 asadmin