简体   繁体   English

GlassFish服务器:远程服务器不侦听请求

[英]GlassFish server: Remote server does not listen for requests

After installing and successfully create domain1, I tried some services on. 安装并成功创建domain1后,我尝试了一些服务。 However after updating my windows on the next day. 但是在第二天更新我的窗口后。 the server can't start on either Eclipse nor terminal. 服务器无法在Eclipse或终端上启动。 There is a directory for domain1 at "glassfish4\\glassfish\\domains\\domain1". domain1的目录位于“ glassfish4 \\ glassfish \\ domains \\ domain1”。

On terminal I got this error: $ ./asadmin start-domain domain1 在终端上,我收到此错误:$ ./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. 此系统属性没有任何值:com.sun.aas.domainsRoot命令启动域失败。

On Eclipse, I got this runtime exception: Launching GlassFish on Felix platform 在Eclipse上,我遇到了以下运行时异常:在Felix平台上启动GlassFish

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版本“ 1.7.0_79”

Java(TM) SE Runtime Environment (build 1.7.0_79-b15) Java(TM)SE运行时环境(内部版本1.7.0_79-b15)

Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode) Java HotSpot(TM)64位服务器VM(内部版本24.79-b02,混合模式)

GlassFish 4 GlassFish 4

Please, any idea how to solve this problem? 请问如何解决这个问题?

The answer to your question is that you need to run asadmin start-domain . 问题的答案是,您需要运行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. 您正在调用命令start-admin ,但这不是有效命令。 It also tells you that the closest command is start-domain which is the command you should be using. 它还告诉您最接近的命令是start-domain ,这是您应使用的命令。

The cause of the error message is that asadmin supports both local and remote commands. 错误消息的原因是, asadmin支持本地和远程命令。 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. 远程命令需要具有运行中的服务器,因为它们在端口4848上连接到Domain Admin Server(DAS)。

In your case, the start-admin command doesn't exist, so GlassFish tried and failed to find a matching local command. 在您的情况下, start-admin命令不存在,因此GlassFish尝试找到匹配的本地命令失败。 When it tried to find a matching remote command, it failed because no GlassFish server was running. 当它试图找到匹配的远程命令时,它失败了,因为没有运行GlassFish服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM