Glassfish 3.1 Eclipse中的CREDENTIAL_ERROR [英] Glassfish 3.1 CREDENTIAL_ERROR in Eclipse

查看:93
本文介绍了Glassfish 3.1 Eclipse中的CREDENTIAL_ERROR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不能在Windows 7上使用Oracle Glassfish Server Tools插件在Eclipse Indigo上启动Glassfish 3.1。安装插件后,我在服务器视图中选择了新建 - >服务器,并点击了GlassFish 3.1并通过Eclipse下载安装。



每次尝试启动它时,我都有以下消息:



pre> Eclipse插件无法与GlassFish服务器通信,
状态为:CREDENTIAL_ERROR

我发现初始密码是changeit,我已经在命令行中将其更改为我自己的:

  bin / asadmin change-master-password domain1 
输入当前主密码>
输入新的主密码>
再次输入新的主密码>
命令change-master-password执行成功。

我已经在Eclipse中的GlasshFish 3.1配置屏幕中,在Application Server(Admin Password列出的端口(8080,44848)似乎与domain.xml配置兼容:

 <网络 - 听众> 
< network-listener port =8080protocol =http-listener-1transport =tcpname =http-listener-1thread-pool =http-thread-pool> < /网络收听GT;
< network-listener port =8181protocol =http-listener-2transport =tcpname =http-listener-2thread-pool =http-thread-pool> < /网络收听GT;
< network-listener port =4848protocol =admin-listenertransport =tcpname =admin-listenerthread-pool =admin-thread-pool>< / network章24 -listener>
< / network-listeners>

然而,在我的.log中找到以下内容:

 !ENTRY oracle.eclipse.tools.glassfish 4 1 2011-08-04 11:38:43.925 
!MESSAGE GlassFish:错误
!堆栈0
java.net.ConnectException:Connection refused:connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
在java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
在java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
在java.net.SocksSocketImpl.connect (SocksSocketImpl.java:366)
java.net.Socket.connect(Socket.java:525)
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。< in它>(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)
在com.sun.enterprise.jst.server.sunappsrv.commands.CommandRunner.call(CommandRunner.java:1)
在java.util.concurrent.FutureTask $ Sync.innerRun(FutureTask.java:303)
在java.util.concurrent.FutureTask.run(FutureTask.java:138)
在java.util.concurrent.ThreadPoolExecutor $ Worker.runTask(ThreadPoolExecutor .java:886)
在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:908)
a t java.lang.Thread.run(Thread.java:619)

!ENTRY oracle.eclipse.tools.glassfish 4 150 2011-08-04 11:38:43.928
!MESSAGE Eclipse插件无法与GlassFish服务器通信,状态为:CREDENTIAL_ERROR
!STACK 0
java.lang.RuntimeException:Eclipse插件无法与GlassFish服务器通信。状态为:CREDENTIAL_ERROR
at com.sun.enterprise.jst.server.sunappsrv.SunAppServerLaunch.launch(SunAppServerLaunch.java:163)
在org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854)
在org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
在org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:696)
在org.eclipse.wst.server.core.internal.Server.startImpl2(Server.java:3404)
在org.eclipse.wst.server.core.internal.Server.startImpl(Server.java:3342 )
在org.eclipse.wst.server.core.internal.Server $ StartJob.run(Server.java:363)
在org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

所以看来接口显示的错误信息是误导的,应该是一个连接问题,而不是密码问题,据我所知。任何人都知道如何解决这个问题?

解决方案

禁用ZoneAlarm防火墙后,我可以在Windows上成功启动GlassFish。然而,我开始有许多无关的和令人讨厌的问题,正如Mico所建议的那样,我转而使用Linux,这是我平常的开发平台,一切顺利。



要记录该过程:


  1. 使用Eclipse Indigo,默认情况下不会显示GlassFish连接器。在WTP的服务器选项卡中,右键单击并选择新建 - >服务器,然后单击链接下载其他服务器适配器,选择GlassFish,然后按下一步,接受许可证并完成。


  2. 这次我从 http://glassfish.java.net/ 自己下载了GlassFish,并选择在.sh文件的风格下,Unix的开源版本完整平台。


  3. 在命令行上,我将档案移到我想要的父文件夹中安装并称为sh glassfish-3.1.1-unix.sh,其中显示了一个图形配置。我选择典型配置。


  4. 如果选择自动升级选项,请准备等待几分钟。这是一个自3.0.1以来已知的错误,似乎他们喜欢记录,而不是修复它。没有必要按照建议取消安装,只需拿一杯咖啡或阅读一些消息即可。


  5. 一旦安装GlassFish, Eclipse服务器选项卡,选择新建 - >服务器并选择GlassFish - >GlassFish服务器开源版本4(Java EE 6),浏览Glassfish的domain1目录,将管理员密码留空。


在这一点上,可以在Glassfish上部署项目,就像我以前在Tomcat中所做的一样。在我的第一天的经验中,热调配置的工作,但并不总是,经常是服务器停止+启动是必要的。


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?

解决方案

After disabling ZoneAlarm firewall I could successfully start GlassFish on Windows. However, I then started to have many kind of unrelated and annoying problems and as Mico suggested, I switched back using Linux, which is my usual development platform, and everything went fine.

To document the process:

  1. with Eclipse Indigo, GlassFish connector is not present by default. In WTP's server tab, right click and choose New -> Server and click on the link "Download additional server adapters", choose GlassFish and press Next, accept the license and Finish.

  2. This time I downloaded GlassFish myself from http://glassfish.java.net/ and choose the open source edition full platform for Unix in the flavour of .sh file.

  3. On the command line I moved the archive in the parent folder where I wanted it installed and called "sh glassfish-3.1.1-unix.sh", which brings up a graphical configuration. I choose Typical configuration.

  4. If you choose the auto upgrade option, be prepared to wait several minutes. It's a known bug since 3.0.1, that seems they preferred to document, rather than fix it. It's not necessary to follow the advice to cancel the install, just grab a coffee or read some news, it will get through.

  5. Once GlassFish is installed, in Eclipse server tab, choose New -> Server and choose "GlassFish" -> "GlassFish Server Open Source Edition 4 (Java EE 6)", browse domain1 directory of Glassfish, leave admin password blank.

At this point it's possible to deploy projects on Glassfish, just like I used to do in Tomcat. In my first day experience, hot redeployment sort of work, but not always, quite often a server stop + start has been necessary.

这篇关于Glassfish 3.1 Eclipse中的CREDENTIAL_ERROR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆