0

I have a problem, when I run asadmin start-domain to start the GlassFish server, an error message is shown.

asadmin start-domain
java.nio.file.AccessDeniedException: /opt/glassfish5/glassfish/domains/domain1/logs/server.log.lck
    at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
    at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
    at sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:177)
    at java.nio.channels.FileChannel.open(FileChannel.java:287)
    at java.nio.channels.FileChannel.open(FileChannel.java:335)
    at java.util.logging.FileHandler.openFiles(FileHandler.java:459)
    at java.util.logging.FileHandler.<init>(FileHandler.java:326)
    at com.sun.enterprise.admin.launcher.GFLauncherLogger.addLogFileHandler(GFLauncherLogger.java:100)
    at com.sun.enterprise.admin.launcher.GFLauncher.setup(GFLauncher.java:193)
    at com.sun.enterprise.admin.servermgmt.cli.StartDomainCommand.createLauncher(StartDomainCommand.java:228)
    at com.sun.enterprise.admin.servermgmt.cli.StartDomainCommand.executeCommand(StartDomainCommand.java:124)
    at com.sun.enterprise.admin.cli.CLICommand.execute(CLICommand.java:322)
    at com.sun.enterprise.admin.cli.AdminMain.executeCommand(AdminMain.java:372)
    at com.sun.enterprise.admin.cli.AdminMain.doMain(AdminMain.java:306)
    at org.glassfish.admin.cli.AsadminMain.main(AsadminMain.java:57)
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
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=192m; support was removed in 8.0
Exception in thread "main" java.lang.RuntimeException: the domain directory is not writable.
    at com.sun.enterprise.glassfish.bootstrap.MainHelper.verifyDomainRoot(MainHelper.java:260)
    at com.sun.enterprise.glassfish.bootstrap.MainHelper.findInstanceRoot(MainHelper.java:363)
    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.

Can help me please to resolve this matter.

0

1 Answer 1

1

I found the solution, I tired to change the permissions of the glassfish folder and worked for me. The cmd to change the permissions is sudo chmod -R 777 /path-to-Glassfish-folder

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .