Hi Dinuka, It should be fixed by now. Local transport was not enhanced for the latest architecture. This [1] commit should fix it
[1] https://github.com/apache/airavata-mft/commit/380a674d904ceab21a32c353b74c3742472801ec Thanks Dimuthu On Wed, Apr 15, 2020 at 4:32 PM Dinuka Desilva <[email protected]> wrote: > Hi, > > on airavata-mft, I'm trying to make a transport from local to local and > I'm getting a null pointer exception. I'm doubt whether there's any > configuration miss on my end. If not whether the local transport is > correctly working at the moment. I'm running the latest master branch code. > > > *resources.json* > [ > { > "type": "LOCAL", > "resourceId": "abcd-txt-file", > "resourcePath": "/tmp/abcd.txt" > }, > { > "type": "LOCAL", > "resourceId": "efgh-txt-file", > "resourcePath": "/tmp/efgh.txt" > } > ] > > > > *SampleClient.java* > import org.apache.airavata.mft.api.client.MFTApiClient; > import org.apache.airavata.mft.api.service.*; > > public class SampleClient { > public static void main(String args[]) throws InterruptedException { > > MFTApiServiceGrpc.MFTApiServiceBlockingStub client = > MFTApiClient.buildClient("localhost", 7004); > > String sourceId = "abcd-txt-file"; > String sourceToken = "local-ssh-cred"; > String destId = "efgh-txt-file"; > String destToken = "local-ssh-cred"; > > TransferApiRequest request = TransferApiRequest.newBuilder() > .setSourceId(sourceId) > .setSourceType("LOCAL") > .setDestinationId(destId) > .setDestinationType("LOCAL") > .setAffinityTransfer(false).build(); > > // Submitting the transfer to MFT > TransferApiResponse transferApiResponse = > client.submitTransfer(request); > while(true) { > // Monitoring transfer status > try { > TransferStateApiResponse transferState = > client.getTransferState(TransferStateApiRequest.newBuilder().setTransferId(transferApiResponse.getTransferId()).build()); > System.out.println("Latest Transfer State " + > transferState.getState()); > System.out.println("Latest Transfer State " + > transferState.getDescription()); > > } catch (Exception e) { > System.out.println("Errored " + e.getMessage()); > } > Thread.sleep(1000); > } > } > } > > > *Log* > > 01:53:22.937 [grpc-nio-worker-ELG-1-2] DEBUG > io.grpc.netty.NettyClientHandler - [id: 0xb581d434, L:/127.0.0.1:61994 - > R:localhost/127.0.0.1:7004] OUTBOUND HEADERS: streamId=31 > headers=GrpcHttp2OutboundHeaders[:authority: localhost:7004, :path: > /org.apache.airavata.mft.api.service.MFTApiService/getTransferState, > :method: POST, :scheme: http, content-type: application/grpc, te: trailers, > user-agent: grpc-java-netty/1.25.0, grpc-accept-encoding: gzip] > streamDependency=0 weight=16 exclusive=false padding=0 endStream=false > > 01:53:22.938 [grpc-nio-worker-ELG-1-2] DEBUG > io.grpc.netty.NettyClientHandler - [id: 0xb581d434, L:/127.0.0.1:61994 - > R:localhost/127.0.0.1:7004] OUTBOUND DATA: streamId=31 padding=0 > endStream=true length=43 > bytes=00000000260a2466303565383630382d363536302d346463332d396365612d343733643832326563626666 > > 01:53:22.942 [grpc-nio-worker-ELG-1-2] DEBUG > io.grpc.netty.NettyClientHandler - [id: 0xb581d434, L:/127.0.0.1:61994 - > R:localhost/127.0.0.1:7004] INBOUND HEADERS: streamId=31 > headers=GrpcHttp2ResponseHeaders[:status: 200, content-type: > application/grpc, grpc-encoding: identity, grpc-accept-encoding: gzip] > streamDependency=0 weight=16 exclusive=false padding=0 endStream=false > > 01:53:22.943 [grpc-nio-worker-ELG-1-2] DEBUG > io.grpc.netty.NettyClientHandler - [id: 0xb581d434, L:/127.0.0.1:61994 - > R:localhost/127.0.0.1:7004] INBOUND DATA: streamId=31 padding=0 > endStream=false length=1196 > bytes=00000004a70a064641494c45441093918afc972e2295096a6176612e6c616e672e4e756c6c506f696e746572457863657074696f6e0a096174206f72672e6170... > > 01:53:22.943 [grpc-nio-worker-ELG-1-2] DEBUG > io.grpc.netty.NettyClientHandler - [id: 0xb581d434, L:/127.0.0.1:61994 - > R:localhost/127.0.0.1:7004] INBOUND HEADERS: streamId=31 > headers=GrpcHttp2ResponseHeaders[grpc-status: 0] streamDependency=0 > weight=16 exclusive=false padding=0 endStream=true > > Latest Transfer State FAILED > > Latest Transfer State java.lang.NullPointerException > > at > org.apache.airavata.mft.transport.local.LocalMetadataCollector.getGetResourceMetadata(LocalMetadataCollector.java:52) > > at > org.apache.airavata.mft.agent.TransportMediator.transfer(TransportMediator.java:56) > > at > org.apache.airavata.mft.agent.MFTAgent.lambda$acceptRequests$6(MFTAgent.java:143) > > at java.base/java.util.Optional.ifPresent(Optional.java:176) > > at > org.apache.airavata.mft.agent.MFTAgent.lambda$acceptRequests$7(MFTAgent.java:106) > > at java.base/java.lang.Iterable.forEach(Iterable.java:75) > > at > org.apache.airavata.mft.agent.MFTAgent.lambda$acceptRequests$8(MFTAgent.java:104) > > at com.orbitz.consul.cache.ConsulCache$1.onComplete(ConsulCache.java:150) > > at com.orbitz.consul.util.Http$1.onResponse(Http.java:79) > > at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:129) > > at okhttp3.RealCall$AsyncCall.execute(RealCall.java:203) > > at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) > > at > java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) > > at > java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) > > at java.base/java.lang.Thread.run(Thread.java:832) > > > > Regards, > Dinuka > > > > >
