用于tomcat的OpenAm代理无法读取authservice url?

问题描述 投票:1回答:2

amAuthContext:02/12/2014 04:58:20:946 下午 CST: Thread[main,5,main]

错误:无法从服务器获取auth服务URL:null:// null:null

我在“C:\ tomcat_v6_agent \ Agent_001 \ logs \ debug”中找到了它

而且我确定可以阅读和访问的网址,

Hers是OpenSSOAgentConfiguration.properties中的设置

com.iplanet.am.server.protocol = HTTP

com.iplanet.am.server.host = gordon.demo.com

com.iplanet.am.server.port = 8080

它已经在我的dns配置中设置。

现在我无法启动我的应用程序tomcat,但openam在另一个tomcat中工作正常。 Env是app.catm的app tomcat,在gordon.demo.com端口8080中的端口8086 openam tomcat

并且登录tomcat就是这样

org.apache.tomcat.util.digester.Digester startElement
SEVERE: Begin event threw error
java.lang.StackOverflowError
    at java.lang.String.indexOf(String.java:1698)
    at java.net.URLStreamHandler.parseURL(URLStreamHandler.java:272)
    at sun.net.www.protocol.file.Handler.parseURL(Handler.java:67)
    at java.net.URL.<init>(URL.java:614)
    at java.net.URL.<init>(URL.java:482)
    at sun.misc.URLClassPath$FileLoader.getResource(URLClassPath.java:1034)
    at sun.misc.URLClassPath$FileLoader.findResource(URLClassPath.java:1024)
    at sun.misc.URLClassPath.findResource(URLClassPath.java:172)
    at java.net.URLClassLoader$2.run(URLClassLoader.java:551)
    at java.net.URLClassLoader$2.run(URLClassLoader.java:549)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findResource(URLClassLoader.java:548)
    at java.lang.ClassLoader.getResource(ClassLoader.java:1138)
    at java.net.URLClassLoader.getResourceAsStream(URLClassLoader.java:227)
    at javax.xml.parsers.SecuritySupport$4.run(SecuritySupport.java:94)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.xml.parsers.SecuritySupport.getResourceAsStream(SecuritySupport.java:87)
    at javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:275)
    at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:247)
    at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:121)
    at org.forgerock.util.xml.XMLUtils.getSafeDocumentBuilder(XMLUtils.java:52)
    at com.sun.identity.shared.xml.XMLUtils.getSafeDocumentBuilder(XMLUtils.java:901)
    at com.sun.identity.shared.xml.XMLUtils.toDOMDocument(XMLUtils.java:168)
    at com.sun.identity.shared.xml.XMLUtils.toDOMDocument(XMLUtils.java:146)
    at com.iplanet.services.comm.share.ResponseSetParser.<init>(ResponseSetParser.java:49)
    at com.iplanet.services.comm.share.ResponseSet.parseXML(ResponseSet.java:118)
    at com.iplanet.services.comm.client.PLLClient.send(PLLClient.java:214)
    at com.iplanet.services.comm.client.PLLClient.send(PLLClient.java:95)
    at com.iplanet.services.naming.WebtopNaming.getNamingTable(WebtopNaming.java:1156)
    at com.iplanet.services.naming.WebtopNaming.updateNamingTable(WebtopNaming.java:1192)
    at com.iplanet.services.naming.WebtopNaming.getNamingProfile(WebtopNaming.java:1109)
    at com.iplanet.services.naming.WebtopNaming.getServerID(WebtopNaming.java:696)
    at com.iplanet.services.naming.WebtopNaming.getServerID(WebtopNaming.java:621)
    at com.iplanet.services.naming.WebtopNaming.updatePlatformServerIDs(WebtopNaming.java:1302)
    at com.iplanet.services.naming.WebtopNaming.updateNamingTable(WebtopNaming.java:1226)
    at com.iplanet.services.naming.WebtopNaming.getNamingProfile(WebtopNaming.java:1109)
    at com.iplanet.services.naming.WebtopNaming.getServerID(WebtopNaming.java:696)
    at com.iplanet.services.naming.WebtopNaming.getServerID(WebtopNaming.java:621)
    at com.iplanet.services.naming.WebtopNaming.updatePlatformServerIDs(WebtopNaming.java:1302)
    at com.iplanet.services.naming.WebtopNaming.updateNamingTable(WebtopNaming.java:1226)
    at com.iplanet.services.naming.WebtopNaming.getNamingProfile(WebtopNaming.java:1109)
    at com.iplanet.services.naming.WebtopNaming.getServerID(WebtopNaming.java:696)
    at com.iplanet.services.naming.WebtopNaming.getServerID(WebtopNaming.java:621)
    at com.iplanet.services.naming.WebtopNaming.updatePlatformServerIDs(WebtopNaming.java:1302)
    at com.iplanet.services.naming.WebtopNaming.updateNamingTable(WebtopNaming.java:1226)
    at 

    at .........

    at com.iplanet.services.naming.WebtopNaming.updatePlatformServerIDs(WebtopNaming.java:1302)
java tomcat single-sign-on openam opensso
2个回答
1
投票

你不必设置

com.iplanet.am.server.protocol = HTTP

com.iplanet.am.server.host = gordon.demo.com

com.iplanet.am.server.port = 8080

'错误:无法从服务器获取auth服务URL:null:// null:null'

这不是一个真正的错误,代理用来获取应用程序令牌的AuthContext API将回退使用OpenAM的命名服务。

在OpenSSOAgentBootstrap.property中将调试级别设置为“message”,它应该为您提供线索失败的原因和原因。


0
投票

我遇到了这篇文章,寻找同样错误的解决方案。

在我的情况下,问题是Java 1.6不处理更大的加密密钥。我修补了JVM以使用Bouncy Castle。

在java.security中,我将它们设置为数字2,而不是“sun.security.rsa.SunRsaSign”。

https://www.bouncycastle.org/specifications.html#install

通过在java.security属性文件中添加一个条目,可以通过静态注册将提供程序配置为环境的一部分(在$ JAVA_HOME / jre / lib / security / java.security中找到,其中$ JAVA_HOME是JDK的位置/ JRE分发)。你会在文件中找到详细的说明,但基本上它归结为添加一行:

security.provider.N=org.bouncycastle.jce.provider.BouncyCastleProvider

其中N是您希望提供者的偏好(1是最优选的)。

你把jar放在哪里最多取决于你,虽然jdk1.3和jdk1.4最好(在某些情况下只有)放在$ JAVA_HOME / jre / lib / ext中。注意:在Windows下,如果您认为已正确安装它并且仍然无法正常工作,则通常会有JRE和JDK JD安装,您可能无法将提供程序添加到未使用的安装中。

注意:使用JDK 1.4及更高版本,您需要安装不受限制的策略文件才能充分利用提供程序。如果您不安装策略文件,则可能会出现以下内容:

    java.lang.SecurityException: Unsupported keysize or algorithm parameters
            at javax.crypto.Cipher.init(DashoA6275)

可以在下载JDK的同一位置找到策略文件。

© www.soinside.com 2019 - 2024. All rights reserved.