Glassfish - 无法打开管理控制台 - 抛出NPE

时间:2011-09-28 13:32:08

标签: java-ee glassfish

我有一台突然出现的Glassfish 3.1生产服务器。上周一切都很好。今天早上,它在尝试加载管理控制台时抛出一个NPE(localhost:4848)。在尝试运行服务器上的4个应用程序中的3个时,它也会抛出同样的错误。其中一个应用程序运行正常。所有应用程序都是带有LDAP安全性的JSF。

我在另一个使用几乎相同配置文件的盒子上有一个测试服务器,并且工作正常。

服务器是Win2003R2SP2。 Java是jdk1.6.0_26 我重新启动了服务,甚至重新启动了主机服务器。 我也尝试过-Dcom.sun.enterprise.tools.admingui.NO_NETWORK = true设置。

这些是我尝试连接管理控制台或运行其中一个应用程序时出现的日志条目:

     [#|2011-09-28T09:15:53.059-0400|SEVERE|glassfish3.1|org.apache.catalina.connector.CoyoteAdapter|_ThreadID=21;_ThreadName=Thread-1;|PWC3989: An exception or error occurred in the container during the request processing
java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:922)
at org.apache.catalina.session.ManagerBase.remove(ManagerBase.java:915)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:847)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:769)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:757)
at org.apache.catalina.session.StandardSession.setMaxInactiveInterval(StandardSession.java:587)
at org.apache.catalina.session.ManagerBase.createSession(ManagerBase.java:762)
at org.apache.catalina.session.StandardManager.createSession(StandardManager.java:311)
at org.apache.catalina.connector.Request.doGetSession(Request.java:2899)
at org.apache.catalina.connector.Request.getSession(Request.java:2561)
at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:920)
at org.glassfish.admingui.common.security.AdminConsoleAuthModule.validateRequest(AdminConsoleAuthModule.java:169)
at com.sun.enterprise.security.jmac.config.GFServerConfigProvider$GFServerAuthContext.validateRequest(GFServerConfigProvider.java:1171)
at com.sun.web.security.RealmAdapter.validate(RealmAdapter.java:1311)
at com.sun.web.security.RealmAdapter.invokeAuthenticateDelegate(RealmAdapter.java:1189)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:551)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:623)
at org.apache.catalina.core.StandardPipeline.doChainInvoke(StandardPipeline.java:600)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:228)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)
|#]

[#|2011-09-28T09:15:53.105-0400|SEVERE|glassfish3.1|org.apache.catalina.connector.CoyoteAdapter|_ThreadID=18;_ThreadName=Thread-1;|PWC3989: An exception or error occurred in the container during the request processing
java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:922)
at org.apache.catalina.session.ManagerBase.remove(ManagerBase.java:915)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:847)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:769)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:757)
at org.apache.catalina.session.StandardSession.setMaxInactiveInterval(StandardSession.java:587)
at org.apache.catalina.session.ManagerBase.createSession(ManagerBase.java:762)
at org.apache.catalina.session.StandardManager.createSession(StandardManager.java:311)
at org.apache.catalina.connector.Request.doGetSession(Request.java:2899)
at org.apache.catalina.connector.Request.getSession(Request.java:2561)
at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:920)
at org.glassfish.admingui.common.security.AdminConsoleAuthModule.validateRequest(AdminConsoleAuthModule.java:169)
at com.sun.enterprise.security.jmac.config.GFServerConfigProvider$GFServerAuthContext.validateRequest(GFServerConfigProvider.java:1171)
at com.sun.web.security.RealmAdapter.validate(RealmAdapter.java:1311)
at com.sun.web.security.RealmAdapter.invokeAuthenticateDelegate(RealmAdapter.java:1189)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:551)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:623)
at org.apache.catalina.core.StandardPipeline.doChainInvoke(StandardPipeline.java:600)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:326)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:227)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:228)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:822)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:719)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1013)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)
|#]

任何有关如何研究的建议都将不胜感激。我可以根据需要发布更多配置。

由于

1 个答案:

答案 0 :(得分:3)

在需要通过命令行kill -9命令终止所有Glassfish进程后,我遇到了完全相同的异常。无法执行正常asadmin restart-domain

因此,在强制终止之后,管理员网络前端不再可用。

我已经通过执行

解决了这个问题
asadmin set server.web-container.session-config.session-properties.timeout-in-seconds=3600

之后我通过正常

重启Glassfish
asadmin restart-domain

然后Glassfish管理控制台就像往常一样。