title: Glassfish 3.1 CREDENTIAL_ERROR in Eclipse
body: <p>I can't start Glassfish 3.1 on Eclipse Indigo with "Oracle Glassfish Server Tools" plugin on Windows 7. After installing the plugin, I've chosen "New" -> "Server" in the server view and clicked on GlassFish 3.1 and downloaded the installation through Eclipse.</p>
  
  <p>Every time I try to start it, I've the following message:</p>
  
  <pre><code>The Eclipse plugin cannot communicate with the GlassFish server, 
  status is :CREDENTIAL_ERROR
  </code></pre>
  
  <p>I've found out that the initial password is 'changeit' and I've changed it to my own, on the command line:</p>
  
  <pre><code>bin/asadmin change-master-password  domain1
  Enter the current master password&gt;
  Enter the new master password&gt;
  Enter the new master password again&gt;
  Command change-master-password executed successfully.
  </code></pre>
  
  <p>I've changed it accordingly in GlasshFish 3.1 configuration screen within Eclipse in the section Application Server (Admin Password).</p>
  
  <p>The ports listed (8080, 4848) seems compatible with domain.xml configuration:</p>
  
  <pre><code>&lt;network-listeners&gt;
      &lt;network-listener port="8080" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"&gt;&lt;/network-listener&gt;
      &lt;network-listener port="8181" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"&gt;&lt;/network-listener&gt;
      &lt;network-listener port="4848" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"&gt;&lt;/network-listener&gt;
  &lt;/network-listeners&gt;
  </code></pre>
  
  <p>However, in my .log I find the following:</p>
  
  <pre><code>!ENTRY oracle.eclipse.tools.glassfish 4 1 2011-08-04 11:38:43.925
  !MESSAGE GlassFish: error 
  !STACK 0
  java.net.ConnectException: Connection refused: connect
      at java.net.PlainSocketImpl.socketConnect(Native Method)
      at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
      at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
      at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
      at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
      at java.net.Socket.connect(Socket.java:525)
      at java.net.Socket.connect(Socket.java:475)
      at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
      at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
      at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
      at sun.net.www.http.HttpClient.&lt;init&gt;(HttpClient.java:233)
      at sun.net.www.http.HttpClient.New(HttpClient.java:306)
      at sun.net.www.http.HttpClient.New(HttpClient.java:323)
      at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:860)
      at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:801)
      at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:726)
      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(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:619)
  
  !ENTRY oracle.eclipse.tools.glassfish 4 150 2011-08-04 11:38:43.928
  !MESSAGE The Eclipse plugin cannot communicate with the GlassFish server, status is :CREDENTIAL_ERROR
  !STACK 0
  java.lang.RuntimeException: The Eclipse plugin cannot communicate with the GlassFish server.Status is :CREDENTIAL_ERROR
      at com.sun.enterprise.jst.server.sunappsrv.SunAppServerLaunch.launch(SunAppServerLaunch.java:163)
      at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854)
      at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
      at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:696)
      at org.eclipse.wst.server.core.internal.Server.startImpl2(Server.java:3404)
      at org.eclipse.wst.server.core.internal.Server.startImpl(Server.java:3342)
      at org.eclipse.wst.server.core.internal.Server$StartJob.run(Server.java:363)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
  </code></pre>
  
  <p>So it seems that the error message shown in the interface is misleading, it should be a connection problem, not password problem, as far as I understand. Anyone knows how to solve this problem?</p>