Showing posts with label debugging. Show all posts
Showing posts with label debugging. Show all posts

Tuesday, June 16, 2009

Conflicting PostgreSQL drivers

While deploying the AMDSService (soon to be renamed to GIPSEService) to the training node, we noticed this error:
"SET AUTOCOMMIT TO OFF is no longer supported" being thrown by the AMDSService operations.

This was caused because the training node uses PostgreSQL 8.1 yet the globus_database_common package deploys the JDBC driver for PostgreSQL 7.3 (pg73jdbc2.jar). This causes a problem with the way that ibatis handles postgres connections (specifically ibatis turns autocommit off to maximize performance).

The AMDSService includes the postgreSQL 8 driver (postgresql-8.3-604.jdbc3.jar). To get around this error, we removed the 7.3 driver from the training node's Globus and the training node's Tomcat. Globus is happy using the updated driver, AMDSService is happy using the updated driver and RODSA-DAI is still happy using the updated driver.

This is not a problem for WS-Core Globus installs (like our Windows nodes) since WS-Core doesn't include the 7.3 driver.

Something to keep in mind for any Linux PHGrid nodes that use AMDSService is that they will need to remove the 7.3 postgres driver after installing Globus and the AMDSService. (This is accomplished by renaming $GLOBUS_LOCATION\lib\pg73jdbc2.jar to pg73jdbc2.jar.old; then redeploying Globus to tomcat).

Tuesday, May 26, 2009

Helping Dan debug Windows Container bugs

I've been helping Dan with some of the Windows bugs since I'm using a windows container to redevelop the AMDS services for the beta release.

I came across this bug when I tried globus-start-container.bat:

Failed to start container: Container failed to initialize [Caused by: Secure con
tainer requires valid credentials]

I thought I could fix this by running grid-proxy-init.bat prior to starting the container. This let Globus start up without error, but whenever I tried running a secure service I got an exception like this:

Error: ; nested exception is:
org.globus.common.ChainedIOException: Authentication failed [Caused by:
Operation unauthorized (Mechanism level: Authorization failed. Expected "/CN=hos
t/somehostname.cdc.gov" target but received "/O=PHGRID/OU=phgrid.net/OU=Globus Public
Health NCPHI/OU=phgrid.net/CN=someuser/CN=someuser")]


To fix this, you need to start up globus and with the "-containerDesc" parameter specifying a valid security_descriptor.xml (like the one found in $GLOBUS_LOCATION/etc/globus_wsrf_core) that specifies the location of the container cert and the container key. So your command would look something like "globus-start-container.bat =containerDesc c:\foo\security_descriptor.xml"

PS- For anyone trying to use the AMDS alpha, for the sake of debugging please wait for the Beta release on 5/31. The 5/31 release will re-write and fix a lot of what may be annoying anyone trying to use the current gar.