Frequently Asked Question - Troubleshooting

The following questions and answers deal with frequent problems in setting OGSA-DAI up. Unless otherwise stated these points apply to release 4. If you have any others that you feel should be added to this list then please let us know.

Prerequisites

Installation

Configuration

Deployment

Operation

General


Prerequisites

What type of databases does OGSA-DAI officially support?

The following types of databases are officially supported by OGSA-DAI:

RelationalXML
MySQL v3.23.x, v4.0.x (from R1) Xindice v1.0 (from R1)
DB2 v8 (from R1) -
Oracle 8/9i (from R1) -
SQLServer 2000 (from R4) -
PostgreSQL v7.4.x (from R4) -

Note: Oracle and DB2 do not support the creation or deletion of databases under OGSA-DAI.

Go back to the questions

What version of GT3 does each OGSA-DAI release require?

The compatibility of a particular version of OGSA-DAI with a particular version of the Globus Toolkit is shown in the table below:

OGSA-DAI Version GT3 Version
Release 4.0 3.2
Release 3.1 3.0.2
Release 3 Final
Release 2.5 Beta (or Alpha 4)
Release 2 Alpha 3
Release 1.5 Alpha 2
Release 1 Technical Preview 4
Go back to the questions

My Oracle JDBC driver is in a ZIP file, what do I do?

Some versions of Oracle distribute a JDBC driver as a set of classes bundled in a ZIP file, e.g. oracle-jdbc.zip. This must be renamed to have a .jar extension and placed in the CONTAINER/webapps/ogsa/WEB-INF/lib directory, e.g. oracle-jdbc.jar.

Go back to the questions

Installation

Why can't I unpack OGSA-DAI using Sun's tar Command?

On Sun Solaris you may get a "TAR file corrupted" error when trying to untar using Sun's version of tar. It is known that Sun's tar cannot handle long pathnames, which are often present in Java package structures.

You should use gnutar instead (you can get this from http://www.gnu.org/software/tar/ if you do not have it already).

Go back to the questions

Why do the UNIX setenv scripts fail to run?

The software used to unpack the release may introduce problems into the OGSA-DAI/setenv.sh and OGSA-DAI/setenv.csh scripts which means they will not run without modification. This is due to carriage returns at the end of lines which confuses the shell interpreter. This problem can arise if using WinZIP to download OGSA-DAI and then unpacking and running under UNIX or Linux.

The problem is evident under sh if you see the output analogous to the following:

$ source setenv.sh
sh: 
: command not found
sh: setenv.sh: line 5: syntax error near unexpected token `do '
sh: setenv.sh: line 5: `do

The problem is evident under csh if you see the following:

$ source setenv.csh
set: Syntax error

You can:

Go back to the questions

Configuration

How do I create a new GDSF which maps to another Relational Database Management System?

Modify the CONTAINER\webapps\ogsa\WEB-INF\server-config.wsdd as follows,

  1. Copy the existing "GDSF Service Deployment" element; i.e.,
    <service name="ogsadai/GridDataServiceFactory" ...>
     ...
    </service>
    
    and paste it as the last "service" element (just before the "</deployment>" element).
  2. Modify the "name" attribute in the "service" element to something suitable, e.g., name="ogsadai/MyNewGridDataServiceFactory"
  3. Then modify only the following 2 "parameter" elements, e.g.:
    <parameter name="ogsadai.gdsf.config.xml.file"
        value="CONTAINER/webapps/ogsa/WEB-INF/etc/newDataResourceConfig.xml">
    
    <parameter name="name" value="My New Grid Data Service Factory"/>
    
  4. Save the file.
  5. Create a new DataResource configuration file (using the filename you specified in server-config.wsdd e.g. newDataResourceConfig.xml) ensuring the relevant <dataResource ...> ... details have been specified and place the file in CONTAINER/webapps/ogsa/WEB-INF/etc/
  6. Add a new entry to the RoleMap file to enable access to the data resource.
  7. Re-start the container.
  8. Now your new GDSF should be deployed and ready to use.
Go back to the questions

How do I enable log4j logging in OGSADAI ?

The instructions for doing this are available in the OGSA-DAI document distribution in the Enabling Logging pages.

CAUTION: on Windows platforms you should set the LOGFILE in:

log4j.appender.fileAppender.File=LOGFILE

to a file name without any directories. For example:

log4j.appender.fileAppender.File=ogsadai_log4j_log.txt

i.e. without an absolute path to the file name (e.g., C:\tmp\ogsadai_log4j_log.txt) otherwise a file not found exception is thrown. Once Tomcat is restarted and a perform document is executed you will have to search to find where this file has been created. The file is usually created in the directory where you executed the perform document from ... if you share the same file system as the server.

Go back to the questions

Can I load new configuration files without re-starting Tomcat?

The current version of OGSA-DAI is not capable of this. However, this feature is being considered for a future release of the software.

Go back to the questions

How can I fix the Xindice 1.0 XUpdate service to work with Java and Windows?

On Windows 2000/NT/XP, the Xindice 1.0 XUpdate service does not operate correctly under JDK 1.4. Whenever a query matches some existing data, and an update should be performed, a QueryProcessingError is thrown. This problem can be resolved by modifying two lines of the Xindice 1.0 source code and re-building Xindice, as described below:

Go back to the questions

Deployment

How do I deploy OGSA-DAI under the Globus Service Container

You can attempt to install OGSA-DAI to work under the built-in Globus Service Container by:

Go back to the questions

Why can't I see the list of services after OGSA-DAI is deployed?

This problem often occurs because you are using the wrong version of JAR files (typically older versions). Ensure that the JAR files from the correct version of the Globus Toolkit are copied to OGSA-DAI/lib and CONTAINER/webapps/ogsa/WEB-IN/lib as described in the Installation Notes. Also, check that you are not overwriting the new ogsadai.jar with an old version of ogsadai.jar file.

Go back to the questions

Why can't Apache Tomcat find the OGSA-DAI classes?

Under a manual installation of OGSA-DAI, the ogsadai.jar file must be located in

CONTAINER/webapps/ogsa/WEB-INF/lib

and not

CONTAINER/common/lib

Putting the JAR file in a different directory will lead to a number of non-obvious errors.

Go back to the questions

Why am I getting problems relating to error codes and messages?

The base English message bundle used to map error codes to messages is packaged in the OGSA-DAI/lib/ogsadai.jar. On some installations, you may experience problems where this file is not being located properly.

This can be resolved by using a suitable ZIP file utility, e.g. WinZIP on Windows or unzip on UNIX, to extract the file /ogsadai_messages.properties, which should be copied to CONTAINER/webapps/ogsa/WEB-INF/classes.

Go back to the questions

SQL Server driver: OGSA-DAI reports it can't find the driver, what do I do?

Check that the three driver files, msbase.jar, mssqlserver.jar and msutil.jar are in CONTAINER/webapps/ogsa/WEB-INF/lib. Also, ensure the URL pattern is, jdbc:microsoft:sqlserver://server:1433;DatabaseName=your_database. Note, the";"after the port number.

Go back to the questions

Operation

Why do I get an error when I try to access my services?

Sometimes an error will occur if attempting to communicate with the DAISGR or the GDSF immediately after Apache Tomcat has been re-started. If using a command-line client then this error will can be manifested in a way similar to the following:

[07/30/2003 10:16:13:663 ] org.globus.ogsa.impl.core.handle.HandleHelper
[getGSR:124] ERROR: [org.apache.axis.AxisFault] AxisFault
. . .
Error: org.gridforum.ogsi.InvalidHandleFaultType:
http://localhost:8080/ogsa/services/ogsadai/DAIServiceGroupRegistry

In the Apache Tomcat logs such an error is manifested in a way similar to the following:

[07/30/2003 09:27:18:772 ] org.apache.axis.Message [writeTo:443]
ERROR: java.io.IOException:
java.net.SocketException: Socket closed
 
[07/30/2003 09:27:08:649 ] org.globus.ogsa.impl.core.handle.HandleHelper
[getGSR:124] ERROR: [org.apache.axis.AxisFault] AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException

This problem can be avoided if after starting up Apache Tomcat you visit the http://HOST:POST/ogsa/services page using a Web browser and select to view either the DAISGR or GDSF WSDL document. The client will then work fine.

Go back to the questions

Why do I get "Exception in thread "main" java.lang.IllegalAccessError: tried to access field..." ?

If you get an error similar to:

Exception in thread "main" java.lang.IllegalAccessError: tried to access
field org.apache.xpath.compiler.FunctionTable.m_functions from class
org.apache.xml.security.Init at
org.globus.ogsa.impl.security.authentication.wssec.WSSecurityEngine.
(WSSecurityEngine.java:57) 

then this is probably due to an incompatibility between the version of the xalan.jar shipped with the Globus Toolkit 3.2.x distribution and particular versions of the Java JDK.

To find out the version of the JDK you are using, run:

$ java -version

using the Java installation referenced by your JAVA_HOME environment variable.

Some builds of Java version 1.4.2_05 are known to cause this error. Versions of the Java 1.4 JDK up to and including 1.4.2_04 are known to be okay. It is believed that a change of a variable from public to private in Java versions since 1.4.2_05 has caused this problem.

To fix this problem, you can run using a newer version of xalan.jar by using the "Endorsed Standards Override Mechanism" explained in this Xalan FAQ: http://xml.apache.org/xalan-j/faq.html#faq-N100CC. Essentially, you need to download the latest version of Xalan and copy the xalan.jar, xercesImpl.jar and xml-apis.jar files to a directory called <jre_home>/lib/endorsed where <jre_home> is the root of your JRE installation.

Alternatively, switching to an earlier Java version (1.4.2_05 and previous) should solve this problem.

For more information on this bug take a look at:

http://www-unix.globus.org/mail_archive/discuss/2004/07/msg00187.html

https://mail.internet2.edu/wws/arc/shibboleth-users/2004-07/msg00171.html

Why can't I access a GDS created by my GDSF remotely?

On some systems the hostname automatically resolves to the IP address 127.0.0.1 instead of the real IP address. This can cause OGSA-DAI GDSF to create GDS with handles containing 127.0.0.1 that cannot be access remotely. The real IP address must be contained in the handle in order to access the service remotely.

To resolve this problem edit the CONTAINER/webapps/ogsa/WEB-INF/server-config.wsdd file and add the following parameter element to the globalConfiguration element where 1.2.3.4 is the real IP address of the machine:

<parameter name="logicalHost" value="1.2.3.4"/>

It has also been noted that RedHat tends to put a mapping from the local hostname to 127.0.0.1 in the /etc/hosts file, which can cause this problem. A global solution is to modify this to make sure your hostname resolves to its own IP address instead of 127.0.0.1.

Go back to the questions

When I destroy a GDS it doesn't release the JDBC connection?

This is a bug in OGSA-DAI Release 4.0 and will be fixed in the next release.

Go back to the questions

What can I do if the Java Virtual Machine fails with a java.lang.OutOfMemoryError?

If using very large result sets, the Java Virtual Machine may run out of memory. This can be alleviated by increasing the memory heap size for the virtual machine using the Xms<size> flag.

Unfortunately, the default behaviour of some JDBC drivers is to retrieve the entire result set into memory before passing control back to the OGSA-DAI system. We recommend trying different database management systems and their respective JDBC drivers.

It is also recommended that asynchronous methods of delivering data are used rather than the simple synchronous method - this means that data is not buffered up at the server to be returned to the client in one go. Use the outputStream, deliverToURL or deliverToStream activities to return data to the client asynchronously. Also see the Pulling Data from a GDS back to the Client and Asynchronous Delivery pages of the Using the Client Toolkit part of the user guide.

Go back to the questions

Why am I getting a problem when using the sqlUpdateStatement activity?

If you get an error such as:

GDS Engine Problem while constructing sqlUpdateStatement;
WebRowSetStream not specified and no alternative given

Then you should define a <resultStream>, and not a <webRowSetStream>, within your sqlUpdateStatementactivity element in your Perform document.

Go back to the questions

How do I stop a client timing out before a request completes?

Clients (for example the end-to-end client) may timeout before an asynchronous request has had time to complete. It is possible to alter the amount of time before the request times out.

Add the following lines before a call to the perform method of the uk.org.ogsadai.service.ogsi.gds.GDSPortType object you are using to access your GDS:

GDSPortType myGDS = ...

org.apache.axis.client.Stub stub = (org.apache.axis.client.Stub)myGDS;
stub.setTimeout(time);

where time is in milliseconds, or 0 for infinity.

Note: If the org.globus.ogsa.handlers.TimeOutHandler is enabled in your client-config.wsdd file (normally found in the root of the ogsa.jar jar file) in Globus Toolkit 3.2, the above timeout is overridden by the handler. A workaround is to edit the client-config.wsdd file to remove the handler, from:

...
<requestFlow>
  <handler type="java:org.globus.ogsa.handlers.TimeOutHandler">
  <handler type="java:org.globus.ogsa.handlers.RoutingRequestHandler"/> 
...

to:

...
<requestFlow>
  <!-- handler type="java:org.globus.ogsa.handlers.TimeOutHandler" -->
  <handler type="java:org.globus.ogsa.handlers.RoutingRequestHandler"/> 
...

The client-config.wsdd file will now need to be replaced back into the root of the ogsa.jar jar file. Use a utility like WinZip to do this.

An alternative method is to set the Java system property org.globus.ogsa.client.timeout to the appropriate timeout period for use by the org.globus.ogsa.handlers.TimeOutHandler:


System.setProperty("org.globus.ogsa.client.timeout",String.valueOf(time));

However, this timeout period will now be set for every invocation of any OGSA service on your JVM, rather than on a service-by-service basis as the previous solution supplies, so you may wish to reset this property after your service call has completed.

Go back to the questions

When I run the end-to-end client I get a: "No factories registered at the DAISGR at http://..." exception. What should I do?

You will probably see an exception of the type:

Error: java.lang.Exception: No factories registered at the DAISGR at 
http://localhost:8080/ogsa/services/ogsadai/DAIRegistry

Check that gdsfRegistration element exists in the:

CONTAINER/webapps/ogsa/WEB-INF/etc/registrationList.xml

file which has a gsh attribute with the value:

http://localhost:8080/ogsa/services/ogsadai/DAIServiceGroupRegistry

Remember to change the port number above to the correct port number for your tomcat installation if necessary.

Go back to the questions

Why does my GDT getBlock call not return when I'm using both an inputStream and an outputStream?

A known bug within OGSA-DAI means that if you submit a perform document containing both an inputStream and an outputStream linked together and then submit a block of data to that inputStream (via the GDT putBlock operation), you cannot immediately retrieve that block from the outputStream (via a GDT getBlock operation). Instead, at least 3 blocks of data must be submitted to the inputStream before the first block can be retrieved from the outputStream, and a fourth block must be submitted before the second can be retrieved, etc. When the closing block is submitted to the inputStream, the remaining blocks can then be retrieved from the outputStream.

The number of blocks that the GDS must be holding internally depends on the number of activities linked together - more activities means that more blocks must be submitted before a block is available.

Go back to the questions

I am using MySQL and keep on getting a java.sql.SQLException: Cannot connect to MySQL server on localhost:3306 exception - what is the problem?

The MySQL JDBC driver recommended in the OGSA-DAI documentation is not compatible with the latest versions of MySQL. This is the case for MySQL 4.1.6 and 4.1.7 and may be the case for other versions. This problem usually causes the following error message to be logged:

java.sql.SQLException: Cannot connect to MySQL server on localhost:3306.

Is there a MySQL server running on the machine/port you are trying to connect to? 
(java.lang.NumberFormatException)

To deploy a GDSF that can talk to one of the latest versions of MySQL, follow the normal steps but replace the recommended JDBC driver JAR with a newer version downloaded from:

If you have already deployed a service using the incompatible JAR, follow these steps:

  1. Stop Tomcat
  2. Replace the old JDBC driver JAR with the new one in:
    <TOMCAT>/webapps/ogsa/WEB-INF/lib/
    
    (Make sure you don't leave two different versions of the driver JAR in this directory)
  3. Start Tomcat

MySQL Connector/J 3.1 has been tested successfully with MySQL 4.1.6 and 4.1.7 using OGSA-DAI R3.1 and R5.

Go back to the questions

I am trying to run a secure GDSF and am getting the message: GSSException: Defective credential detected [Root error message: Unknown policy .... What is wrong?

Some users have found this problem related to the use of both Globus GRIM and OGSA-DAI on their systems. A Globus bug at http://bugzilla.globus.org/globus/show_bug.cgi?id=1962 produces very similar results to what is seen in OGSA-DAI. To fix this in the end-to-end client (the uk.org.ogsadai.client.Client class) you need to add the following line for OGSA-DAI Release 4:

((Stub) griddataservice)._setProperty(Constants.GRIM_POLICY_HANDLER, 
            new IgnoreProxyPolicyHandler());

This should be added just after the line (which you should be able to find at about line 314):

((Stub) griddataservice)._setProperty( GSIConstants.GSI_CREDENTIALS, cred );

If you are using OGSA-DAI Release 5 then you will need to add a similar line:

((Stub) gds.getGDSPortType())._setProperty(Constants.GRIM_POLICY_HANDLER, 
            new IgnoreProxyPolicyHandler());

This will need to be added just after the line (at around line 269 in the code):

gds.configure( property );

If you are writing your own client code, you will need to add a similar line to the two fixes above, depending on whether you are using the OGSA-DAI Client Toolkit (in which case, follow the R5 fix), or the Axis classes (follow the R4 fix).

Go back to the questions

General

Are there any security issues I should be aware of in OGSA-DAI?

The following activities can cause potential security problems:

It is recommended that the above activities are not enabled in production OGSA-DAI installations. Edit your activity configuration documents to disable them.

Go back to the questions

Does OGSA-DAI allows proprietary SQL?

OGSA-DAI currently does not do any parsing of the SQL statements, they are passed straight through to the underlying database management system via a JDBC driver. Therefore, as long as the JDBC driver used accepts the proprietary SQL, OGSA-DAI will allow it. Note that if requesting results in the WebRowSet format, proprietary datatypes may not be supported properly.

Go back to the questions