home list archives users mailing list

Subject: Re: DeliverToGFTP

Date view Thread view Subject view Author view Attachment view

From: Ally Hume (a.hume@epcc.ed.ac.uk)
Date: Nov 28, 2007 11:02

Hi Wilson,

For OGSA-DAI to talk to a GridFTP server OGSA-DAI needs to have your
delegated credential so it can talk to the server 'as' you. The
Globus Toolkit supports two ways of delegating your credential to a
server:
  1) Using message level security (GSI secure conversation) and specifying
      limited or full delegation,
  2) Using transport level security and a supporting delegation service

Unfortunately OGSA-DAI only supports option 1 at the moment. Option 2
is currently on our todo list but probably will a low priority. But as
usual requests from users could increase its priority.

So lets concentrate on option 1. Firstly you need to configure your
server for message level security. Details of how to do this can be
found at:
http://www.ogsadai.org.uk/documentation/ogsadai3.0/ogsadai3.0-gt/AdminSecurity.html
You can ignore section 14.1.4. Configuring authorization for the
moment, that is not required. Note that when using message level
security you run the globus container with the -nosec flag, if you do
not specify this flag it will run for transport level security.

You will then need to alter your client to ensure it uses GSI secure
conversation with at least limited delegation. How to do this is
described in:
http://www.ogsadai.org.uk/documentation/ogsadai3.0/ogsadai3.0-gt/UserScenarios.html#Security

Also when you specify your host it should not have the gsiftp
prototype. So it should be:
delivery.addHost("localhost:2811");
rather than:
delivery.addHost("gsiftp.localhost:2811");

But actually localhost won't work when using security so you will have
to use the full hostname for the server, so it will need to be
something like:
delivery.addHost("mygftpserver.epcc.ed.ac.uk:2811");

You should then be able to run the DeliverToGridFTP activity.

Note that the request status you get back from the OGSA-DAI server
should have some useful information that will help you debug your
problem. You can get and print the request status in the event of an
error with code such as:

        try {
            RequestResource rr =
                drer.execute(workflow,RequestExecutionType.SYNCHRONOUS);
            // Code to proceed when all goes well goes in here
        } catch (RequestExecutionException e) {
            // Things went wrong at the server - print the request
status to find out why
            RequestStatus requestStatus =
                e.getRequestResource().getRequestStatus();
            System.out.println("Error during execution. Request status is: ");
            System.out.println(requestStatus);
        }

This will print the status of each activity and if it is in error will
print an error message for that activity.

You can also switch on debugging at the server which may help you. If
using the GT container this can be done by adding the line:
log4j.category.uk.org.ogsadai=DEBUG
To the container-log4j.properties file in the globus home directory.
Although this may give you too much information!

Regards,

Ally Hume
OGSA-DAI Development Team

On 28/11/2007, Wilson Jr. <wilsonjr@gmail.com> wrote:
> Hi folks,
>
> I'm trying to use the DeliverToGFTP activity, but I'm having no sucess.
>
> I did this:
>
> public PipelineWorkflow makePipelineWorkflow(SQLBag query,
> TupleToWebRowSetCharArrays
> transform,
> DeliverToGFTP delivery)
> {
> PipelineWorkflow tempFlow = new PipelineWorkflow();
>
> transform.connectDataInput(query.getDataOutput());
>
> delivery.connectDataInput(transform.getResultOutput());
> delivery.addFilename("tmp/testando.seila");
> delivery.addHost("gsiftp.localhost:2811");
>
> tempFlow.add(query);
> tempFlow.add(transform);
> tempFlow.add(delivery);
>
> return tempFlow;
> }
>
> but I'm receiving this error:
> java -classpath
> ./build/stubs-br_topgrid_dcc_ufba_grid_services_afisdcc_AfisDCC/classes/:$CLASSPATH
> br.topgrid.dcc.ufba.grid.services.afisdcc.client.SQLBagClient
> 2007-11-28 00:01:29,084 DEBUG gt.GTRequestBuilder [main,debug:?]
> GTRequestBuilder()
> 2007-11-28 00:01:29,091 DEBUG gt.GTRequestBuilder [main,debug:?]
> startPipeline()
> 2007-11-28 00:01:29,096 DEBUG gt.GTRequestBuilder [main,debug:?]
> addActivity()
> 2007-11-28 00:01:29,143 DEBUG gt.GTRequestBuilder [main,debug:?]
> visitLiteralInputDescriptor()
> 2007-11-28 00:01:29,144 DEBUG gt.GTRequestBuilder [main,debug:?]
> visitStringData()
> 2007-11-28 00:01:29,145 DEBUG gt.GTRequestBuilder [main,debug:?]
> addActivity()
> 2007-11-28 00:01:29,146 DEBUG gt.GTRequestBuilder [main,debug:?]
> addActivity()
> 2007-11-28 00:01:29,146 DEBUG gt.GTRequestBuilder [main,debug:?]
> visitLiteralInputDescriptor()
> 2007-11-28 00:01:29,146 DEBUG gt.GTRequestBuilder [main,debug:?]
> visitStringData()
> 2007-11-28 00:01:29,147 DEBUG gt.GTRequestBuilder [main,debug:?]
> visitLiteralInputDescriptor()
> 2007-11-28 00:01:29,149 DEBUG gt.GTRequestBuilder [main,debug:?]
> visitStringData()
> 2007-11-28 00:01:29,150 DEBUG gt.GTRequestBuilder [main,debug:?]
> endPipeline()
> Exception in thread "main"
> uk.org.ogsadai.client.toolkit.exception.RequestCompletedWithErrorException :
> [1196218890570:2]
> uk.org.ogsadai.client.toolkit.REQUEST_COMPLETED_WITH_ERROR:
> ogsadai-116841ee54b
> at
> uk.org.ogsadai.client.toolkit.resource.BaseDataRequestExecutionResource.checkSynchronousExecutionIsComplete(Unknown
> Source)
> at
> uk.org.ogsadai.client.toolkit.resource.BaseDataRequestExecutionResource.execute(Unknown
> Source)
> at
> uk.org.ogsadai.client.toolkit.resource.BaseDataRequestExecutionResource.execute(Unknown
> Source)
> at
> br.topgrid.dcc.ufba.grid.services.afisdcc.client.SQLBagClient.executePipeline
> (SQLBagClient.java:194)
> at
> br.topgrid.dcc.ufba.grid.services.afisdcc.client.SQLBagClient.main(
> SQLBagClient.java:333)
>
> This is the best answer for the error that OGSA-DAI give me, tha's using
> DEBUG in the log conf.
>
> Anyone that use this activity can explain me, what's wrong, what I didn't
> put in the code?
>
> Some informations:
> I'm running GT4 with --nosec, then without security, but I think this is
> only to the WS components,
> that gsiftp still utilize security.
>
> I added
> //register transport security
> static
> {
> Util.registerTransport();
> }
> and did'nt work too, after I changed the
> delivery.addHost(gsiftp.192.168.254.2:2811); 192.168.254.2 is my fixed ip on
> my local network.
> delivery.addHost(gsiftp://192.168.254.2:2811)
>
> and happens the same error.
>
> any idea?
>
>
> --
> "É este um mundo no qual devemos esconder nossas virtudes?"
> Willian Shakespeare
>
>
> ****************
> Wilson Júnior
> ****************
>


Date view Thread view Subject view Author view Attachment view