Netbeans GlassFish Server 4,部署,连接被拒绝:connect,false,模块尚未部署。有关详细信息,请参阅服务器日志。

10

我的问题是我在运行任何Web应用程序后都会收到这个消息。例如,在NetBeans中,我创建一个新项目并选择Web应用程序,我保持所有默认设置,不更改名称。

然后我第一次部署时它可以工作,但当我关闭NetBeans并稍后重新打开并尝试重新部署之前有效的同一项目时,我会遇到该错误。首先,它会卡在“启动GlassFish Server 4”处,然后我停止它并重新部署,接着我就会得到

 Starting GlassFish Server 4
 GlassFish Server 4 is running.
 In-place deployment at C:\Users\****\Documents\NetBeansProjects\WebApplication1\build\web
 GlassFish Server 4, deploy, Connection refused: connect, false
 C:\Users\***\Documents\NetBeansProjects\WebApplication1\nbproject\build-impl.xml:1045: The       
 module has not been deployed.
 See the server log for details.
 BUILD FAILED (total time: 8 seconds)
这给了我很大的压力,因为我不知道如何处理它,这导致我考试失败,感觉无能为力真是太沮丧了,我立刻感到迷茫,然后就到了交作业的时间,而我还停留在第一项任务上,每个后续任务都取决于第一项任务的成功。从那以后,我一直在删除glassfish并重新安装来使其正常工作(可惜我在考试期间没有想到这一点,也应该更加注重实践而不是理论,那样我就可以看到问题了)。
我尝试过添加NetBeans到防火墙,更改端口和其他一些其他人建议的方法,但仍然没有成功,结果始终是相同的。我甚至使用了全新的虚拟机,但在关闭NetBeans并稍后重新打开时,我仍然会收到相同的消息,当我删除GlassFish并重新安装它时,它就可以正常工作。
以下是我的服务器日志,抱歉,我不知道如何让它更美观。 服务器日志:
[2014-09-13T04:14:44.926+0200] [glassfish 4.1] [INFO] [NCLS-LOGGING-00009] [javax.enterprise.logging] [tid: _ThreadID=17 _ThreadName=RunLevelControllerThread-1410574484853] [timeMillis: 1410574484926] [levelValue: 800] [[
  Running GlassFish Version: GlassFish Server Open Source Edition  4.1  (build 13)]]
[2014-09-13T04:14:44.928+0200] [glassfish 4.1] [INFO] [NCLS-LOGGING-00010] [javax.enterprise.logging] [tid: _ThreadID=17 _ThreadName=RunLevelControllerThread-1410574484853] [timeMillis: 1410574484928] [levelValue: 800] [[
  Server log file is using Formatter class: com.sun.enterprise.server.logging.ODLLogFormatter]]
[2014-09-13T04:14:45.135+0200] [glassfish 4.1] [INFO] [] [org.hibernate.validator.internal.util.Version] [tid: _ThreadID=19 _ThreadName=RunLevelControllerThread-1410574484859] [timeMillis: 1410574485135] [levelValue: 800] [[
  HV000001: Hibernate Validator 5.0.0.Final]]
[2014-09-13T04:14:45.151+0200] [glassfish 4.1] [INFO] [NCLS-SECURITY-01115] [javax.enterprise.system.core.security] [tid: _ThreadID=17 _ThreadName=RunLevelControllerThread-1410574484853] [timeMillis: 1410574485151] [levelValue: 800] [[
  Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.]]
[2014-09-13T04:14:45.154+0200] [glassfish 4.1] [INFO] [NCLS-SECURITY-01115] [javax.enterprise.system.core.security] [tid: _ThreadID=17 _ThreadName=RunLevelControllerThread-1410574484853] [timeMillis: 1410574485154] [levelValue: 800] [[
  Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.]]
[2014-09-13T04:14:45.167+0200] [glassfish 4.1] [INFO] [NCLS-SECURITY-01115] [javax.enterprise.system.core.security] [tid: _ThreadID=17 _ThreadName=RunLevelControllerThread-1410574484853] [timeMillis: 1410574485167] [levelValue: 800] [[
  Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.]]
[2014-09-13T04:14:45.217+0200] [glassfish 4.1] [INFO] [] [org.glassfish.ha.store.spi.BackingStoreFactoryRegistry] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1410574484859] [timeMillis: 1410574485217] [levelValue: 800] [[
  Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry]]
[2014-09-13T04:14:45.224+0200] [glassfish 4.1] [INFO] [SEC-SVCS-00100] [javax.enterprise.security.services] [tid: _ThreadID=17 _ThreadName=RunLevelControllerThread-1410574484853] [timeMillis: 1410574485224] [levelValue: 800] [[
  Authorization Service has successfully initialized.]]
[2014-09-13T04:14:45.287+0200] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=16 _ThreadName=RunLevelControllerThread-1410574484852] [timeMillis: 1410574485287] [levelValue: 800] [[
  Grizzly Framework 2.3.15 started in: 38ms - bound to [/0.0.0.0:8080]]]
[2014-09-13T04:14:45.314+0200] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=16 _ThreadName=RunLevelControllerThread-1410574484852] [timeMillis: 1410574485314] [levelValue: 800] [[
  Grizzly Framework 2.3.15 started in: 2ms - bound to [/0.0.0.0:8181]]]
[2014-09-13T04:14:45.320+0200] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=16 _ThreadName=RunLevelControllerThread-1410574484852] [timeMillis: 1410574485320] [levelValue: 800] [[
  Grizzly Framework 2.3.15 started in: 2ms - bound to [/0.0.0.0:4848]]]
[2014-09-13T04:14:45.366+0200] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=18 _ThreadName=RunLevelControllerThread-1410574484859] [timeMillis: 1410574485366] [levelValue: 800] [[
  Grizzly Framework 2.3.15 started in: 1ms - bound to [/0.0.0.0:3700]]]
[2014-09-13T04:14:45.457+0200] [glassfish 4.1] [INFO] [NCLS-CORE-00017] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1410574485457] [levelValue: 800] [[
  GlassFish Server Open Source Edition  4.1  (13) startup time : Felix (10.400ms), startup services(622ms), total(11.022ms)]]
[2014-09-13T04:14:45.800+0200] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=19 _ThreadName=RunLevelControllerThread-1410574484859] [timeMillis: 1410574485800] [levelValue: 800] [[
  Grizzly Framework 2.3.15 started in: 1ms - bound to [/0.0.0.0:7676]]]
[2014-09-13T04:14:45.801+0200] [glassfish 4.1] [INFO] [NCLS-BOOTSTRAP-00027] [javax.enterprise.bootstrap] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1410574485801] [levelValue: 800] [[
  Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@648c5dd5 as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@1217d00b.]]
[2014-09-13T04:14:48.485+0200] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=41 _ThreadName=pool-11-thread-1] [timeMillis: 1410574488485] [levelValue: 800] [[
  Grizzly Framework 2.3.15 started in: 1ms - bound to [/0.0.0.0:8080]]]
[2014-09-13T04:14:48.611+0200] [glassfish 4.1] [INFO] [NCLS-CORE-00087] [javax.enterprise.system.core] [tid: _ThreadID=67 _ThreadName=pool-15-thread-1] [timeMillis: 1410574488611] [levelValue: 800] [[
  Grizzly Framework 2.3.15 started in: 1ms - bound to [/0.0.0.0:8181]]]
[2014-09-13T04:14:48.863+0200] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=51 _ThreadName=admin-listener(3)] [timeMillis: 1410574488863] [levelValue: 800] [[
  visiting unvisited references]]
[2014-09-13T04:14:48.988+0200] [glassfish 4.1] [INFO] [NCLS-SECURITY-01002] [javax.enterprise.system.core.security] [tid: _ThreadID=51 _ThreadName=admin-listener(3)] [timeMillis: 1410574488988] [levelValue: 800] [[
  Java security manager is disabled.]]
[2014-09-13T04:14:48.988+0200] [glassfish 4.1] [INFO] [NCLS-SECURITY-01010] [javax.enterprise.system.core.security] [tid: _ThreadID=51 _ThreadName=admin-listener(3)] [timeMillis: 1410574488988] [levelValue: 800] [[
  Entering Security Startup Service.]]
[2014-09-13T04:14:48.992+0200] [glassfish 4.1] [INFO] [NCLS-SECURITY-01143] [javax.enterprise.system.core.security] [tid: _ThreadID=51 _ThreadName=admin-listener(3)] [timeMillis: 1410574488992] [levelValue: 800] [[
  Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.]]
[2014-09-13T04:14:49.040+0200] [glassfish 4.1] [INFO] [NCLS-SECURITY-01011] [javax.enterprise.system.core.security] [tid: _ThreadID=51 _ThreadName=admin-listener(3)] [timeMillis: 1410574489040] [levelValue: 800] [[
  Security Service(s) started successfully.]]
[2014-09-13T04:14:49.189+0200] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00198] [javax.enterprise.web] [tid: _ThreadID=51 _ThreadName=admin-listener(3)] [timeMillis: 1410574489189] [levelValue: 800] [[
  Created HTTP listener http-listener-1 on host/port 0.0.0.0:8080]]
[2014-09-13T04:14:49.197+0200] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00198] [javax.enterprise.web] [tid: _ThreadID=51 _ThreadName=admin-listener(3)] [timeMillis: 1410574489197] [levelValue: 800] [[
  Created HTTP listener http-listener-2 on host/port 0.0.0.0:8181]]
[2014-09-13T04:14:49.202+0200] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00198] [javax.enterprise.web] [tid: _ThreadID=51 _ThreadName=admin-listener(3)] [timeMillis: 1410574489202] [levelValue: 800] [[
  Created HTTP listener admin-listener on host/port 0.0.0.0:4848]]
[2014-09-13T04:14:49.223+0200] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00200] [javax.enterprise.web] [tid: _ThreadID=51 _ThreadName=admin-listener(3)] [timeMillis: 1410574489223] [levelValue: 800] [[
  Created virtual server server]]
[2014-09-13T04:14:49.226+0200] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00200] [javax.enterprise.web] [tid: _ThreadID=51 _ThreadName=admin-listener(3)] [timeMillis: 1410574489226] [levelValue: 800] [[
  Created virtual server __asadmin]]
[2014-09-13T04:14:49.418+0200] [glassfish 4.1] [INFO] [AS-WEB-CORE-00306] [javax.enterprise.web.core] [tid: _ThreadID=51 _ThreadName=admin-listener(3)] [timeMillis: 1410574489418] [levelValue: 800] [[
  Setting JAAS app name glassfish-web]]
[2014-09-13T04:14:49.418+0200] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00201] [javax.enterprise.web] [tid: _ThreadID=51 _ThreadName=admin-listener(3)] [timeMillis: 1410574489418] [levelValue: 800] [[
  Virtual server server loaded default web module ]]
[2014-09-13T04:14:49.663+0200] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=51 _ThreadName=admin-listener(3)] [timeMillis: 1410574489663] [levelValue: 800] [[
  visiting unvisited references]]
[2014-09-13T04:14:49.666+0200] [glassfish 4.1] [INFO] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=51 _ThreadName=admin-listener(3)] [timeMillis: 1410574489666] [levelValue: 800] [[
  visiting unvisited references]]
[2014-09-13T04:14:49.907+0200] [glassfish 4.1] [INFO] [AS-WEB-GLUE-00172] [javax.enterprise.web] [tid: _ThreadID=51 _ThreadName=admin-listener(3)] [timeMillis: 1410574489907] [levelValue: 800] [[
  Loading application [moo] at [/moo]]]
[2014-09-13T04:14:49.955+0200] [glassfish 4.1] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=51 _ThreadName=admin-listener(3)] [timeMillis: 1410574489955] [levelValue: 800] [[
  moo was successfully deployed in 1.171 milliseconds.]]
[2014-09-13T04:14:50.376+0200] [glassfish 4.1] [INFO] [NCLS-JMX-00005] [javax.enterprise.system.jmx] [tid: _ThreadID=61 _ThreadName=Thread-14] [timeMillis: 1410574490376] [levelValue: 800] [[
  JMXStartupService has started JMXConnector on JMXService URL service:jmx:rmi://ALIENBEEST:8686/jndi/rmi://ALIENBEEST:8686/jmxrmi]]
[2014-09-13T04:15:57.253+0200] [glassfish 4.1] [INFO] [NCLS-CORE-00092] [javax.enterprise.system.core] [tid: _ThreadID=113 _ThreadName=Thread-23] [timeMillis: 1410574557253] [levelValue: 800] [[
  Server shutdown initiated]]
[2014-09-13T04:15:57.255+0200] [glassfish 4.1] [INFO] [NCLS-BOOTSTRAP-00028] [javax.enterprise.bootstrap] [tid: _ThreadID=113 _ThreadName=Thread-23] [timeMillis: 1410574557255] [levelValue: 800] [[
  Unregistered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@648c5dd5 from service registry.]]
[2014-09-13T04:15:57.255+0200] [glassfish 4.1] [INFO] [] [] [tid: _ThreadID=113 _ThreadName=Thread-8] [timeMillis: 1410574557255] [levelValue: 800] [[
  FileMonitoring shutdown]]
[2014-09-13T04:15:57.257+0200] [glassfish 4.1] [INFO] [NCLS-JMX-00002] [javax.enterprise.system.jmx] [tid: _ThreadID=113 _ThreadName=Thread-23] [timeMillis: 1410574557257] [levelValue: 800] [[
  JMXStartupService: Stopped JMXConnectorServer: null]]
[2014-09-13T04:15:57.258+0200] [glassfish 4.1] [INFO] [NCLS-JMX-00001] [javax.enterprise.system.jmx] [tid: _ThreadID=113 _ThreadName=Thread-23] [timeMillis: 1410574557258] [levelValue: 800] [[
  JMXStartupService and JMXConnectors have been shut down.]]
[2014-09-13T04:15:57.302+0200] [glassfish 4.1] [INFO] [] [] [tid: _ThreadID=117 _ThreadName=Thread-8] [timeMillis: 1410574557302] [levelValue: 800] [[
  JdbcRuntimeExtension,  getAllSystemRAResourcesAndPools = [GlassFishConfigBean.org.glassfish.jdbc.config.JdbcResource, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcResource, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcResource, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcConnectionPool, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcConnectionPool, GlassFishConfigBean.org.glassfish.jdbc.config.JdbcConnectionPool]]]

显示服务器日志... - MGorgon
3个回答

18

好的,我看没人愿意碰这个问题,所以我来提供我的解决方案。在搜索互联网、安装和卸载NetBeans和Glassfish,尝试使用最高版本为7.4的NetBeans和降级至JDK 7之后,度过了许多可怕的小时数,感到沮丧后放弃了,然后又回来尝试,最后这个想法起作用了。

解决方案: 启动NetBeans,在部署项目之前,进入我的PC上的Glasfish安装目录,它看起来像这样

C:\Users\myusername\GlassFish_Server\glassfish\bin

开始: asadmin.bat

然后在打开的控制台中: start-domain 完成后返回NetBeans, 如果刷新NetBeans服务器,您会看到它正在运行, 或者您可以转到localhost进行确认。

停止它: stop-domain

另外,在另一台安装有Windows 7的机器上,它也可以正常工作。


您可以通过在NetBeans中单击服务器来启动/停止GlassFish。 - Thufir
只有在我刚安装或重新安装GlassFish时,启动/停止才有效。无论如何,就像我曾经使用过的几乎所有其他框架一样,例如:Yii框架,我很快遇到了其他与JavaDb相关的问题。 - user3130012
这个可以了。我必须以管理员身份运行它。 - Juan Carlos Eduardo Romaina Ac

5
我认为我遇到了一些相关的问题,我认为解决方法是您必须以管理员身份启动Netbeans,而不是Netbeans没有修改文件系统和启动glassfish服务器的权限。(在我的情况下,Glassfish位于Program files目录下,并且用户管理在其中)。
如果您可以尝试并告诉我们是否有效,对我来说就非常完美!(而且域的URL是内部安装目录的一部分)。

2

在部署Web应用程序时出现错误后,转到build-impl.xml中的第1045行或单击该行,并将debugmode =“true”设置如下:

"<nbdeploy clientUrlPart="${client.urlPart}" debugmode="true" forceRedeploy="${forceRedeploy}"/>"

保存后,部署Web应用程序即可完成部署。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接