The Reliable Transfer Service (RFT) is an OGSA based service that provides interfaces for controlling and monitoring 3rd party file transfers using GridFTP servers. The client controlling the transfer is hosted inside of a grid service so it can be managed using the soft state model and queried using the ServiceData interfaces available to all grid services. It is essentially a reliable and recoverable version of the GT2 globus-url-copy tool and more.
The Prerequisites to RFT are:
PostgreSQL is used to store the state of the transfer to allow for restart after failures. The interface to PostgreSQL is JDBC so any DBMS that supports JDBC can be used, although no other has been tested.
GridFTP perfoms the actual file transfer.
GridFTP server can only be run on Unix or Linux. There are 2 ways to get GridFTP:
If you don't already have GridFTP from GT2 installed, use the GT3 bundled version. In either case, configuration instructions are documented below.
PostgreSQL can be installed both on Unix and on Windows. For setup instructions, see:
Here is a summary of what you need to do after installation:
Login as root.
# adduser postgres # mkdir /usr/local/pgsql/data # chown postgres /usr/local/pgsql/data # su - postgres
To run postgreSQL under Windows you need to install Cygwin, and enable the following features:
After installing these components you also need to install CygIPC.
Now start the ipc_daemon from a cygwin shell e.g:
$ /cygdrive/c/cygwin/usr/local/bin/ipc-daemon.exe &
That's it, now you should be able to use psql and postgres as if on a Unix machine. Note however that you will be using the username 'Administrator' as opposed to 'postgres'
After completing either the Unix or Windows specific setup above, do the following from your user shell (postgres or Administrator).
$ export PGDATA=/usr/local/pgsql/data $ initdb $ createdb ogsa $ psql -d ogsa -f rft_schema_ogsa.sql(rft_schema_ogsa.sql is provided in the ogsa distribution root, under the etc directory)
To start the db server run:
$ pgctl -o "-i" -l logfile start
Typically two GridFTP servers on separate machines are used to perform a file transfer. However to perform a simple test of RFT, one GridFTP server is sufficient. Another alternative is to start two GridFTP servers on one machine using different ports.
A properly installed host certificate is required to run GridFTP. See the Admin Guide, Security Configuration for details.
As root, start a GridFTP server as follows:
$ $GLOBUS_LOCATION/sbin/in.ftpd -a -S [-p <port>]
GLOBUS_LOCATION is an environment variable set to the root directory of your Globus Core Installation.
The "-S" will send the process to the background.
The -p specifies an available port that GridFTP will listen on. If it's
in use, try another.
Testing GridFTP - Moving a test file
Create a file named /tmp/file1
and run the following
command (This command should be run as user and not root):
globus-url-copy -s "`grid-cert-info -subject`" \
gsiftp://localhost:5678/tmp/file1 \
file:///tmp/file2
Check to make sure that /tmp/file2 now exists.
If you want a GridFTP server to be started automatically when requests come in over a particular socket, then configure your system as follows. Otherwise, this step may be ignored.
If you already have a GT2 GridFTP server installed, skip this step.
Make the following changes to your system as root.
Add this entry to /etc/services:
gsiftp 2811/tcp
Depending on whether your host is running inetd or xinetd, you will need to modify its configuration accordingly.
Inetd
Add the following entry, all on one line, to /etc/inetd.conf.
Replace GLOBUS_LOCATION below with the actual value of
$GLOBUS_LOCATION in your environment.
gsiftp stream tcp nowait root /usr/bin/env env LD_LIBRARY_PATH=GLOBUS_LOCATION/lib GLOBUS_LOCATION/sbin/in.ftpd -l -a -G GLOBUS_LOCATION
New to 2.2: This entry has changed from the entry provided for the GridFTP server in the Globus Toolkit 2.0 Administrator's Guide. The reason is that if you followed the instructions from the install section, you do not have a static in.ftpd. This requires you to set the LD_LIBRARY_PATH so that the server can dynamically link against the libraries in $GLOBUS_LOCATION/lib. To accomplish the setting of the environment variable in inetd, we use /usr/bin/env (the location may vary on your system) to first set LD_LIBRARY_PATH, and then to call in.ftpd itself.
The advantage of this setup is that when you apply a security update to your installation, the GridFTP server will pick it up dynamically without your having to rebuild it.
Xinetd
For xinetd, add a file named "grid-ftp" to the /etc/xinetd.d/
directory with the following contents. Be sure to replace
GLOBUS_LOCATION below with the actual value of $GLOBUS_LOCATION in
your environment.
service gsiftp { instances = 1000 socket_type = stream wait = no user = root env = LD_LIBRARY_PATH=GLOBUS_LOCATION/lib server = GLOBUS_LOCATION/sbin/in.ftpd server_args = -l -a -G GLOBUS_LOCATION log_on_success += DURATION USERID log_on_failure += USERID nice = 10 disable = no }
New to 2.2: This entry has changed from the entry provided for the GridFTP server in the Globus Toolkit 2.0 Administrator's Guide. The reason is that if you followed the instructions from the install section, you do not have a static in.ftpd. This requires you to set the LD_LIBRARY_PATH so that the server can dynamically link against the libraries in $GLOBUS_LOCATION/lib. To accomplish the setting of the environment variable in xinetd, we use the "env =" option to set LD_LIBRARY_PATH in the gatekeeper's environment.
The advantage of this setup is that when you apply a security update to your installation, the GridFTP server will pick it up dynamically without your having to rebuild it.
The -G GLOBUS_LOCATION (remember to substitute your real GLOBUS_LOCATION) tells the in.ftpd to look for ftpaccess in $GLOBUS_LOCATION. If you do not specify this flag, the server will use /etc/ftpaccess.
After you have added the gridftp service to either inetd or xinetd, notify inetd (or xinetd) that its configuration file has changed as follows:
For Inetd:
On most linux systems, you can simply run:
# killall -HUP inetd
On other systems, the following has the same effect:
# ps aux | grep inetd | awk '{print $2;}' | xargs kill -HUP
For Xinetd:
On most linux systems, you can simply run:
# /etc/rc.d/init.d/xinetd restart
On other systems (or if that doesn't work), see man xinetd.
GridFTP uses /etc/grid-security/grid-mapfile for authorization, just like GRAM.
The Core Final distributions includes a deployable GAR for RFT named multirft.gar.
First, set the following parameters in multirft-server-config.wsdd:
JdbcDriver: Name of the JDBC Driver for the database you want to use. For a PostgreSQL installation as described above this value is: org.postgresql.Driver
The driver is shipped along with our distribution.
connectionURL: URL for the Database in order make the
connection. For postgres this is jdbc:postgresql:<db>, and in our
example above it would be jdbc:postgresql:ogsa
username: Local user with access to the database. (On windows
this would be Administrator)
password: Password set up to access the database for the particular user.
Deploy the gar by running the following command in $GLOBUS_LOCATION:
$ ant -f build-packages.xml deployGar \ -Dgar.name=<location of multirft.gar>
This step is optional.
If you downloaded the RFT source code then you can make a deployable gar file as follows:
$ cd data_management/multirft $ ant deployGar
This builds a gar that can be deployed in a service container. Now update the multi-rft-server-config.wsdd and deploy the GAR as described above.
$ source setenv.sh
true # type of transfer true=binary false=ascii 16000 # block size in bytes 16000 # TCP buffer size in bytes false # Notpt 1 # Number of parallel streams true # DCAU 2 # Concurrency gsiftp://dg0n1.mcs.anl.gov/sandbox/madduri/smalltest # source URL1 gsiftp://dg0n1.mcs.anl.gov/sandbox/madduri/test1 # destination URL1 gsiftp://dg0n1.mcs.anl.gov/sandbox/madduri/smalltest # source URL2 gsiftp://dg0n1.mcs.anl.gov/sandbox/madduri/test2 # destination URL2
$ java org.globus.ogsa.gui.RFTClient \ <handle to RFT factory> \ <path to transfers list>