Openam和OpenDJ集成问题:授权失败

时间:2015-06-25 11:13:22

标签: openam opendj

我使用openam12和opendj2.6版本来配置单点登录。

在尝试使openam12和opendj2.6进行通信时,我遇到以下异常:

[error] handleException: java.lang.RuntimeException: Error occurred invoking public method: public boolean com.sun.identity.config.wizard.Wizard.createConfig()
    at org.apache.click.util.ClickUtils.invokeMethod(ClickUtils.java:3335)
    at org.apache.click.util.ClickUtils.invokeListener(ClickUtils.java:2088)
    at org.apache.click.control.AbstractControl$1.onAction(AbstractControl.java:228)
    at org.apache.click.ActionEventDispatcher.fireActionEvent(ActionEventDispatcher.java:259)
    at org.apache.click.ActionEventDispatcher.fireActionEvents(ActionEventDispatcher.java:236)
    at org.apache.click.ActionEventDispatcher.fireActionEvents(ActionEventDispatcher.java:180)
    at org.apache.click.ClickServlet.performOnProcess(ClickServlet.java:746)
    at org.apache.click.ClickServlet.processAjaxPageEvents(ClickServlet.java:1860)
    at org.apache.click.ClickServlet.processPage(ClickServlet.java:559)
    at org.apache.click.ClickServlet.handleRequest(ClickServlet.java:383)
    at org.apache.click.ClickServlet.doGet(ClickServlet.java:276)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.forgerock.openam.validation.ResponseValidationFilter.doFilter(ResponseValidationFilter.java:44)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.sun.identity.setup.AMSetupFilter.doFilter(AMSetupFilter.java:113)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ExceptionInInitializerError
    at com.sun.identity.setup.ConfigureData.createPolicies(ConfigureData.java:166)
    at com.sun.identity.setup.ConfigureData.createRealmAndPolicies(ConfigureData.java:118)
    at com.sun.identity.setup.ConfigureData.configure(ConfigureData.java:99)
    at com.sun.identity.setup.AMSetupServlet.processDataRequests(AMSetupServlet.java:1650)
    at com.sun.identity.setup.AMSetupServlet.configure(AMSetupServlet.java:1127)
    at com.sun.identity.setup.AMSetupServlet.processRequest(AMSetupServlet.java:693)
    at com.sun.identity.config.wizard.Wizard.createConfig(Wizard.java:304)
    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 org.apache.click.util.ClickUtils.invokeMethod(ClickUtils.java:3317)
    ... 39 more
Caused by: com.sun.identity.log.AMLogException: amPolicy.access:Log write authorization failure
    at com.sun.identity.log.Logger.validateLogBy(Logger.java:291)
    at com.sun.identity.log.Logger.log(Logger.java:363)
    at com.sun.identity.log.Logger.logStartRecord(Logger.java:564)
    at com.sun.identity.log.Logger.getLogger(Logger.java:471)
    at com.sun.identity.policy.PolicyUtils.<clinit>(PolicyUtils.java:105)
    ... 51 more

2 个答案:

答案 0 :(得分:1)

来自你的stacktrace的

Caused by: com.sun.identity.log.AMLogException: amPolicy.access:Log write authorization failure

这意味着openAm尝试登录它的安装目录,但没有足够的访问权限(在Windows上通常&#34; C:\ openam \ openam \ log&#34;)。所以也许先尝试检查一下。

希望有所帮助

答案 1 :(得分:0)

我花了好几个小时来解决这个问题。这种失败可能由于不同原因而发生。喜欢:

  1. 运行tomcat的用户对配置文件夹/目录没有适当的权限(如上述解决方案中Kalem所述)

  2. 主机名配置不正确

  3. 对我来说这是主机名问题,我使用的是linux(opensuse)并配置了/ etc / hosts。但如果我试着看:〜&gt; hostname它返回了一些其他值。所以我更改了/ etc / HOSTNAME文件,该文件与我在/ etc / hosts文件中提到的主机名相同。 它起作用了:))