Hana90
Hana90

Reputation: 925

GlassFish server: Remote server does not listen for requests

After installing and successfully create domain1, I tried some services on. However after updating my windows on the next day. the server can't start on either Eclipse nor terminal. There is a directory for domain1 at "glassfish4\glassfish\domains\domain1".

On terminal I got this error: $ ./asadmin start-domain domain1

Can't find the default domains directory. There is no value for this system property: com.sun.aas.domainsRoot Command start-domain failed.

On Eclipse, I got this runtime exception: Launching GlassFish on Felix platform

Exception in thread "main" java.lang.RuntimeException: java.io.FileNotFoundException: C:\glassfish4\glassfish\config\osgi.properties (The system cannot find the file specified)
    at com.sun.enterprise.glassfish.bootstrap.MainHelper.mergePlatformConfiguration(MainHelper.java:571)
    at com.sun.enterprise.glassfish.bootstrap.MainHelper.buildStartupContext(MainHelper.java:391)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:80)
    at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
Caused by: java.io.FileNotFoundException: C:\glassfish4\glassfish\config\osgi.properties (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:146)
    at com.sun.enterprise.glassfish.bootstrap.MainHelper$PlatformHelper.readPlatformConfiguration(MainHelper.java:700)
    at com.sun.enterprise.glassfish.bootstrap.MainHelper$FelixHelper.readPlatformConfiguration(MainHelper.java:759)
    at com.sun.enterprise.glassfish.bootstrap.MainHelper.mergePlatformConfiguration(MainHelper.java:569)
    ... 3 more

Versions I used: java version "1.7.0_79"

Java(TM) SE Runtime Environment (build 1.7.0_79-b15)

Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)

GlassFish 4

Please, any idea how to solve this problem?

Upvotes: 1

Views: 9525

Answers (1)

Mike
Mike

Reputation: 4963

The answer to your question is that you need to run asadmin start-domain.


The error message is telling you the problem. You are calling the command start-admin, but that is not a valid command. It also tells you that the closest command is start-domain which is the command you should be using.

The cause of the error message is that asadmin supports both local and remote commands. Local commands can be run while the server is offline because they are all run on the same machine where they are called. Remote commands need to have a running server, because they connect to the Domain Admin Server (DAS) on port 4848.

In your case, the start-admin command doesn't exist, so GlassFish tried and failed to find a matching local command. When it tried to find a matching remote command, it failed because no GlassFish server was running.

Upvotes: 2

Related Questions