airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramin...@apache.org
Subject [1/2] git commit: Fixed AIRAVATA-1430 to parse stderr.
Date Mon, 15 Sep 2014 16:10:08 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 87c0ee207 -> ed5f886e5


Fixed AIRAVATA-1430 to parse stderr. 

Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/8eb65c6b
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/8eb65c6b
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/8eb65c6b

Branch: refs/heads/master
Commit: 8eb65c6b0b2315ad67d3df5f509298b48ae81265
Parents: d1d8759
Author: raminder <raminder@apache.org>
Authored: Mon Sep 15 12:09:30 2014 -0400
Committer: raminder <raminder@apache.org>
Committed: Mon Sep 15 12:09:30 2014 -0400

----------------------------------------------------------------------
 .../apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/8eb65c6b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
----------------------------------------------------------------------
diff --git a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
index 7352f78..0572069 100644
--- a/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
+++ b/tools/gsissh/src/main/java/org/apache/airavata/gsi/ssh/impl/GSISSHAbstractCluster.java
@@ -209,7 +209,7 @@ public class GSISSHAbstractCluster implements Cluster {
 
         try {
             session.connect();
-        } catch (JSchException e) {
+        } catch (Exception e) {
             throw new SSHApiException("An exception occurred while connecting to server."
+
                     "Connecting server - " + serverInfo.getHost() + ":" + serverInfo.getPort()
+
                     " connecting user name - "
@@ -466,8 +466,11 @@ public class GSISSHAbstractCluster implements Cluster {
         String stdErrorString = jobIDReaderCommandOutput.getStdErrorString();
         log.info("StandardOutput Returned:" + stdOutputString);
         log.info("StandardError  Returned:" +stdErrorString);
-        if("".equals(stdOutputString)){
-            log.error("-------------- Standard output came as empty, so this poll is going
to fail --------------");
+        
+        // We are checking for stderr containing the command issued. Thus ignores the verbose
logs in stderr.  
+        if (stdErrorString != null && stdErrorString.contains(command)) {
+            log.error("Standard Error output : " + stdErrorString);
+            throw new SSHApiException(errorMsg + "\n\r StandardOutput: "+ stdOutputString
+ "\n\r StandardError: "+ stdErrorString);
         }
         return stdOutputString;
     }


Mime
View raw message