本文介绍了Glassfish - 无法打开管理控制台 - 抛出NPE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Glassfish 3.1生产服务器突然出现。上周没事。今天早上它试图加载管理控制台(localhost:4848)时会抛出一个NPE。当试图运行服务器上的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:请求处理期间容器中发生异常或错误
java.lang .NullPointerException $ java.util.concurrent.ConcurrentHashMap.remove
(ConcurrentHashMap.java:922)
at org.apache.catalina.session.ManagerBase.remove(ManagerBase.java:915)
在org.apache.catalina.session.StandardSession.expire(StandardSession.java:847)
在org.apache.catalina.session.StandardSession.expire(StandardSession.java:769)
在org.apache .catalina.session.StandardSession.expire(StandardSession.java:757)
at org.apache.catalina.session.StandardSession.setMaxInactiveInterval(S tclassSession.java:587)
at org.apache.catalina.session.ManagerBase.createSession(ManagerBase.java:762)
at org.apache.catalina.session.StandardManager.createSession(StandardManager.java:
at org.apache.catalina.connector.Request.getSession(Request.java:2561)
at org.glassfish.admingui.common.security.AdminConsoleAuthModule.validateRequest(AdminConsoleAuthModule.java:169)
(org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:920)
) 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.St andardPipeline.doInvoke(StandardPipeline.java:623)
at org.apache.catalina.core.StandardPipeline.doChainInvoke(StandardPipeline.java:600)
at com.sun.enterprise.web.WebPipeline.invoke( WebPipeline.java:96)
在com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
在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)
在com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
在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:发生异常或错误在请求处理期间在容器中
java.util.concurrent.ConcurrentHashMap.remove中的java.lang.NullPointerException
(ConcurrentHashMap.java:922)在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)
在org.apache.catalina.session.StandardSession.expire(StandardSession.java:757)
在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)
在org.apache.catalina.connector.Request.doGetSession(Request.java:2899)
在org.apache.catalina.connector.Request.getSession(Request.java:2561)
在org .apache.catalina.connector.RequestFacade.getSession(RequestF acade.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)
在com.sun.web.security.RealmAdapter.validate(RealmAdapter.java:1311)
在com.sun.web.security.RealmAdapter.invokeAuthenticateDelegate(
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java: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)$ b在com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
$ b在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
。在组织.AP ache.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。执行(DefaultProtocolFilter.java:225)
在com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
在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(ProtocolChainContextTa sk.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)
|#]



任何建议,如何看待将不胜感激。我可以根据需要发布更多配置。



谢谢

解决方案

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



所以在强制终止后,admin web前端不再可用。

我解决了这个问题通过执行

  asadmin set server.web-container.session-config.session-properties.timeout-in-seconds = 3600 

之后,我通过正常的方式重新启动了Glassfish

  asadmin restart-domain 

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


I have a Glassfish 3.1 production server that is suddenly acting up. Last week it was fine. This morning the it is throwing an NPE when attempting to load the admin console (localhost:4848). It is also throwing this same error when trying to run 3 of the 4 applications on the server. One of the apps works fine. All of the apps are JSF with LDAP security.

I have a test server on a different box that uses nearly the same configuration files and works fine.

The server is Win2003R2SP2. Java is jdk1.6.0_26.
I have restarted the service and even rebooted the host server.I have also tried the -Dcom.sun.enterprise.tools.admingui.NO_NETWORK=true setting.

These are the log entries that occur when I attempt to connect to the Admin Console or run one of these applications:

     [#|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)
|#]

Any suggestions on what to look into would be greatly appreciated. I can post more configurations as needed.

Thanks

解决方案

I had exactly the same exception after it was necessary to kill all the Glassfish processes via a command line kill -9 command. A normal asadmin restart-domain was not possible to execute.

So after this forced kill the admin web-frontend was not available anymore.

I've solved this problem by executing

asadmin set server.web-container.session-config.session-properties.timeout-in-seconds=3600

After that I restarted Glassfish via the normal

asadmin restart-domain

and then the Glassfish Admin console appears like usual.

这篇关于Glassfish - 无法打开管理控制台 - 抛出NPE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-30 04:04