访问管理控制台时,GlassFish Application Server不会提示用户名和密码

时间:2011-12-26 08:39:58

标签: glassfish cluster-computing

启用群集后,Glassfish 2.1.1出现问题,我丢失了登录页面!在我输入http://localhost:4848链接后,我直接进入管理控制台而没有问及任何有关身份验证信息(用户名/密码)的信息!

我安装了它并选择向我推广用户名/密码,它显示给我并重定向到http://localhost:4848/login.jsf,现在登录页面不再显示给我了,但这是在我启用集群后发生的,经过长时间的搜索,我把这个问题放在这里,如何再次登录页面,没有运气。

我的asadminenv.conf文件:

AS_ADMIN_PORT=4848
AS_ADMIN_PROFILE=cluster
AS_ADMIN_SECURE=true

来自domain.xml文件(JVM选项):

<jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options>

login.conf内容:

/*  Copyright 2004 Sun Microsystems, Inc.  All rights reserved.    */
/*  SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */

fileRealm {
    com.sun.enterprise.security.auth.login.FileLoginModule required;
};

ldapRealm {
    com.sun.enterprise.security.auth.login.LDAPLoginModule required;
};

solarisRealm {
    com.sun.enterprise.security.auth.login.SolarisLoginModule required;
};

jdbcRealm {
    com.sun.enterprise.security.auth.login.JDBCLoginModule required;
};
jdbcDigestRealm {
       com.sun.enterprise.security.auth.login.JDBCDigestLoginModule required;
};
assertedRealm{
    com.sun.enterprise.security.auth.login.AssertedLoginModule required;
};

我希望我能在这里找到答案。

我不知道你想要什么细节,但你可以在评论中问我。

编辑:我发现异常,我不知道这是否与我的问题有关:

[#|2012-06-14T10:09:41.361+0300|WARNING|sun-appserver2.1|javax.enterprise.resource.webcontainer.jsf.lifecycle|_ThreadID=19;_ThreadName=httpSSLWorkerThread-4848-0;_RequestID=7f709123-18b5-4c5a-a0c0-78e5ad2a800b;|jmaki.runtime.jsf.AjaxWrapperPhaseListener.afterPhase(AjaxWrapperPhaseListener.java:69)
com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:175)
com.sun.faces.lifecycle.Phase.doPhase(Phase.java:114)
com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:102)
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:80)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
com.sun.enterprise.tools.admingui.servlet.DelayedInitFacesServlet.service(DelayedInitFacesServlet.java:89)
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:291)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:666)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:597)
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:872)
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.process(SSLReadTask.java:444)
com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.doTask(SSLReadTask.java:230)
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:382)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:264)
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
|#]

[#|2012-06-14T10:09:41.366+0300|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=19;_ThreadName=httpSSLWorkerThread-4848-0;_RequestID=7f709123-18b5-4c5a-a0c0-78e5ad2a800b;|StandardWrapperValve[FacesServlet]: PWC1406: Servlet.service() for servlet FacesServlet threw exception
java.lang.NullPointerException
 at com.sun.jsftemplating.layout.ViewRootUtil.getLayoutDefinitionKey(ViewRootUtil.java:271)
 at com.sun.jsftemplating.layout.LayoutViewHandler.restoreView(LayoutViewHandler.java:611)
 at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:179)
 at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
 at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:102)
 at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
 at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.execute(PartialTraversalLifecycle.java:80)
 at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
 at com.sun.enterprise.tools.admingui.servlet.DelayedInitFacesServlet.service(DelayedInitFacesServlet.java:89)
 at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
 at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
 at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
 at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
 at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
 at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
 at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
 at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
 at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
 at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
 at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
 at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
 at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:291)
 at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:666)
 at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:597)
 at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:872)
 at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
 at com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.process(SSLReadTask.java:444)
 at com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.doTask(SSLReadTask.java:230)
 at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:382)
 at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:264)
 at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
|#]

[#|2012-06-14T10:

更新 我只是更改了标题,就像我找到的链接一样:http://www.wikiconsole.com/wiki/?p=2878但这对我没有帮助,因为我在服务器中受限制我移除后没有重启服务器(OS):

grant {
permission java.security.AllPermission;
};

但我重新启动了Application Server本身,这就是为什么我的更改没有改变任何内容的原因吗?

1 个答案:

答案 0 :(得分:0)

这个问题似乎仅限于Solaris OS,问题在于:

grant {
permission java.security.AllPermission;
};

在JDK或JRE lib/security/java.policy的安全策略文件中,这似乎是个问题,所以请完全避免使用它。

有用的链接:https://www.securecoding.cert.org/confluence/display/java/ENV03-J.+Do+not+grant+dangerous+combinations+of+permissions

无论如何我只是升级了我的glassfish和JDK并且似乎一切恢复正常行为,没有添加AllPermissions,一切都还可以,问题不在于群集主要是btu的安全策略。