Java – OpenSSO and Java applications with Apache AJP

ajpapache-2.2javaopensso

I am setting up a single sign on system using OpenSSO. I have been able to install the Policy Agent 3.0 and configure the policy to require the user to log in before being able access the websites. I have 2 types of applications running. The first is a django based application running through mod_wsgi in Apache (works fine). The second are 2 J2EE applications. The original application login screens come successfully, but once I set the username and password, the page just hangs and I get a 502 bad gateway on IE.

Is there any guidance on setting up OpenSSO with Apache and AJP?

I have looked around on the web and the OpenSSO and I haven't found anything.

Current server environment: all applications currently running on same machine using

  • JBoss 4.0.5
  • Python 2.6
  • Apache 2.2
  • Windows XP
  • Java 1.6_14

It appears to work for the basic login. A simple jsp application works, but the AJAX doesn't. Also, a more substantial application doesn't work after login. The OpenSSO just pegs the CPU.

Some data from the debug log:

2009-07-30 16:02:47.849   Error 7080:10c70b8 all: LineBuffer::findEndOfLine(): 
2009-07-30 16:03:22.418   Error 7080:10c70b8 all: LineBuffer::findEndOfLine(): 
2009-07-30 16:03:51.203   Error 7080:10c70b8 all: LineBuffer::findEndOfLine(): 
2009-07-30 16:03:51.203   Error 7080:10c70b8 PolicyEngine: am_policy_evaluate: InternalException in Service::update_policy with error message:Naming query failed. and code:12
2009-07-30 17:02:08.132   Error 7080:10a4588 all: Connection::read(): NSPR Error while reading data:-5961
2009-07-30 17:02:10.133   Error 7080:10a4588 all: fetchAndUpdateAgentConfigCache():There is an error while fetching attributes by user SDETest, using REST service. Status: REST attributes service encountered an error 
2009-07-30 17:02:51.019   Error 7080:10c70b8 AM_SSO_SERVICE: SSOTokenService::getSessionInfo(): Error 35 for sso token ID AQIC5wM2LY4Sfcw+CSjmVbTOhLlEgzCYiNGrvUFpO9GBYR8=@AAJTSQACMDE=#.
2009-07-31 10:40:06.973   Error 7080:1069e48 AM_SSO_SERVICE: SSOTokenService::getSessionInfo(): Error 35 for sso token ID AQIC5wM2LY4SfczGMS+rSpfPo9ZEx1eoGnrEoE1FtaJmxUI=@AAJTSQACMDE=#.
2009-07-31 10:45:26.421   Error 7080:1069e48 all: LineBuffer::findEndOfLine(): 
2009-07-31 10:45:45.351   Error 7080:1069e48 all: LineBuffer::findEndOfLine(): 
2009-07-31 10:46:01.029   Error 7080:1069e48 all: LineBuffer::findEndOfLine(): 
2009-07-31 10:46:01.029   Error 7080:1069e48 PolicyEngine: am_policy_evaluate: InternalException in Service::update_policy with error message:Naming query failed. and code:12
2009-07-31 10:46:56.240   Error 7080:1069e48 all: LineBuffer::findEndOfLine(): 

Best Answer

The server was running out of permgen space. It worked when I updated my run.bat for JBoss to the following:

set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx1024m -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=128m