Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
168 views
in Technique[技术] by (71.8m points)

java - Glassfish 3.1 CREDENTIAL_ERROR in Eclipse

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.

Every time I try to start it, I've the following message:

The Eclipse plugin cannot communicate with the GlassFish server, 
status is :CREDENTIAL_ERROR

I've found out that the initial password is 'changeit' and I've changed it to my own, on the command line:

bin/asadmin change-master-password  domain1
Enter the current master password>
Enter the new master password>
Enter the new master password again>
Command change-master-password executed successfully.

I've changed it accordingly in GlasshFish 3.1 configuration screen within Eclipse in the section Application Server (Admin Password).

The ports listed (8080, 4848) seems compatible with domain.xml configuration:

<network-listeners>
    <network-listener port="8080" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener>
    <network-listener port="8181" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener>
    <network-listener port="4848" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener>
</network-listeners>

However, in my .log I find the following:

!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.<init>(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)

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I got the "The Eclipse plugin cannot communicate with the GlassFish server, status is :CREDENTIAL_ERROR" error too.

I found a solution to my problem by ensuring that no other process was listening at port 8080.
To find processes that listens to port 8080, bring up a command prompt and type in the following:

netstat -a -n -o | find "8080"
  1. In the far right column, you'll see a process identifier.
  2. Bring up the windows task manager (hit ctrl+alt+delete and select "Start Task Manager") and go to the processes tab.
  3. Look for the column named "PID" (if it is not present already go to view -> select columns... -> check PID) and find the process with the PID you found using netstat.
    -> kill the process -> try again.

It worked for me.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...