Project

General

Profile

Issues job submission from Windows to Linux

Added by R Balachandar over 14 years ago

Hi,I could able to resolve my earlier issue by proper configuration of jsaga-univer.xml.Further, I would like to know, is there any way of getting more log information about, for ex, where jsaga is looking for key especially when jsaga encounters jsch exception (Auth Failed). The ultimate point is to see detailed log information during initial stages of job submission starting from setting various attributed to cleanup.


Replies (5)

RE: Issues job submission from Windows to Linux - Added by Reynaud Sylvain over 14 years ago

Hi,

Maybe what you are looking for is the command line jsaga-help [http://grid.in2p3.fr/software/jsaga-dev/commands.html#jsaga-help], with option "-s default" or "-s missing" ?

You can also dump the attributes of your security context from your groovy script by invoking the method listAttributes of the SAGA API on your context instance.

I hope this helps,
Sylvain

RE: Issues job submission from Windows to Linux - Added by R Balachandar over 14 years ago

Dear Sylvain,
Thanks for the reply,I wrote a job submission code from windows to linux. This code only works when i set JSAGA_HOME variable using 'System.setProperty' in the code.Otherwise, i get the following error.
log4j:WARN No appenders could be found for logger (fr.in2p3.jsaga.engine.config.Configuration).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" AuthenticationFailed: com.jcraft.jsch.JSchException: Auth fail
at fr.in2p3.jsaga.adaptor.ssh.SSHAdaptorAbstract.connect(SSHAdaptorAbstract.java:144)
at fr.in2p3.jsaga.engine.factories.JobAdaptorFactory.connect(JobAdaptorFactory.java:129)
at fr.in2p3.jsaga.engine.factories.JobAdaptorFactory.connect(JobAdaptorFactory.java:124)
at fr.in2p3.jsaga.impl.job.AbstractSyncJobFactoryImpl.doCreateJobServiceSync(AbstractSyncJobFactoryImpl.java:65)
at fr.in2p3.jsaga.impl.job.JobFactoryImpl.doCreateJobService(JobFactoryImpl.java:35)
at org.ogf.saga.job.JobFactory.createJobService(JobFactory.java:98)
at org.ogf.saga.job.JobFactory$createJobService.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:129)
at jsaga_output.run(jsaga_output.groovy:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:88)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1058)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)
at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:743)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:726)
at org.codehaus.groovy.runtime.InvokerHelper.runScript(InvokerHelper.java:386)
at org.codehaus.groovy.runtime.InvokerHelper$runScript.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:129)
at jsaga_output.main(jsaga_output.groovy)
Caused by: com.jcraft.jsch.JSchException: Auth fail
at com.jcraft.jsch.Session.connect(Session.java:449)
at com.jcraft.jsch.Session.connect(Session.java:149)
at fr.in2p3.jsaga.adaptor.ssh.SSHAdaptorAbstract.connect(SSHAdaptorAbstract.java:141)
... 26 more

Is there any way to bypass setting this property ? I wish to not use jsaga software in the machine but only the required jars and ssh key pair. I wish to know where jsch looks for the keys and configuration file 'jsaga-universe.xml'. Is there any other way to set the user defined location for 'jsaga-universe.xml' other than jsaga_home and jsch takes this?. Is the folder '.jsaga' has something to help here ?Infact, such error tempted us to get more log when execute the job submission class file.

with regards
Bala

RE: Issues job submission from Windows to Linux - Added by Reynaud Sylvain over 14 years ago

Dear Balachandar,

This property is used only when you set relative paths in your configuration (in order to avoid the configuration to depend on user's current directory). It should not be used if you set absolute paths.

You don't need JSAGA on the targeted worker machine, you just need it on the submitting machine.
JSCH does not look for the keys, they are provided by JSAGA thanks to the jsaga-universe.xml configuration file.
Location of the jsaga-universe.xml file is set in the jsaga-config.properties file.
Directory '.jsaga/' is just an example of a possible location for your keys, you are not required to put them into this directory.

If you want to get more logs from an external library integrated into JSAGA, you can try to change the log severity for its namespace (com.jcraft.jsch) in the etc/log4j.properties configuration file. But unless this library explicitly logs messages with the log4j API, you won't get more information. JSAGA itself does not have any additional information that you can not dump by yourself with jsaga-help command or getAttributes method.

Regards,
Sylvain

RE: Issues job submission from Windows to Linux - Added by Alleon Guillaume over 14 years ago

Sylvain,

Can you expand on what you mean by "you just need it on the submitting machine" ..?
On my machine, I have just installed jars. I don't have any JSAGA related environment variables.
Therefore I believe that jsaga-config.properties (and therefore jsaga-universe.xml) are store in one of those jars. Is that correct ?
Does that mean that there exist default location for the certificates and related information ?

Thanks
Guillaume

RE: Issues job submission from Windows to Linux - Added by Reynaud Sylvain over 14 years ago

By "you just need it on the submitting machine", I meant that JSAGA is not needed on worker nodes (some users transfer it on worker nodes, but that's for their own purpose).

But maybe I did not understand correctly what Balachandar meant by "I wish to not use jsaga software in the machine"?... If you invoke SAGA methods with JSAGA jars in your classpath, you are using the JSAGA API. JSAGA_HOME environment variable is optional (if it is not set, default path is current directory).

JSAGA configuration files can be stored in jar files, but that possibility is only used by adaptors integration tests mechanism. However, most of the properties of jsaga-config.properties have a default value, and JSAGA create an empty default universe configuration if jsaga-universe.xml is not provided.

But this is not related to adaptors default configuration. The default values for these configuration attributes depends on each adaptor, and they are set by the method 'getDefaults' of the adaptor. For security adaptors, these default values can be dumped with command "jsaga-help -s default".

The effective configuration is a merge of jsaga-universe.xml, jsaga-user.properties, system properties and adaptors default values. You can dump it with "jsaga-help --config".

I hope this helps.
Regards,
Sylvain

    (1-5/5)