Q: What is Grinix?
A: Grinix is a proof of concept "Hello World" code for grid computing.
Grinix serves the purpose of providing a simplified code of how grid
computing works for beginners in the development community. Also, it
can be used as a template code to customised grid services.
Q: What are the requirements?
A: The code has been tested with Red Hat Linux 7.3, Sun's Java Development
Kit 1.4.2-04, Apache Ant 1.6.2, Globus Toolkit 3.2.1.
Q: How come Glinux does not work?
A: Please understand the requirements and execution sequence of Glinux.
To understand it, the following checklist may give some clues to the point
of failure which might have occurred in.
- Use JDK 1.4.2_04 because JDK 1.4.2_05 caused the following error while
trying to execute the client:
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.
- build.xml was called to build necessary components before calling
build-grinix.xml
- The example in "guide" is more basic than the ones in "sample".
build-grinix.xml has been made to compile like guide/build.xml.
i.e. coding, interface, wsdl, stubs, compile, gar, deploy
- Note that deploy uses deployGuide in guide/build.xml so the customised
classes can be built along with other examples in "guide".
- setperms.sh and globus-user-env.sh needs to be executed to set the user
environment to execute some of the globus executables
- A dummy certificate is already available along with the Globus installation
called "testcred.pem". So it is copied to /etc/grid-security/hostcert.pem and
/etc/grid-security/hostkey.pem. Note the certificate should already been
expired. So in order to conduct the test, the date was set before the
certificate's expiration.
- The reason for the certificate and /etc/grid-security/certificates/
directory is for the security layer of the grid system design. This is
essential and its configuration can be found in /opt/gt3/etc/globus-gatekeeper.conf
- Shell script globus-gatekeeper needs GLOBUS_LOCATION assigned and exported.
- /etc/grid-security/grid-mapfile needs to be generated with the executable
"grid-mapfile-add-entry" with the distinguished name described by
"globus-gatekeeper" and a non-root username.
- Using a non-root username to execute globus-user-env.sh with the
necessary environment variables passed into its execution.
e.g. GLOBUS_LOCATION, PATH of java.
- If you get the rips xml warning after globus-start-container has been
called, its possible cause is that the path is relative rather than
absolute in the config of "server-config.wsdd". It should still start.
org.globus.ogsa.impl.base.providers.servicedata.ServiceDataProviderManager
e.g.
[enumProviders:388] ERROR: Error enumerating service data providers
java.io.FileNotFoundException: etc/rips-service-config.xml
(No such file or directory)
- Once the service is running with the port open, ogsi-create-service can
be called. The handle should end with a unique hash number identifying that
particular instance. So this hash is needed in order for the client to
reference it.
- The client needs a java call with the classpath that includes the
required classes. It needs to call guide.jar where GrinixClient.class
and its corresponding package namespace are coherent.
- Some tips for debugging: Manually call the commands with verbose or
debug mode and do some research with the error prompt responded. Find out
as much as possible about an executable, e.g. its file type, file permission,
configuration file needed, etc. To find a java class in the lib directory
with the list of jar files, a grep on the name of the class can be made to
find which jar file may include that class.
- When tracing through a code, consider the flow of the grid cycle.
e.g. ClassNotFound errors usually means it cannot find the class.
Places in the code to investigate is in the build xml file, where it
archives the classes with jar, gar, etc. If you trace the code, it
could simply be a spelling mistake or something missing from the
building of gar/jar files which has excluded the class files required
for execution. This happened when the guide.gar file was built without
guide.jar and guide-stub.jar. So instead of using ant to build them
into the guide.gar, they were manually zipped and redeployed before
the container gets started.
- Not that sometimes an error message is caused by another error.
e.g. java.lang.reflect.InvocationTargetException can be caused
by a ClassNotFound error. i.e. If there is no class to call it with,
then the target cannot be invoked.
- It is possible to get the following error:
java.lang.NoClassDefFoundError: org/globus/ogsa/guide...
when a java call does not include the classpath that has the jar archive
with that class included. e.g. ogsi-create-service calls setClassPath
but does not include /opt/gt3/guide/build/lib/guide-stub.jar so it may
throw an error about the PortType class not being found. It is possible
to use a wrapper executable to include the guide-stub.jar to the classpath
for the ogsi-create-service call
- Use your knowledge about java: ant = makefile build, package namespace to
distinguish the classes being called, inheritance to add customised methods
and attributes on top of the provided grid class, jar: packaged classes
archived into one file; Grid: java (service and client coding)
-> java interface (specialised methods)
-> wsdl (xml generated from java interface)
-> stubs (specialised methods with inherited methods generated from wsdl)
-> compile (java)
-> gar (package with wsdd xml)
-> deploy (deploys gar in grid service),
and try google searching.