Project

General

Profile

Problem with SSHJobControlAdaptor class

Added by Scardaci Diego about 11 years ago

Dear Guys,
we are developing a new adaptor that uses internally SSH adaptor classes to perform some operations.
The new adaptor uses VOMS security context.

Inside our JobControlAdaptor class we declared a SSHJobControlAdaptor:

private SSHJobControlAdaptor sshControlAdaptor = new SSHJobControlAdaptor();

and we set the security credential in the following way:

sshControlAdaptor.setSecurityCredential(
new SSHSecurityCredential (
privatekey_filename,
publickey_filename,
"",
"root")
);

inside the getInputStagingTransfer method of our JobControlAdaptor we wrapped the SSH adaptor in the following way:

@Override
public StagingTransfer[] getInputStagingTransfer(String nativeJobId)
throws PermissionDeniedException,
TimeoutException,
NoSuccessException {
StagingTransfer[] result = null;
String _publicIP = nativeJobId.substring(nativeJobId.indexOf("")+1, nativeJobId.indexOf("#"));
String _nativeJobId = nativeJobId.substring(0, nativeJobId.indexOf("
"));
try {            
System.out.println("\nCalling ... getInputStagingTransfer");
sshControlAdaptor.connect(null, _publicIP, 22, null, new HashMap());
result = sshControlAdaptor.getInputStagingTransfer(_nativeJobId);
} catch (Exception ex) { ex.printStackTrace(System.out); }
return result;
}

we tested the new adaptor in 2 different machines (with the same JSAGA version installed). It works well in one machine but in the other machine we got the following error when the getInputStagingTransfer is called:

NoSuccess: AuthenticationFailed: Security context class 'fr.in2p3.jsaga.adaptor.security.VOMSSecurityCredential' not supported for protocol: sftp

I don't understand why:
1) the SSH adaptor is using a VOMSSecurityCredential if we set its security credential as I described above
2) we have a different behavior in different machines with the same JSAGA version installed. That's very strange...

do you have any idea?

I can send you the code of the new adaptor if you want to look it.

Cheers,
Diego


Replies (1)

RE: Problem with SSHJobControlAdaptor class - Added by Schwarz Lionel about 11 years ago

Hi Diego,
Please contact me on my email with your code
I'll have a look today hopefully
Lionel

    (1-1/1)