【问题标题】:Cannot start Glassfish via Eclipse Plugin (ConnectException)无法通过 Eclipse 插件启动 Glassfish (ConnectException)
【发布时间】:2016-01-22 18:14:30
【问题描述】:

在 Windows7 64 位系统上,我有 Eclipse Juno Service Release 1,并直接从 http://dlc.sun.com.edgesuite.net/glassfish/eclipse/juno/ 安装了 Glassfish 插件。

我还在我的机器上安装了 Glassfish 3.1.2.2 的开源版本(通过 zip 文件)。

我已经为我安装的 Glassfish 版本和 Glassfish 3.1.2.2 的嵌入式版本创建了服务器运行时环境。我在 Eclipse 中为每个运行时环境创建了一个服务器。

当我尝试从 Eclispe 启动它们中的任何一个时,我收到了这个错误(这没什么帮助):

!ENTRY oracle.eclipse.tools.glassfish 4 1 2012-12-11 16:20:16.182
!MESSAGE GlassFish: error 
!STACK 0
    java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(Unknown Source)
        at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at sun.net.NetworkClient.doConnect(Unknown Source)
        at sun.net.www.http.HttpClient.openServer(Unknown Source)
        at sun.net.www.http.HttpClient.openServer(Unknown Source)
        at sun.net.www.http.HttpClient.<init>(Unknown Source)
        at sun.net.www.http.HttpClient.New(Unknown Source)
        at sun.net.www.http.HttpClient.New(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
        at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
        at com.sun.enterprise.jst.server.sunappsrv.commands.CommandRunner.call(CommandRunner.java:607)
        at com.sun.enterprise.jst.server.sunappsrv.commands.CommandRunner.call(CommandRunner.java:1)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

!ENTRY oracle.eclipse.tools.glassfish 4 150 2012-12-11 16:20:16.189
!MESSAGE The Eclipse plugin cannot communicate with the GlassFish server....
!STACK 0
    java.lang.RuntimeException: The Eclipse plugin cannot communicate with the GlassFish server.Please, check for other software blocking or using this port, or firewall configuration, or VPN setup which might block some ports...
        at com.sun.enterprise.jst.server.sunappsrv.SunAppServerLaunch.launch(SunAppServerLaunch.java:155)
        at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855)
        at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704)
        at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:697)
        at org.eclipse.wst.server.core.internal.Server.startImpl2(Server.java:3484)
        at org.eclipse.wst.server.core.internal.Server.startImpl(Server.java:3420)
        at org.eclipse.wst.server.core.internal.Server$StartJob.run(Server.java:367)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

我可以通过命令行脚本启动本地安装的 Glassfish(即不是嵌入式的)。我三重检查了 4848、8080 和 8181 没有端口冲突。我的防火墙当前已关闭(当我在公司域中时)。

谁能建议我为什么不能通过 Eclipse 插件启动 Glassfish?

【问题讨论】:

    标签: eclipse-plugin glassfish-3


    【解决方案1】:

    我做了两件事,所以我不知道这两件事中哪一个为我解决了这个问题。

    1. 更改 domain.xml 中的端口
    2. 删除域文件夹中的osgi-cache文件夹。

    【讨论】:

      【解决方案2】:

      转到“asadmin”后,您应该能够使用以下命令启动 Glassfish 服务器上的任何域,并且 SAME WILL REFLECT IN THE ECLIPSE 只要您启动或停止任何域Glassfish 服务器(默认为 domain1)

      应在Internet选项>连接>局域网设置选项卡中检查“绕过本地地址的代理服务器”..

      这会起作用

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2010-11-25
        相关资源
        最近更新 更多