由于启动异常Glassfish 4而关闭服务器

时间:2013-11-27 17:15:26

标签: java netbeans glassfish-4

我在安装Windows 8.1后遇到问题,当我尝试使用Glassfish 4.0启动Netbeans 7.4时出现此错误:

enter image description here

Glassfish日志中的错误是:

[2013-11-27T07:58:32.229-0800] [glassfish 4.0] [SEVERE] [NCLS-CORE-00019] [javax.enterprise.system.core] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1385567912229] [levelValue: 1000] [[
  Shutting down server due to startup exception
java.io.IOException: Unable to establish loopback connection
    at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:125)
    at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:69)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.nio.ch.PipeImpl.<init>(PipeImpl.java:141)
    at sun.nio.ch.SelectorProviderImpl.openPipe(SelectorProviderImpl.java:50)
    at java.nio.channels.Pipe.open(Pipe.java:150)
    at sun.nio.ch.WindowsSelectorImpl.<init>(WindowsSelectorImpl.java:127)
    at sun.nio.ch.WindowsSelectorProvider.openSelector(WindowsSelectorProvider.java:44)
    at org.glassfish.grizzly.nio.Selectors.newSelector(Selectors.java:62)
    at org.glassfish.grizzly.nio.SelectorRunner.create(SelectorRunner.java:110)
    at org.glassfish.grizzly.nio.NIOTransport.startSelectorRunners(NIOTransport.java:136)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.start(TCPNIOTransport.java:272)
    at org.glassfish.grizzly.config.GenericGrizzlyListener.start(GenericGrizzlyListener.java:169)
    at com.sun.enterprise.v3.services.impl.GlassfishNetworkListener.start(GlassfishNetworkListener.java:94)
    at com.sun.enterprise.v3.services.impl.GrizzlyProxy.start(GrizzlyProxy.java:230)
    at com.sun.enterprise.v3.services.impl.GrizzlyService.createNetworkProxy(GrizzlyService.java:470)
    at com.sun.enterprise.v3.services.impl.GrizzlyService.postConstruct(GrizzlyService.java:393)
    at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:281)
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:328)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
    at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:163)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2204)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:673)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:660)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneJob.run(CurrentTaskFuture.java:490)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpAllTheWay.go(CurrentTaskFuture.java:362)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpAllTheWay.access$100(CurrentTaskFuture.java:279)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture.go(CurrentTaskFuture.java:113)
    at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.proceedTo(AsyncRunLevelContext.java:296)
    at org.glassfish.hk2.runlevel.internal.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:66)
    at com.sun.enterprise.v3.server.AppServerStartup.proceedTo(AppServerStartup.java:532)
    at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:329)
    at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:226)
    at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:217)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)
    at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl.start(EmbeddedOSGiGlassFishImpl.java:75)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)
    at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishImpl.start(OSGiGlassFishImpl.java:71)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:117)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
    at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
Caused by: java.net.ConnectException: Connection timed out: connect
    at sun.nio.ch.Net.connect0(Native Method)
    at sun.nio.ch.Net.connect(Net.java:465)
    at sun.nio.ch.Net.connect(Net.java:457)
    at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:666)
    at java.nio.channels.SocketChannel.open(SocketChannel.java:184)
    at sun.nio.ch.PipeImpl$Initializer.run(PipeImpl.java:97)
    ... 46 more
]]

[2013-11-27T07:58:32.248-0800] [glassfish 4.0] [INFO] [] [javax.enterprise.system.core] [tid: _ThreadID=67 _ThreadName=Thread-6] [timeMillis: 1385567912248] [levelValue: 800] [[
  Server shutdown initiated]]

[2013-11-27T07:58:32.249-0800] [glassfish 4.0] [INFO] [NCLS-BOOTSTRAP-00027] [javax.enterprise.bootstrap] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1385567912249] [levelValue: 800] [[
  Registered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@2de98a5f as OSGi service registration: org.apache.felix.framework.ServiceRegistrationImpl@21f52bf4.]]

[2013-11-27T07:58:32.274-0800] [glassfish 4.0] [INFO] [] [org.glassfish.jersey.server.ApplicationHandler] [tid: _ThreadID=64 _ThreadName=pool-15-thread-1] [timeMillis: 1385567912274] [levelValue: 800] [[
  Initiating Jersey application, version Jersey: 2.0 2013-05-03 14:50:15...]]

[2013-11-27T07:58:33.250-0800] [glassfish 4.0] [INFO] [NCLS-BOOTSTRAP-00028] [javax.enterprise.bootstrap] [tid: _ThreadID=67 _ThreadName=Thread-6] [timeMillis: 1385567913250] [levelValue: 800] [[
  Unregistered com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl@2de98a5f from service registry.]]

我试图删除domain.xml中glassfish的安全性,我试图将127.0.0.1 localhost添加到Windows和我的IP中的主机文件但不起作用,并禁用防火墙也无法正常工作。还有什么?我现在要做什么?我错过了什么?或者我必须回到Windows 7?

  

请帮忙?

1 个答案:

答案 0 :(得分:0)

在我的情况下禁用IPV6就可以解决这个问题

要在

中添加以下行

<强>的glassfish \域\ domain1的\配置\ domain.xml中

<jvm-options>-Djava.net.preferIPv4Stack=true</jvm-options>

的更多信息

http://vijayansrinivasan.blogspot.in/2013/12/glassfish-unable-to-start-in-windows-8.html

相关问题