Windows 7上的启动域失败Glassfish

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Windows 7上的启动域失败Glassfish相关的知识,希望对你有一定的参考价值。

我想在Windows 7上使用JAVA 8 JDK 66启动Glassfish 4.1.1-Server,但是我的命令asadmin start-domain失败了。这似乎是一个模糊的错误,因为我在命令提示符中得到一个很长的失败消息(见下文)。

任何人都可以给我一个提示,问题是什么?即使是一个方向(“可能是防火墙的问题”,“兼容的JDK版本”等)也会有所帮助......

谢谢Threx

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

C:Glassfishin>asadmin start-domain
Waiting for domain1 to start ..........Error starting domain domain1.
The server exited prematurely with exit code 0.
Before it died, it produced the following output:

Launching GlassFish on Felix platform
Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishRunt
ime@810a64 in service registry.

    #!## LogManagerService.postConstruct : rootFolder=C:Glassfishglassfish
    #!## LogManagerService.postConstruct : templateDir=C:Glassfishglassfishlib	e
    mplates
    #!## LogManagerService.postConstruct : src=C:Glassfishglassfishlib	emplates
    logging.properties
    #!## LogManagerService.postConstruct : dest=C:Glassfishglassfishdomainsdomain1configlogging.properties
Completed shutdown of Log manager service
Completed shutdown of GlassFish runtime
Nov 10, 2015 1:58:57 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvis
ioner createBundleProvisioner
INFORMATION: Create bundle provisioner class = class com.sun.enterprise.glassfis
h.bootstrap.osgi.BundleProvisioner.
Nov 10, 2015 1:58:57 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvis
ioner$DefaultCustomizer getLocations
WARNUNG: Skipping entry  because it is not an absolute URI.
Nov 10, 2015 1:58:57 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvis
ioner$DefaultCustomizer getLocations
WARNUNG: Skipping entry  because it is not an absolute URI.
Nov 10, 2015 1:59:01 PM com.sun.enterprise.glassfish.bootstrap.osgi.BundleProvis
ioner startBundles
WARNUNG: Can not start bundle file:/C:/Glassfish/glassfish/modules/core.jar beca
use it is not contained in the list of installed bundles.
[#|2015-11-10T13:59:04.227+0100|INFO|glassfish 4.1|javax.enterprise.logging|_Thr
eadID=16;_ThreadName=RunLevelControllerThread-1447160343915;_TimeMillis=14471603
44227;_LevelValue=800;_MessageID=NCLS-LOGGING-00009;|
  Running GlassFish Version: GlassFish Server Open Source Edition 4.1.1  (build
 1)|#]

[#|2015-11-10T13:59:04.227+0100|INFO|glassfish 4.1|javax.enterprise.logging|_Thr
eadID=16;_ThreadName=RunLevelControllerThread-1447160343915;_TimeMillis=14471603
44227;_LevelValue=800;_MessageID=NCLS-LOGGING-00010;|
  Server log file is using Formatter class: com.sun.enterprise.server.logging.OD
LLogFormatter|#]

[#|2015-11-10T13:59:04.461+0100|INFO|glassfish 4.1|javax.enterprise.system.core.
security|_ThreadID=18;_ThreadName=RunLevelControllerThread-1447160343946;_TimeMi
llis=1447160344461;_LevelValue=800;_MessageID=NCLS-SECURITY-01115;|
  Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.
FileRealm] successfully created.|#]

[#|2015-11-10T13:59:04.477+0100|INFO|glassfish 4.1|javax.enterprise.system.core.
security|_ThreadID=18;_ThreadName=RunLevelControllerThread-1447160343946;_TimeMi
llis=1447160344477;_LevelValue=800;_MessageID=NCLS-SECURITY-01115;|
  Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRea
lm] successfully created.|#]

[#|2015-11-10T13:59:04.477+0100|INFO|glassfish 4.1|javax.enterprise.system.core.
security|_ThreadID=18;_ThreadName=RunLevelControllerThread-1447160343946;_TimeMi
llis=1447160344477;_LevelValue=800;_MessageID=NCLS-SECURITY-01115;|
  Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certi
ficate.CertificateRealm] successfully created.|#]

[#|2015-11-10T13:59:04.789+0100|INFO|glassfish 4.1|javax.enterprise.security.ser
vices|_ThreadID=17;_ThreadName=RunLevelControllerThread-1447160343946;_TimeMilli
s=1447160344789;_LevelValue=800;_MessageID=SEC-SVCS-00100;|
  Authorization Service has successfully initialized.|#]

[#|2015-11-10T13:59:04.820+0100|INFO|glassfish 4.1|org.hibernate.validator.inter
nal.util.Version|_ThreadID=15;_ThreadName=RunLevelControllerThread-1447160343915
;_TimeMillis=1447160344820;_LevelValue=800;|
  HV000001: Hibernate Validator 5.1.2.Final|#]

[#|2015-11-10T13:59:05.304+0100|INFO|glassfish 4.1|org.glassfish.ha.store.spi.Ba
ckingStoreFactoryRegistry|_ThreadID=16;_ThreadName=RunLevelControllerThread-1447
160343915;_TimeMillis=1447160345304;_LevelValue=800;|
  Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for per
sistence-type = replicated in BackingStoreFactoryRegistry|#]

[#|2015-11-10T13:59:05.335+0100|WARNING|glassfish 4.1|org.glassfish.grizzly.conf
ig.Utils|_ThreadID=18;_ThreadName=RunLevelControllerThread-1447160343946;_TimeMi
llis=1447160345335;_LevelValue=900;|
  Instance could not be initialized. Class=interface org.glassfish.grizzly.http.
server.AddOn, name=http-listener-1, realClassName=org.glassfish.grizzly.http2.Ht
tp2AddOn|#]

[#|2015-11-10T13:59:05.428+0100|WARNING|glassfish 4.1|org.glassfish.grizzly.conf
ig.Utils|_ThreadID=18;_ThreadName=RunLevelControllerThread-1447160343946;_TimeMi
llis=1447160345428;_LevelValue=900;|
  Instance could not be initialized. Class=interface org.glassfish.grizzly.http.
server.AddOn, name=http-listener-2, realClassName=org.glassfish.grizzly.http2.Ht
tp2AddOn|#]

[#|2015-11-10T13:59:05.600+0100|INFO|glassfish 4.1|javax.enterprise.system.core|
_ThreadID=18;_ThreadName=RunLevelControllerThread-1447160343946;_TimeMillis=1447
160345600;_LevelValue=800;_MessageID=NCLS-CORE-00087;|
  Grizzly Framework 2.3.23 started in: 172ms - bound to [/0.0.0.0:8181]|#]

[#|2015-11-10T13:59:05.600+0100|WARNING|glassfish 4.1|org.glassfish.grizzly.conf
ig.Utils|_ThreadID=18;_ThreadName=RunLevelControllerThread-1447160343946;_TimeMi
llis=1447160345600;_LevelValue=900;|
  Instance could not be initialized. Class=interface org.glassfish.grizzly.http.
server.AddOn, name=admin-listener, realClassName=org.glassfish.grizzly.http2.Htt
p2AddOn|#]

[#|2015-11-10T13:59:05.616+0100|INFO|glassfish 4.1|javax.enterprise.system.core|
_ThreadID=18;_ThreadName=RunLevelControllerThread-1447160343946;_TimeMillis=1447
160345616;_LevelValue=800;_MessageID=NCLS-CORE-00087;|
  Grizzly Framework 2.3.23 started in: 16ms - bound to [/0.0.0.0:4848]|#]

[#|2015-11-10T13:59:05.662+0100|INFO|glassfish 4.1|javax.enterprise.system.core|
_ThreadID=16;_ThreadName=RunLevelControllerThread-1447160343915;_TimeMillis=1447
160345662;_LevelValue=800;_MessageID=NCLS-CORE-00087;|
  Grizzly Framework 2.3.23 started in: 0ms - bound to [/0.0.0.0:3700]|#]

[#|2015-11-10T13:59:05.662+0100|INFO|glassfish 4.1|javax.enterprise.system.core|
_ThreadID=1;_ThreadName=main;_TimeMillis=1447160345662;_LevelValue=800;_MessageI
D=NCLS-CORE-00017;|
  GlassFish Server Open Source Edition  4.1.1  (1) startup time : Felix (6.974ms
), startup services(1.762ms), total(8.736ms)|#]

[#|2015-11-10T13:59:05.662+0100|SEVERE|glassfish 4.1|javax.enterprise.system.cor
e|_ThreadID=1;_ThreadName=main;_TimeMillis=1447160345662;_LevelValue=1000;_Messa
geID=NCLS-CORE-00019;|
  Shutting down server due to startup exception
java.net.BindException: Address already in use: bind
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Unknown Source)
        at sun.nio.ch.Net.bind(Unknown Source)
        at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
        at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
        at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bindToChanne
lAndAddress(TCPNIOBindingHandler.java:131)
        at org.glassfish.grizzly.nio.transport.TCPNIOBindingHandler.bind(TCPNIOB
indingHandler.java:88)
        at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransp
ort.java:248)
        at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransp
ort.java:237)
        at org.glassfish.grizzly.nio.transport.TCPNIOTransport.bind(TCPNIOTransp
ort.java:86)
        at org.glassfish.grizzly.config.GenericGrizzlyListener.start(GenericGriz
zlyListener.java:184)
        at com.sun.enterprise.v3.services.impl.GlassfishNetworkListener.start(Gl
assfishNetworkListener.java:109)
        at com.sun.enterprise.v3.services.impl.GrizzlyProxy.start0(GrizzlyProxy.
java:267)
        at com.sun.enterprise.v3.services.impl.GrizzlyProxy.start(GrizzlyProxy.j
ava:241)
        at com.sun.enterprise.v3.services.impl.GrizzlyService.createNetworkProxy
(GrizzlyService.java:567)
        at com.sun.enterprise.v3.services.impl.GrizzlyService.postConstruct(Griz
zlyService.java:490)
        at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java
:326)
        at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:374)
        at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:
471)
        at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate
(AsyncRunLevelContext.java:228)
        at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelConte
xt.java:85)
        at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2072)
        at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl
.java:114)
        at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl
.java:88)
        at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.one
Job(CurrentTaskFuture.java:1213)
        at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run
(CurrentTaskFuture.java:1144)
        at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneLevel.run(
CurrentTaskFuture.java:762)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
|#]

[#|2015-11-10T13:59:05.740+0100|INFO|glassfish 4.1|javax.enterprise.system.core|
_ThreadID=55;_ThreadName=Thread-11;_TimeMillis=1447160345740;_LevelValue=800;_Me
ssageID=NCLS-CORE-00092;|
  Server shutdown initiated|#]

[#|2015-11-10T13:59:05.740+0100|INFO|glassfish 4.1|javax.enterprise.bootstrap|_T
hreadID=1;_ThreadName=main;_TimeMillis=1447160345740;_LevelValue=800;_MessageID=
NCLS-BOOTSTRAP-00027;|
  Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishIm
pl@1aa7d76 as OSGi service registration: org.apache.felix.framework.ServiceRegis
trationImpl@1a6a933.|#]

[#|2015-11-10T13:59:06.754+0100|INFO|glassfish 4.1|javax.enterprise.bootstrap|_T
hreadID=55;_ThreadName=Thread-11;_TimeMillis=1447160346754;_LevelValue=800;_Mess
ageID=NCLS-BOOTSTRAP-00028;|
  Unregistered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFish
Impl@1aa7d76 from service registry.|#]

[#|2015-11-10T13:59:06.754+0100|INFO|glassfish 4.1||_ThreadID=55;_ThreadName=Thr
ead-8;_TimeMillis=1447160346754;_LevelValue=800;|
  FileMonitoring shutdown|#]

[#|2015-11-10T13:59:06.942+0100|INFO|glassfish 4.1|javax.enterprise.system.core|
_ThreadID=55;_ThreadName=Thread-11;_TimeMillis=1447160346942;_LevelValue=800;_Me
ssageID=NCLS-CORE-00013;|
  Shutdown procedure finished|#]

Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=192m; support wa
s removed in 8.0

Command start-domain failed.

C:Glassfishin>
答案

似乎Glassfish无法启动,因为它尝试绑定的地址已经在使用中。

由于启动异常而关闭服务器java.net.BindException:已在使用的地址:bind

尝试编辑domain.xml。

/glass fish/domains/domain1/config/domain.XML

最常见的问题是http-listener端口被另一个应用程序重用。找到行:

name =“http-listener-1”port =“8080”name =“http-listener-1”port =“9090”

并用以下内容替换它们:

name =“http-listener-2”port =“8181”name =“http-listener-2”port =“9191”

您还可以阅读有关domain.xml的更多信息

https://docs.oracle.com/cd/E19226-01/820-7694/abhar/index.html

另一答案

我有同样的问题,相同的消息(可能是不同的原因),我解决了它通过移动(解压缩)Glassfish文件夹到不同的位置。问题是当我在C:上解压缩GlassFish.zip时,文件夹的所有者是“管理员”。通过在不同的位置解压缩(例如c: servers GlassFish),所有者是我的常规用户。另外我更改了port =“8080”和“8181”(在我的情况下改为8060,8061)。我的glassFish域名之后成功启动,我不知道哪些更改修复了它,我不在乎了。

另一答案

即使我有同样的问题......

  1. 将Glassfish文件夹复制到C: users {your-pc-name}
  2. 右键单击cmd->属性,使用C: users {your-pc-name}配置或启动cmd
  3. 然后运行asadmin

它对我很有帮助

重要的是您启动cmd的路径以及glassfish文件夹在该路径中运行

以上是关于Windows 7上的启动域失败Glassfish的主要内容,如果未能解决你的问题,请参考以下文章

需要在 Glassfish 上启动域,出现错误:“目录”中没有域

Windows Server 2012 R2安装AD域服务失败

如何为GlassFish域指定JDK?

无法启动GlassFish 4.0(Windows) - 端口1527 - 已在使用的地址

使用Windows 10在Eclipse ee上的Glassfish 4的位置

Glassfish 4.1.2 JVM无法启动退出代码127