title: Cannot start Glassfish via Eclipse Plugin (ConnectException)
body: <p>On a Windows7 64 bit system, I have Eclipse Juno Service Release 1 and have installed the Glassfish plugin directly from <a href="http://dlc.sun.com.edgesuite.net/glassfish/eclipse/juno/" rel="nofollow">http://dlc.sun.com.edgesuite.net/glassfish/eclipse/juno/</a>.  </p>
  
  <p>I have also installed the open source version of Glassfish 3.1.2.2 (via the zip file) to my machine.  </p>
  
  <p>I have created server runtime environments for my installed version of Glassfish and also the embedded version of Glassfish 3.1.2.2.  I have created a server in Eclipse for each of the runtime environments. </p>
  
  <p>When I try to start either of them from Eclispe, I get this error (which is not that helpful):</p>
  
  <pre><code>!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.&lt;init&gt;(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)
  </code></pre>
  
  <p>I can start my locally installed Glassfish (i.e. not the embedded one) via the command line scripts.  I have triple checked that there are no port conflicts with 4848, 8080 and 8181.  My firewall is currently off (when I am on my corporate domain).</p>
  
  <p>Can anybody suggest why I cannot start Glassfish via the Eclipse plugin?</p>