javaglassfishasadmin

Glassfish fails to start


So I am trying to restart glassfish server but it fails to start. What could be the error?

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 ..............................................................................................................................................................................................................................

Anyone kindly advice?


Solution

  • Judging by "Permission denied" error you got, try one of the following:

    1) Give write permissions on the directory with Glassfish to your Linux user

    2) Start asadmin with sudo command