Table of Contents
- 1. APIs
- 2. Services and WSDL
- RFT Commands
- rft - Submit and monitor a 3rd party GridFTP transfer
- globus-crft - Command-line client to transfer files using RFT
- rft-delete - Command-line client to delete files using RFT
- 3. RFT transfer request
- 4. Configuring RFT
- 5. Environment variable interface
- A. Errors
Table of Contents
The Reliable Transfer Service (RFT) is a WSRF based service that provides interfaces for
controlling and monitoring third party file transfers using GridFTP servers. The client
controlling the transfers (in this case RFT) is hosted inside of a Grid service so it can be
managed using the soft state model. It is essentially a reliable and recoverable version of the
GT2 globus-url-copy tool and more. In GT 4.2.0, RFT can also perform file deletion and recursive directory
deletion operations. It is also used by GRAM to perform all the staging operations and cleanup
operations.
Table of Contents
The RFT service implementation in GT 4.2.0 uses standard SOAP messages over HTTP to submit and manage a set of 3rd party GridFTP transfers and to delete files using GridFTP. The user creates an RFT resource by submitting a list of URL pairs of files that need to be transferred/deleted to the RFT Factory service. The user also specifies the time to live for the resource the user is creating to the GT 4.2.0 container in which RFT is deployed and configured. The resource is created after the user is properly authorized and authenticated. RFT service implementation exposes operations to control and manages the transfers (the resource). The operations exposed by both the RFT factory and the RFT service are briefly described below. The resource the user created also exposes the state of the transfer as a resource property to which the user can either subscribe for changes or poll for the changes in state periodically using standard command line clients.
Please find below operations of both RFT Factory and RFT Service Implementation.
Used to create a Reliable File Transfer resource. The operations exposed by the factory are as follows:
createReliableFileTransfer: Creates a Reliable File Transfer resource.- Input Parameters: Initial Termination time, Transfer Request or Delete Request.
- Output parameters: Termination time, Current time, Endpoint reference of the Resource created. This should be stored by the user, as it is needed to query the status of the resource and to perform any further operations on the resource.
- Fault: createReliableFileTransferFault.
Used to manage the Resource created using the RFT Factory Service. The operations exposed by the service are as follows:
start:Starts executing the transfers/deletes.- Input Parameters: None
- Output Parameters: None
- Fault: RepeatedlyStartedFault
getStatus:To get the status of a particular file.- Input Parameters: A source URL of the file that is part of the request.
- Output Parameters:
Transfer Status Type - Fault: RFTDatabaseFault
getStatusSet: To get the status of a set of files in a request.- Input Parameters: int from (the relative position of the transfer in the request) and int offset (the number of files queried).
- Output Parameters: An array of
TransferStatusType. - Fault: RFTDatabaseFault
cancel: To cancel a transfer that is part of a resource.- Input Parameters: int from (the relative position of the transfer in the request) and int to.
- Output Parameters: None
- Fault: RFTDatabaseFault
The resource properties of RFT Factory (which acts both as a resource and a service at the same time) and RFT Resource are found below:
ActiveResourceInstances: A dynamic resource property of the total number of active RFT resources in the container at a given point of time.TotalNumberOfTransfers: A dynamic resource property of the total number of transfers/deletes performed since the RFT service was deployed in this container.TotalNumberOfActiveTransfers: A dynamic resource property of the number of active transfers across all rft resources in a container at a given point of time.TotalNumberOfBytesTransferred: A dynamic resource property of the total number of bytes transferred by all RFT resources created since the deployment of the service.RFTFactoryStartTime: Time when the service was deployed in the container. Used to calculate uptime.DelegationServiceEPR: The end point reference of the Delegation resource that holds the delegated credential used in executing the resource.
OverallStatus: This is a complex type providing the overall status of an RFT resource by providing the number of transfers pending, active, finished, retrying, failed, and cancelled. Each of these values can be obtained by invoking getTransfers(Finished/Active/Failed/Restarted/Pending/Cancelled) on OverallStatus Resource Property. Note that this Resource Property gets updated every time one of the transfers changes state, so there can be and will be more than one update in the life time of a RFT resource if you subscribe to this RP. This Resource Property also includes the last fault (if thrown) from a transfer and can be accessed by invoking getFault on OverallStatus. This will indicate why a transfer has failed.RequestStatus: This is a complex type resource property providing the status of an RFT resource in the form of Pending/Active/Done/Failed. The status can be obtained from RequestStatusType by invoking getRequestStatus(). This will result in one of four status strings (Pending/Active/Done/Failed/Cancelled). This RP also contains a fault that denotes the last fault in a RFT resource and can be accessed by invoking getFault(). If a client is subscribed to this RP, there will be only be 2 updates in the life time of an RFT resource (Pending->Active->Done, Pending->Active->Failed, Pending->Active->Cancelled, and Pending->Cancelled).TotalBytes: This provides the total number of bytes transferred by the resource.TotalTime: This provides the total time taken to transfer the above-mentioned total bytes.
Faults from the RFT Factory Service and RFT Service can be found below:
createReliableFileTransferFault: All the errors encountered during the creation of the RFT resource are mapped to this fault. Any security related errors are caught before the factory and are thrown to the user/client.
You can find links to all the RFT schemas here.
Table of Contents
- rft - Submit and monitor a 3rd party GridFTP transfer
- globus-crft - Command-line client to transfer files using RFT
- rft-delete - Command-line client to delete files using RFT
Name
rft — Submit and monitor a 3rd party GridFTP transfer
Synopsis
rft
Tool description
Submits a transfer to the Reliable File Transfer Service and prints out the status of the transfer on the console.
Command syntax and options
rft [-h <host-ip of the container defaults to localhost> -r <port, defaults to 8080> -l <lifetime for the resource default 60mins> -m <security mechanism. 'msg' for secure message or 'conv' for secure conversation and 'trans' for transport. Defaults to secure transport.> -p <protection type, 'sig' signature and 'enc' encryption, defaults to signature > -z <authorization mechanism can be self or host. default self> -file <file to write EPR of created Reliable File Transfer Resource]> -f <path to the file that contains list of transfers>
This is a sample transfer file that the command-line client will be able to parse. It can also be found in $GLOBUS_LOCATION/share/globus_wsrf_rft_client/ along with other samples for directory transfers and deletes (lines starting with # are comments):
This option when it is set to true means to perform transfer in binary form, if it is set to false transfer is done in ASCII. Default is binary. true #Block size in bytes that is transferred. Default is 16000 bytes. 16000 #TCP Buffer size in bytes #Specifies the size (in bytes) of the TCP buffer to be used by the underlying ftp data channels. This is critical to good performance over the WAN. Use the bandwidth-delay product as your buffer size. 16000 #Notpt (No thirdPartyTransfer): turns third-party transfers off is this option is set to false (on if set to true). Site firewall and/or software configuration may prevent a connection between the two servers (a third party transfer). If this is the case, RFT will "relay" the data. It will do a GET from the source and a PUT to the destination. This obviously causes a performance penalty, but will allow you to complete a transfer you otherwise could not do. false #Number of parallel streams: Specifies the number of parallel data connections that should be used. 1 #Data Channel Authentication (DCAU): Turns off data channel authentication for FTP transfers is set to false.(the default is true to authenticate the data channel). true # Concurrency of the request: Number of files that you want to transfer at any given point. Default is set to one. 1 #Grid Subject name of the source gridftp server. This is used for Authorization purposes. If the source gridftp server is running with host credentials you can specify "null" here. By default host authorization is performed /DC=org/DC=doegrids/OU=People/CN=Ravi Madduri 134710 #Grid Subject name of the destination gridftp server. This is used for Authorization purposes. If the destination gridftp server is running with host credentials you can specify "null" here. By default Host authorization is done. /DC=org/DC=doegrids/OU=People/CN=Ravi Madduri 134710 #Transfer all or none of the transfers: This option if set to true will make RFT to clean up ( delete ) all the transfers that have been done already if one of the transfers fails. Used in GRAM when staging. false #Maximum number of retries: This is number of times RFT retries a transfer failed with a non-fatal error. 10 #Source/Dest URL Pairs: gsiftp urls of source followed by destination. If directory is to be recursively transferred the source gsiftp url and destination gsiftp url should end with "/". Currently RFT supports Directory - Directory, File - Directory, File - File transfers. There can be more URL pairs and all of them use the same options as above for performing the transfer. gsiftp://localhost:5678/tmp/rftTest.tmp gsiftp://localhost:5678/tmp/rftTest_Done.tmp
Limitations
This command line client is very simple and does not do any intelligent parsing of various command line options or of the options in the sample transfer file. It works fine if used in the way documented here. For more information on all these options please refer to the documentation of globus-url-copy. Also, please note that the maximum number of transfers the command-line client can process before running out of memory is ~21K with the default JVM heap size, which was 64M in our tests. Please look at Performance Reports for more details.
Name
globus-crft — Command-line client to transfer files using RFT
Synopsis
globus-crft
Tool description
This distribution contains a client to the RFT service written in C. RFT is the reliable transfer server. It allows clients to submit URL transfer requests to a persistent service which will perform the transfers on behalf of the client.
Options
-
-a|--all-or-none<on | off> - Enable all or none transfer: default off.
-
-con|--concurrent<int> - The number of simultaneous transfers.
-C|--cancel- Cancel a transfer.
-c|--create- Create a new RFT service.
-del|--delete- Delete a URL.
-ds|--destination-subject<subject>- The expected domain name of the destination GridFTP server.
-d|--destroy- Destroy the server. If used with
-monitor, wait until completion and then destroy. -D|--doneReturn the current status of the transfer in the exit code:
- 0=Done
- 1=Active
- 2=Pending
- 3=Cancelled
- 4=Failed
-ef|--epr-file<path>- Path to the EPR file. If used with
--createthe EPR is written to this location. In all other cases the EPR is read from this location. - -ez | --easy
- Create, submit, and wait for the transfer to complete. The job is started with some standard options.
- -e | --factory <contact>
- The endpoint to contact when creating a server. Used with --create.
-f|--transfer-file <path>- A path to a file that contains the source destination URL pairs.
-gS|--getStatusSet <int> <int>- Get the status of all the transfer requests in the range.
-g|--getStatus<source url>- Get the status of the given source url.
-h|--help- Print usage information.
FIXME - finish converting to variable list:
-ms | --message-security <[sig] | [conv] | [trans]>
Security mechanism. 'msg' for secure message,
'conv' for secure conversation, 'trans' for
transport. The default is trans.
-m | --monitor Wait for the service to complete, and recieve
status updates.
-os | --getOverallStatus Get the overall status.
-p | --protection <[sig] | [enc]>
Protection type. 'sig' for signature, 'enc' for
encryption. The default is 'sig'.
-P | --parallel <int> The number of parallel sockets to use with each
transfer.
-q | --quiet Write no output.
-rs | --getRequestStatus Get the request status.
-r | --retries Number of retries
-S | --subject <subject> The expected domain name of both the source and
destination GridFTP servers.
-ss | --source-subject <subject>
The expected domain name of the source GridFTP
server.
-s | --submit Start the RFT service
-tb | --tcp-bs <int> The TCP buffer size to use with each transfer.
-ttl | --termination-time <int>
Set the lifetime of the service.
-v | --version Print version information.
-vb | --verbose Display much more output.
-xi | --xml-input <path> Read the request description from the given xml
description.
-xo | --xml-output <path> Write the request description to the given file
location in xml format.
-z | --authz <[self] | [host] | [id <subject>]>
Authorization. 'self', 'host', or 'id <DN>'.
Name
rft-delete — Command-line client to delete files using RFT
Synopsis
rft-delete
Command and options
rft-delete [-h <host-ip of the container default localhost> -r <port, defaults to 8080> -l <lifetime for the resource default 60mins> -m <security mechanism. 'msg' for secure message or 'conv' for secure conversation and 'trans' for transport. Defaults to secure transport.> -p <protection type, 'sig' signature and 'enc' encryption, defaults to signature > -z <authorization mechanism can be self or host. default self> -file <file to write EPR of created Reliable File Transfer Resource]> -f <path to the file that contains list of transfers>
This is a sample file that the command line client will be able to parse, and it can also be found in $GLOBUS_LOCATION/share/globus_wsrf_rft_client/ along with other samples for directory transfers and deletes (lines starting with # are comments):
# Subject name (defaults to host subject) /DC=org/DC=doegrids/OU=People/CN=Ravi Madduri 134710 gsiftp://localhost:5678/tmp/rftTest_Done.tmp gsiftp://localhost:5678/tmp/rftTest_Done1.tmp
Table of Contents
These options are set in the transferRequest and deleteRequest elements and apply similarly for each.
concurrency
This denotes number of files in the request that needs to be transferred at one time.
maxAttempts
Maximum number of attempts after transient errors to execute the transfer or deletion before giving up and raising an error.
finishBy
(Not Implemented) In future versions of RFT this will be used to enforce time constraints on a transfer.
These options are set in the
rftOptions element
(see
RFTOptionsType
for more details)
and are specific
to file transfers. They can be specified as defaults for all transfers
under the
transferRequest
element,
and/or individually under each transfer
element
(see
TransferType
for more details):
<transferRequest>
<transfer>...</transfer>
<rftOptions>
<-- option elements here -->
</rftOptions>
</transferRequest>
AND/OR
<transferRequest>
<transfer>
...
<sourceUrl>
<destinationUrl>
...
<rftOptions>
<-- option elements here -->
</rftOptions>
</transfer>
</transferRequest>
binary
Transfer as a binary file. Default is "true".
blockSize
Specifies the size of the data blocks to use in the transfer.
tcpBufferSize
Specifies the TCP buffer size used for the transfer.
notpt
If set to "true", third-party transfer mode will not be use. Instead, a client thread will be started that will GET data from the source server and and PUT data to the destination server. Default is "false".
parallelStreams
Specifies the number of parallel streams to use during the transfer. Default is 1.
dcau
Specifies whether or not to use data channel authentication. Default is true.
subjectName
Specifies the credential subject to use for authenticating both the source and destination servers.
destinationSubjectName
Specifies the credential subject to use for authenticating the destination server.
sourceSubjectName
Specifies the credential subject to use for authenticating the source server.
userName
Specifies the username to be used to perform the transfer which sometimes may not be the same as transfer requester.
These options are set in the
deleteOptions element
(see
DeleteOptionsType
for more details),
and are specific to file deletions. They can be specified as defaults for
all deletions under the
deleteRequest
element, and/or individually under each
deletion
element
(see
DeleteType
for more details):
<deleteRequest>
<deletion>...</deletion>
<deleteOptions>
<-- option elements here -->
</deleteOptions>
</deleteRequest>
AND/OR
<deleteRequest>
<deletion>
...
<file>
<deleteOptions>
<-- option elements here -->
</deleteOptions>
</deletion>
</deleteRequest>
subjectName
Specifies the credential subject to use for authenticating the target server.
userName
Specifies the username to be used to perform the deletion.
Table of Contents
RFT has the following prerequisites:
- Java WS Core - This is built and installed in a Installing GT 4.2.0.
- A host certificate (see Installing GT 4.2.0).
- GridFTP - GridFTP performs the actual file transfer and is built and installed in a Installing GT 4.2.0.
- PostgreSQL - 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 others have been tested. For instructions on configuring the PostgreSQL database for RFT, see below. .
The security of the service can be configured by modifying the security descriptor. It allows for configuring the credentials that will be used by the service, type of authentication and authorization that needs to be enforced. By default, the following security configuration is installed:
- Credentials set for use by the container are used. If they arenot specified, default credentials are used.
- GSI Secure conversation authentication is enforced for all methods.
Note: Changing the required authentication and authorization method will require suitable changes to the clients that contact this service.
To alter the security descriptor configuration, refer to security descriptor. The file to be altered is $GLOBUS_LOCATION/etc/globus_wsrf_rft/security-config.xml.
PostgreSQL (version 7.1 or greater) can be used with RFT but is no longer a requirement. You can either use the packages which came with your operating system (RPMs, DEBs, ...) or build from source. We used PostgreSQL version 7.3.2 for our testing and the following instructions are good for the same.
Install PostgreSQL. Instructions on how to install/configure PostgreSQL can be found here.
Configure the postmaster daemon so that it accepts TCP connections. This can be done by adding the "-o -i" switch to the postmaster script (This is either the init.d script found in /etc/init.d/postgresql or /var/lib/, depending on how you installed PostgreSQL). Follow the instructions here to start the postmaster with the -i option.
You will now need to create a PostgreSQL user that will connect to the database. This is usually the account under which the container is running. You can create a PostgreSQL user by running the following command:
su postgres; createuser globus. If you get the following error:psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?this generally means that either your postmaster is not started with the -i option or you didn't restart the postmaster after the above mentioned step.Now you need to set security on the database you are about to create. You can do it by following the steps below:
sudo vi /var/lib/pgsql/data/pg_hba.confand append the following line to the file:host rftDatabase "username" "host-ip" 255.255.255.255 md5Note: use crypt instead of md5 if you are using PostgreSQL 7.3 or earlier.sudo /etc/init.d/postgresql restartTo create the database that is used for RFT run (as user globus):
createdb rftDatabase.To populate the RFT database with the appropriate schemas run:
psql -d rftDatabase -f $GLOBUS_LOCATION/share/globus_wsrf_rft/rft_schema.sql. Now that you have created a database to store RFT's state, the following steps configure RFT to find the database:Open
$GLOBUS_LOCATION/etc/globus_wsrf_rft/jndi-config.xml.Find the
dbConfigurationsection under theReliableFileTransferService <service>section.Change the
connectionStringto point to the machine on which you installed PostgreSQL and to the name of the database you used in step 2. If you installed PostgreSQL on the same machine as your Globus install, the default should work fine for you.Change the
userNameto the name of the user who owns/created the database and do the same for the password (it also depends on how you configured your database).Don't worry about the other parameters in the section. The defaults should work fine for now.
Edit the configuration section under
ReliableFileTransferService. There are two values that can be edited in this section:backOff: Time in milliseconds you want RFT to backoff before a failed transfer is retried by RFT. The default should work fine for now.maxActiveAllowed: This is the number of transfers the container can do at given point. The default should be fine for now.
If you prefer MySQL to Postgres or derby you can use it with RFT instead. Instructions on how to this can be found at here.
With a default GT 4.2.0 installation, the RFT service is automatically registered with the default WS MDS Index Service running in the same container for monitoring and discovery purposes.
There is a jndi resource defined in $GLOBUS_LOCATION/etc/globus_wsrf_rft/jndi-config.xml as follows :
<resource name="mdsConfiguration"
type="org.globus.wsrf.impl.servicegroup.client.MDSConfiguration">
<resourceParams>
<parameter>
<name>reg</name>
<value>true</value>
</parameter>
<parameter>
<name>factory</name>
<value>org.globus.wsrf.jndi.BeanFactory</value>
</parameter>
</resourceParams>
</resource>
To configure the automatic registration of RFT to the default WS MDS Index Service, change the value of the parameter
<reg> as follows:
trueturns on auto-registration; this is the default in GT 4.2.0.falseturns off auto-registration.
By default, the following resource properties (from the RFT Factory Resource) are sent to the default Index Service:
ActiveResourceInstances: A dynamic resource property of the total number of active RFT resources in the container at a given point of time.TotalNumberOfTransfers: A dynamic resource property of the total number of transfers/deletes performed since the RFT service was deployed in this container.TotalNumberOfActiveTransfers: A dynamic resource property of the number of active transfers across all rft resources in a container at a given point of time.TotalNumberOfBytesTransferred: A dynamic resource property of the total number of bytes transferred by all RFT resources created since the deployment of the service.RFTFactoryStartTime: Time when the service was deployed in the container. Used to calculate uptime.DelegationServiceEPR: The end point reference of the Delegation resource that holds the delegated credential used in executing the resource.
You can configure which resource properties are sent in RFT's registration.xml file, $GLOBUS_LOCATION/etc/globus_wsrf_rft/registration.xml.
The following is the relevant section of the file:
<Content xsi:type="agg:AggregatorContent"
xmlns:agg="http://mds.globus.org/aggregator/types">
<agg:AggregatorConfig xsi:type="agg:AggregatorConfig">
<agg:GetMultipleResourcePropertiesPollType
xmlns:rft="http://www.globus.org/namespaces/2004/10/rft">
<!-- Specifies that the index should refresh information
every 60000 milliseconds (once per minute) -->
<agg:PollIntervalMillis>60000</agg:PollIntervalMillis>
<!-- specifies that all Resource Properties should be
collected from the RFT factory -->
<agg:ResourcePropertyNames>rft:TotalNumberOfBytesTransferred</agg:ResourcePropertyNames>
<agg:ResourcePropertyNames>rft:TotalNumberOfActiveTransfers</agg:ResourcePropertyNames>
<agg:ResourcePropertyNames>rft:RFTFactoryStartTime</agg:ResourcePropertyNames>
<agg:ResourcePropertyNames>rft:ActiveResourceInstances</agg:ResourcePropertyNames>
<agg:ResourcePropertyNames>rft:TotalNumberOfTransfers</agg:ResourcePropertyNames>
</agg:GetMultipleResourcePropertiesPollType>
</agg:AggregatorConfig>
<agg:AggregatorData/>
</Content>
If a third party needs to register an RFT service manually, see Registering with mds-servicegroup-add in the WS MDS Aggregator Framework documentation.
Table of Contents
Table A.1. Reliable File Transfer (RFT) Errors
| Error Code | Definition | Possible Solutions |
|---|---|---|
Error creating RFT Home: Failed to connect to database ...
Until this is corrected all RFT request will fail and all GRAM jobs that require staging will fail | This occurs when you start the container if RFT is not configured properly to talk to a PostgreSQL database. | The usual cause is that Postmaster is not accepting TCP connections, which means that you must restart Postmaster with the -i option (see Configuring RFT). |
ERROR service.RFTResourceManager [Thread-13,transferCompleted:517]
Unable to update on finished
org.globus.transfer.reliable.service.database.RftDBException:
RFT database update error
[Caused by: Syntax error: Encountered ")" at line 1, column 47.]
| This error occurs as a result of a dynamically built SQL update string. The update occurs when a transfer completes. It is used to notify transfer requests using the same hosts that resources on that host have been freed. The error message occurs when no rows in the database match that host. | Users of RFT may safely ignore this error. The message is harmless to the functionality of RFT and will not affect the results of a transfer in any way. The exception is safely caught. Future versions of RFT will have optimizations to avoid this step. |