[jira] [Commented] (OOZIE-1974) SSH Action doesn't handle compound commands eg: cmd1 && cmd2 and stuck in [PREP] stage

2019-10-11 Thread Andras Salamon (Jira)


[ 
https://issues.apache.org/jira/browse/OOZIE-1974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16949280#comment-16949280
 ] 

Andras Salamon commented on OOZIE-1974:
---

[~matijhs] Thanks for the patch, I like the idea of {{eval}}, but I'm not sure 
about the args checking part. To be honest I have lot's of possible test cases 
in my mind which would be useful to test, so I agree, fixing OOZIE-3391 before 
this would be really great.

> SSH Action doesn't handle compound commands eg: cmd1 && cmd2 and stuck in 
> [PREP] stage
> --
>
> Key: OOZIE-1974
> URL: https://issues.apache.org/jira/browse/OOZIE-1974
> Project: Oozie
>  Issue Type: Bug
>  Components: action
>Affects Versions: trunk
>Reporter: Michalis Kongtongk
>Assignee: Mate Juhasz
>Priority: Major
> Attachments: OOZIE-1974.patch
>
>
> example WF that will fail:
> {code}
>  
>  
>  
>  
> oozie-u...@somedomain.com 
> kinit 
> oozie-u...@somedomain.com 
> -k 
> -t 
> /home/oozie-user/oozie.keytab 
>  
> hdfs 
> dfs 
> -put 
> /tmp/random-file.txt 
> /tmp/random-file.txt 
>  
>  
>  
>  
>  
> Action failed, error 
> message[${wf:errorMessage(wf:lastErrorNode())}] 
>  
>  
> 
> {code}
> Workaround is to execute the compound command in subshell eg: $(cmd1 && cmd2) 
> {code}
>  
>  
>  
>  
> oozie-u...@somedomain.com 
> $(kinit 
> oozie-u...@somedomain.com 
> -k 
> -t 
> /home/oozie-user/oozie.keytab 
>  
> hdfs 
> dfs 
> -put 
> /tmp/random-file.txt 
> /tmp/random-file.txt 
> ) 
>  
>  
>  
>  
>  
> Action failed, error 
> message[${wf:errorMessage(wf:lastErrorNode())}] 
>  
>  
> 
> {code}
> Stack trace "org.apache.oozie.command.CommandException: E0800: Action it is 
> not running its in [PREP] state,"
> {code}
> 2014-08-05 23:29:49,721 INFO org.apache.oozie.action.ssh.SshActionExecutor: 
> SERVER[192-168-88-213.lunix.lan] USER[mko] GROUP[-] TOKEN[] APP[Ssh-copy] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] start() begins 
> 2014-08-05 23:29:49,723 INFO org.apache.oozie.action.ssh.SshActionExecutor: 
> SERVER[192-168-88-213.lunix.lan] USER[mko] GROUP[-] TOKEN[] APP[Ssh-copy] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] Attempting to copy ssh base 
> scripts to remote host [m...@192-168-88-213.lunix.lan] 
> 2014-08-05 23:29:52,691 INFO org.apache.oozie.servlet.CallbackServlet: 
> SERVER[192-168-88-213.lunix.lan] USER[-] GROUP[-] TOKEN[-] APP[-] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] callback for action 
> [008-140805224842389-oozie-oozi-W@Ssh] 
> 2014-08-05 23:29:52,714 ERROR 
> org.apache.oozie.command.wf.CompletedActionXCommand: 
> SERVER[192-168-88-213.lunix.lan] USER[-] GROUP[-] TOKEN[] APP[-] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] XException, 
> org.apache.oozie.command.CommandException: E0800: Action it is not running 
> its in [PREP] state, action [008-140805224842389-oozie-oozi-W@Ssh] 
> at 
> org.apache.oozie.command.wf.CompletedActionXCommand.eagerVerifyPrecondition(CompletedActionXCommand.java:77)
>  
> at org.apache.oozie.command.XCommand.call(XCommand.java:251) 
> at 
> org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:174)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>  
> at java.lang.Thread.run(Thread.java:662) 
> 2014-08-05 23:29:52,714 WARN 
> org.apache.oozie.service.CallableQueueService$CallableWrapper: 
> SERVER[192-168-88-213.lunix.lan] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] 
> ACTION[-] exception callable [callback], E0800: Action it is not running its 
> in [PREP] state, action [008-140805224842389-oozie-oozi-W@Ssh] 
> org.apache.oozie.command.CommandException: E0800: Action it is not running 
> its in [PREP] state, action [008-140805224842389-oozie-oozi-W@Ssh] 
> at 
> org.apache.oozie.command.wf.CompletedActionXCommand.eagerVerifyPrecondition(CompletedActionXCommand.java:77)
>  
> at org.apache.oozie.command.XCommand.call(XCommand.java:251) 
> at 
> org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:174)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>  
> at java.lang.Thread.run(Thread.java:662) 
> 2014-08-05 23:29:57,262 INFO org.apache.oozie.action.ssh.SshActionExecutor: 
> SERVER[192-168-88-213.lunix.lan] USER[mko] GROUP[-] TOKEN[] APP[Ssh-copy] 
> 

[jira] [Commented] (OOZIE-1974) SSH Action doesn't handle compound commands eg: cmd1 && cmd2 and stuck in [PREP] stage

2019-10-10 Thread Hadoop QA (Jira)


[ 
https://issues.apache.org/jira/browse/OOZIE-1974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16948738#comment-16948738
 ] 

Hadoop QA commented on OOZIE-1974:
--


Testing JIRA OOZIE-1974

Cleaning local git workspace



{color:green}+1 PATCH_APPLIES{color}
{color:green}+1 CLEAN{color}
{color:red}-1 RAW_PATCH_ANALYSIS{color}
.{color:green}+1{color} the patch does not introduce any @author tags
.{color:green}+1{color} the patch does not introduce any tabs
.{color:green}+1{color} the patch does not introduce any trailing spaces
.{color:green}+1{color} the patch does not introduce any star imports
.{color:red}-1{color} the patch contains 1 line(s) longer than 132 
characters
.{color:red}-1{color} the patch does not add/modify any testcase
{color:green}+1 RAT{color}
.{color:green}+1{color} the patch does not seem to introduce new RAT 
warnings
{color:red}-1 JAVADOC{color}
.{color:green}+1{color} Javadoc generation succeeded with the patch
.{color:red}-1{color} the patch seems to introduce 1 new Javadoc warning(s)
{color:green}+1 COMPILE{color}
.{color:green}+1{color} HEAD compiles
.{color:green}+1{color} patch compiles
.{color:green}+1{color} the patch does not seem to introduce new javac 
warnings
{color:red}-1{color} There are [7] new bugs found below threshold in total that 
must be fixed.
.{color:green}+1{color} There are no new bugs found in [examples].
.{color:green}+1{color} There are no new bugs found in 
[fluent-job/fluent-job-api].
.{color:green}+1{color} There are no new bugs found in [sharelib/hive].
.{color:green}+1{color} There are no new bugs found in [sharelib/hive2].
.{color:green}+1{color} There are no new bugs found in [sharelib/git].
.{color:green}+1{color} There are no new bugs found in [sharelib/distcp].
.{color:green}+1{color} There are no new bugs found in [sharelib/hcatalog].
.{color:green}+1{color} There are no new bugs found in [sharelib/sqoop].
.{color:green}+1{color} There are no new bugs found in [sharelib/spark].
.{color:green}+1{color} There are no new bugs found in [sharelib/oozie].
.{color:green}+1{color} There are no new bugs found in [sharelib/pig].
.{color:green}+1{color} There are no new bugs found in [sharelib/streaming].
.{color:green}+1{color} There are no new bugs found in [server].
.{color:green}+1{color} There are no new bugs found in [docs].
.{color:green}+1{color} There are no new bugs found in [webapp].
.{color:red}-1{color} There are [7] new bugs found below threshold in 
[core] that must be fixed, listing only the first [5] ones.
.You can find the SpotBugs diff here (look for the red and orange ones): 
core/findbugs-new.html
.The top [5] most important SpotBugs errors are:
.At SshActionExecutor.java:[line 479]: This usage of 
java/lang/Runtime.exec([Ljava/lang/String;)Ljava/lang/Process; can be 
vulnerable to Command Injection
.At SshActionExecutor.java:[line 467]: At SshActionExecutor.java:[line 465]
.At SshActionExecutor.java:[line 475]: At SshActionExecutor.java:[line 474]
.At BulkJPAExecutor.java:[line 206]: This use of 
javax/persistence/EntityManager.createQuery(Ljava/lang/String;)Ljavax/persistence/Query;
 can be vulnerable to SQL/JPQL injection
.At BulkJPAExecutor.java:[line 176]: At BulkJPAExecutor.java:[line 175]
.{color:green}+1{color} There are no new bugs found in [tools].
.{color:green}+1{color} There are no new bugs found in [client].
{color:green}+1 BACKWARDS_COMPATIBILITY{color}
.{color:green}+1{color} the patch does not change any JPA 
Entity/Colum/Basic/Lob/Transient annotations
.{color:green}+1{color} the patch does not modify JPA files
{color:green}+1 TESTS{color}
.Tests run: 3190
{color:green}+1 DISTRO{color}
.{color:green}+1{color} distro tarball builds with the patch 
{color:green}+1 MODERNIZER{color}


{color:red}*-1 Overall result, please check the reported -1(s)*{color}


The full output of the test-patch run is available at

. https://builds.apache.org/job/PreCommit-OOZIE-Build/1236/



> SSH Action doesn't handle compound commands eg: cmd1 && cmd2 and stuck in 
> [PREP] stage
> --
>
> Key: OOZIE-1974
> URL: https://issues.apache.org/jira/browse/OOZIE-1974
> Project: Oozie
>  Issue Type: Bug
>  Components: action
>Affects Versions: trunk
>Reporter: Michalis Kongtongk
>Assignee: Mate Juhasz
>Priority: Major
> Attachments: OOZIE-1974.patch
>
>
> example WF that will fail:
> {code}
>  
>  
>  
>  
> oozie-u...@somedomain.com 
> kinit 
> oozie-u...@somedomain.com 
> -k 
> -t 
> /home/oozie-user/oozie.keytab 
>  
> hdfs 
> dfs 
> -put 
> /tmp/random-file.txt 
> 

[jira] [Commented] (OOZIE-1974) SSH Action doesn't handle compound commands eg: cmd1 && cmd2 and stuck in [PREP] stage

2019-10-10 Thread Hadoop QA (Jira)


[ 
https://issues.apache.org/jira/browse/OOZIE-1974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16948632#comment-16948632
 ] 

Hadoop QA commented on OOZIE-1974:
--

PreCommit-OOZIE-Build started


> SSH Action doesn't handle compound commands eg: cmd1 && cmd2 and stuck in 
> [PREP] stage
> --
>
> Key: OOZIE-1974
> URL: https://issues.apache.org/jira/browse/OOZIE-1974
> Project: Oozie
>  Issue Type: Bug
>  Components: action
>Affects Versions: trunk
>Reporter: Michalis Kongtongk
>Assignee: Mate Juhasz
>Priority: Major
> Attachments: OOZIE-1974.patch
>
>
> example WF that will fail:
> {code}
>  
>  
>  
>  
> oozie-u...@somedomain.com 
> kinit 
> oozie-u...@somedomain.com 
> -k 
> -t 
> /home/oozie-user/oozie.keytab 
>  
> hdfs 
> dfs 
> -put 
> /tmp/random-file.txt 
> /tmp/random-file.txt 
>  
>  
>  
>  
>  
> Action failed, error 
> message[${wf:errorMessage(wf:lastErrorNode())}] 
>  
>  
> 
> {code}
> Workaround is to execute the compound command in subshell eg: $(cmd1 && cmd2) 
> {code}
>  
>  
>  
>  
> oozie-u...@somedomain.com 
> $(kinit 
> oozie-u...@somedomain.com 
> -k 
> -t 
> /home/oozie-user/oozie.keytab 
>  
> hdfs 
> dfs 
> -put 
> /tmp/random-file.txt 
> /tmp/random-file.txt 
> ) 
>  
>  
>  
>  
>  
> Action failed, error 
> message[${wf:errorMessage(wf:lastErrorNode())}] 
>  
>  
> 
> {code}
> Stack trace "org.apache.oozie.command.CommandException: E0800: Action it is 
> not running its in [PREP] state,"
> {code}
> 2014-08-05 23:29:49,721 INFO org.apache.oozie.action.ssh.SshActionExecutor: 
> SERVER[192-168-88-213.lunix.lan] USER[mko] GROUP[-] TOKEN[] APP[Ssh-copy] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] start() begins 
> 2014-08-05 23:29:49,723 INFO org.apache.oozie.action.ssh.SshActionExecutor: 
> SERVER[192-168-88-213.lunix.lan] USER[mko] GROUP[-] TOKEN[] APP[Ssh-copy] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] Attempting to copy ssh base 
> scripts to remote host [m...@192-168-88-213.lunix.lan] 
> 2014-08-05 23:29:52,691 INFO org.apache.oozie.servlet.CallbackServlet: 
> SERVER[192-168-88-213.lunix.lan] USER[-] GROUP[-] TOKEN[-] APP[-] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] callback for action 
> [008-140805224842389-oozie-oozi-W@Ssh] 
> 2014-08-05 23:29:52,714 ERROR 
> org.apache.oozie.command.wf.CompletedActionXCommand: 
> SERVER[192-168-88-213.lunix.lan] USER[-] GROUP[-] TOKEN[] APP[-] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] XException, 
> org.apache.oozie.command.CommandException: E0800: Action it is not running 
> its in [PREP] state, action [008-140805224842389-oozie-oozi-W@Ssh] 
> at 
> org.apache.oozie.command.wf.CompletedActionXCommand.eagerVerifyPrecondition(CompletedActionXCommand.java:77)
>  
> at org.apache.oozie.command.XCommand.call(XCommand.java:251) 
> at 
> org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:174)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>  
> at java.lang.Thread.run(Thread.java:662) 
> 2014-08-05 23:29:52,714 WARN 
> org.apache.oozie.service.CallableQueueService$CallableWrapper: 
> SERVER[192-168-88-213.lunix.lan] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] 
> ACTION[-] exception callable [callback], E0800: Action it is not running its 
> in [PREP] state, action [008-140805224842389-oozie-oozi-W@Ssh] 
> org.apache.oozie.command.CommandException: E0800: Action it is not running 
> its in [PREP] state, action [008-140805224842389-oozie-oozi-W@Ssh] 
> at 
> org.apache.oozie.command.wf.CompletedActionXCommand.eagerVerifyPrecondition(CompletedActionXCommand.java:77)
>  
> at org.apache.oozie.command.XCommand.call(XCommand.java:251) 
> at 
> org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:174)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>  
> at java.lang.Thread.run(Thread.java:662) 
> 2014-08-05 23:29:57,262 INFO org.apache.oozie.action.ssh.SshActionExecutor: 
> SERVER[192-168-88-213.lunix.lan] USER[mko] GROUP[-] TOKEN[] APP[Ssh-copy] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] start() ends
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (OOZIE-1974) SSH Action doesn't handle compound commands eg: cmd1 && cmd2 and stuck in [PREP] stage

2019-10-10 Thread Mate Juhasz (Jira)


[ 
https://issues.apache.org/jira/browse/OOZIE-1974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16948605#comment-16948605
 ] 

Mate Juhasz commented on OOZIE-1974:


Uploaded a patch with initial ideas... not sure about how much business value 
is added by this "feature" though. Ssh unit tests are still not working, we 
should fix them before, so no new tests this time

> SSH Action doesn't handle compound commands eg: cmd1 && cmd2 and stuck in 
> [PREP] stage
> --
>
> Key: OOZIE-1974
> URL: https://issues.apache.org/jira/browse/OOZIE-1974
> Project: Oozie
>  Issue Type: Bug
>  Components: action
>Affects Versions: trunk
>Reporter: Michalis Kongtongk
>Assignee: Mate Juhasz
>Priority: Major
> Attachments: OOZIE-1974.patch
>
>
> example WF that will fail:
> {code}
>  
>  
>  
>  
> oozie-u...@somedomain.com 
> kinit 
> oozie-u...@somedomain.com 
> -k 
> -t 
> /home/oozie-user/oozie.keytab 
>  
> hdfs 
> dfs 
> -put 
> /tmp/random-file.txt 
> /tmp/random-file.txt 
>  
>  
>  
>  
>  
> Action failed, error 
> message[${wf:errorMessage(wf:lastErrorNode())}] 
>  
>  
> 
> {code}
> Workaround is to execute the compound command in subshell eg: $(cmd1 && cmd2) 
> {code}
>  
>  
>  
>  
> oozie-u...@somedomain.com 
> $(kinit 
> oozie-u...@somedomain.com 
> -k 
> -t 
> /home/oozie-user/oozie.keytab 
>  
> hdfs 
> dfs 
> -put 
> /tmp/random-file.txt 
> /tmp/random-file.txt 
> ) 
>  
>  
>  
>  
>  
> Action failed, error 
> message[${wf:errorMessage(wf:lastErrorNode())}] 
>  
>  
> 
> {code}
> Stack trace "org.apache.oozie.command.CommandException: E0800: Action it is 
> not running its in [PREP] state,"
> {code}
> 2014-08-05 23:29:49,721 INFO org.apache.oozie.action.ssh.SshActionExecutor: 
> SERVER[192-168-88-213.lunix.lan] USER[mko] GROUP[-] TOKEN[] APP[Ssh-copy] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] start() begins 
> 2014-08-05 23:29:49,723 INFO org.apache.oozie.action.ssh.SshActionExecutor: 
> SERVER[192-168-88-213.lunix.lan] USER[mko] GROUP[-] TOKEN[] APP[Ssh-copy] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] Attempting to copy ssh base 
> scripts to remote host [m...@192-168-88-213.lunix.lan] 
> 2014-08-05 23:29:52,691 INFO org.apache.oozie.servlet.CallbackServlet: 
> SERVER[192-168-88-213.lunix.lan] USER[-] GROUP[-] TOKEN[-] APP[-] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] callback for action 
> [008-140805224842389-oozie-oozi-W@Ssh] 
> 2014-08-05 23:29:52,714 ERROR 
> org.apache.oozie.command.wf.CompletedActionXCommand: 
> SERVER[192-168-88-213.lunix.lan] USER[-] GROUP[-] TOKEN[] APP[-] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] XException, 
> org.apache.oozie.command.CommandException: E0800: Action it is not running 
> its in [PREP] state, action [008-140805224842389-oozie-oozi-W@Ssh] 
> at 
> org.apache.oozie.command.wf.CompletedActionXCommand.eagerVerifyPrecondition(CompletedActionXCommand.java:77)
>  
> at org.apache.oozie.command.XCommand.call(XCommand.java:251) 
> at 
> org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:174)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>  
> at java.lang.Thread.run(Thread.java:662) 
> 2014-08-05 23:29:52,714 WARN 
> org.apache.oozie.service.CallableQueueService$CallableWrapper: 
> SERVER[192-168-88-213.lunix.lan] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] 
> ACTION[-] exception callable [callback], E0800: Action it is not running its 
> in [PREP] state, action [008-140805224842389-oozie-oozi-W@Ssh] 
> org.apache.oozie.command.CommandException: E0800: Action it is not running 
> its in [PREP] state, action [008-140805224842389-oozie-oozi-W@Ssh] 
> at 
> org.apache.oozie.command.wf.CompletedActionXCommand.eagerVerifyPrecondition(CompletedActionXCommand.java:77)
>  
> at org.apache.oozie.command.XCommand.call(XCommand.java:251) 
> at 
> org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:174)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>  
> at java.lang.Thread.run(Thread.java:662) 
> 2014-08-05 23:29:57,262 INFO org.apache.oozie.action.ssh.SshActionExecutor: 
> SERVER[192-168-88-213.lunix.lan] USER[mko] GROUP[-] TOKEN[] APP[Ssh-copy] 
> JOB[008-140805224842389-oozie-oozi-W] 
> 

[jira] [Commented] (OOZIE-1974) SSH Action doesn't handle compound commands eg: cmd1 && cmd2 and stuck in [PREP] stage

2019-09-26 Thread Mate Juhasz (Jira)


[ 
https://issues.apache.org/jira/browse/OOZIE-1974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16938413#comment-16938413
 ] 

Mate Juhasz commented on OOZIE-1974:


Not related, the ssh-wrapper.sh code is "designed" in a way that it does not 
support compound commands

> SSH Action doesn't handle compound commands eg: cmd1 && cmd2 and stuck in 
> [PREP] stage
> --
>
> Key: OOZIE-1974
> URL: https://issues.apache.org/jira/browse/OOZIE-1974
> Project: Oozie
>  Issue Type: Bug
>  Components: action
>Affects Versions: trunk
>Reporter: Michalis Kongtongk
>Assignee: Mate Juhasz
>Priority: Major
>
> example WF that will fail:
> {code}
>  
>  
>  
>  
> oozie-u...@somedomain.com 
> kinit 
> oozie-u...@somedomain.com 
> -k 
> -t 
> /home/oozie-user/oozie.keytab 
>  
> hdfs 
> dfs 
> -put 
> /tmp/random-file.txt 
> /tmp/random-file.txt 
>  
>  
>  
>  
>  
> Action failed, error 
> message[${wf:errorMessage(wf:lastErrorNode())}] 
>  
>  
> 
> {code}
> Workaround is to execute the compound command in subshell eg: $(cmd1 && cmd2) 
> {code}
>  
>  
>  
>  
> oozie-u...@somedomain.com 
> $(kinit 
> oozie-u...@somedomain.com 
> -k 
> -t 
> /home/oozie-user/oozie.keytab 
>  
> hdfs 
> dfs 
> -put 
> /tmp/random-file.txt 
> /tmp/random-file.txt 
> ) 
>  
>  
>  
>  
>  
> Action failed, error 
> message[${wf:errorMessage(wf:lastErrorNode())}] 
>  
>  
> 
> {code}
> Stack trace "org.apache.oozie.command.CommandException: E0800: Action it is 
> not running its in [PREP] state,"
> {code}
> 2014-08-05 23:29:49,721 INFO org.apache.oozie.action.ssh.SshActionExecutor: 
> SERVER[192-168-88-213.lunix.lan] USER[mko] GROUP[-] TOKEN[] APP[Ssh-copy] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] start() begins 
> 2014-08-05 23:29:49,723 INFO org.apache.oozie.action.ssh.SshActionExecutor: 
> SERVER[192-168-88-213.lunix.lan] USER[mko] GROUP[-] TOKEN[] APP[Ssh-copy] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] Attempting to copy ssh base 
> scripts to remote host [m...@192-168-88-213.lunix.lan] 
> 2014-08-05 23:29:52,691 INFO org.apache.oozie.servlet.CallbackServlet: 
> SERVER[192-168-88-213.lunix.lan] USER[-] GROUP[-] TOKEN[-] APP[-] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] callback for action 
> [008-140805224842389-oozie-oozi-W@Ssh] 
> 2014-08-05 23:29:52,714 ERROR 
> org.apache.oozie.command.wf.CompletedActionXCommand: 
> SERVER[192-168-88-213.lunix.lan] USER[-] GROUP[-] TOKEN[] APP[-] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] XException, 
> org.apache.oozie.command.CommandException: E0800: Action it is not running 
> its in [PREP] state, action [008-140805224842389-oozie-oozi-W@Ssh] 
> at 
> org.apache.oozie.command.wf.CompletedActionXCommand.eagerVerifyPrecondition(CompletedActionXCommand.java:77)
>  
> at org.apache.oozie.command.XCommand.call(XCommand.java:251) 
> at 
> org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:174)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>  
> at java.lang.Thread.run(Thread.java:662) 
> 2014-08-05 23:29:52,714 WARN 
> org.apache.oozie.service.CallableQueueService$CallableWrapper: 
> SERVER[192-168-88-213.lunix.lan] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] 
> ACTION[-] exception callable [callback], E0800: Action it is not running its 
> in [PREP] state, action [008-140805224842389-oozie-oozi-W@Ssh] 
> org.apache.oozie.command.CommandException: E0800: Action it is not running 
> its in [PREP] state, action [008-140805224842389-oozie-oozi-W@Ssh] 
> at 
> org.apache.oozie.command.wf.CompletedActionXCommand.eagerVerifyPrecondition(CompletedActionXCommand.java:77)
>  
> at org.apache.oozie.command.XCommand.call(XCommand.java:251) 
> at 
> org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:174)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>  
> at java.lang.Thread.run(Thread.java:662) 
> 2014-08-05 23:29:57,262 INFO org.apache.oozie.action.ssh.SshActionExecutor: 
> SERVER[192-168-88-213.lunix.lan] USER[mko] GROUP[-] TOKEN[] APP[Ssh-copy] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] start() ends
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (OOZIE-1974) SSH Action doesn't handle compound commands eg: cmd1 && cmd2 and stuck in [PREP] stage

2019-09-25 Thread michalis kongtongk (Jira)


[ 
https://issues.apache.org/jira/browse/OOZIE-1974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16937897#comment-16937897
 ] 

michalis kongtongk commented on OOZIE-1974:
---

[~dionusos] it's possible that is related to OOZIE-2126. I can't confirm, as 
this is really old bug report.

> SSH Action doesn't handle compound commands eg: cmd1 && cmd2 and stuck in 
> [PREP] stage
> --
>
> Key: OOZIE-1974
> URL: https://issues.apache.org/jira/browse/OOZIE-1974
> Project: Oozie
>  Issue Type: Bug
>  Components: action
>Affects Versions: trunk
>Reporter: Michalis Kongtongk
>Assignee: Mate Juhasz
>Priority: Major
>
> example WF that will fail:
> {code}
>  
>  
>  
>  
> oozie-u...@somedomain.com 
> kinit 
> oozie-u...@somedomain.com 
> -k 
> -t 
> /home/oozie-user/oozie.keytab 
>  
> hdfs 
> dfs 
> -put 
> /tmp/random-file.txt 
> /tmp/random-file.txt 
>  
>  
>  
>  
>  
> Action failed, error 
> message[${wf:errorMessage(wf:lastErrorNode())}] 
>  
>  
> 
> {code}
> Workaround is to execute the compound command in subshell eg: $(cmd1 && cmd2) 
> {code}
>  
>  
>  
>  
> oozie-u...@somedomain.com 
> $(kinit 
> oozie-u...@somedomain.com 
> -k 
> -t 
> /home/oozie-user/oozie.keytab 
>  
> hdfs 
> dfs 
> -put 
> /tmp/random-file.txt 
> /tmp/random-file.txt 
> ) 
>  
>  
>  
>  
>  
> Action failed, error 
> message[${wf:errorMessage(wf:lastErrorNode())}] 
>  
>  
> 
> {code}
> Stack trace "org.apache.oozie.command.CommandException: E0800: Action it is 
> not running its in [PREP] state,"
> {code}
> 2014-08-05 23:29:49,721 INFO org.apache.oozie.action.ssh.SshActionExecutor: 
> SERVER[192-168-88-213.lunix.lan] USER[mko] GROUP[-] TOKEN[] APP[Ssh-copy] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] start() begins 
> 2014-08-05 23:29:49,723 INFO org.apache.oozie.action.ssh.SshActionExecutor: 
> SERVER[192-168-88-213.lunix.lan] USER[mko] GROUP[-] TOKEN[] APP[Ssh-copy] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] Attempting to copy ssh base 
> scripts to remote host [m...@192-168-88-213.lunix.lan] 
> 2014-08-05 23:29:52,691 INFO org.apache.oozie.servlet.CallbackServlet: 
> SERVER[192-168-88-213.lunix.lan] USER[-] GROUP[-] TOKEN[-] APP[-] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] callback for action 
> [008-140805224842389-oozie-oozi-W@Ssh] 
> 2014-08-05 23:29:52,714 ERROR 
> org.apache.oozie.command.wf.CompletedActionXCommand: 
> SERVER[192-168-88-213.lunix.lan] USER[-] GROUP[-] TOKEN[] APP[-] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] XException, 
> org.apache.oozie.command.CommandException: E0800: Action it is not running 
> its in [PREP] state, action [008-140805224842389-oozie-oozi-W@Ssh] 
> at 
> org.apache.oozie.command.wf.CompletedActionXCommand.eagerVerifyPrecondition(CompletedActionXCommand.java:77)
>  
> at org.apache.oozie.command.XCommand.call(XCommand.java:251) 
> at 
> org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:174)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>  
> at java.lang.Thread.run(Thread.java:662) 
> 2014-08-05 23:29:52,714 WARN 
> org.apache.oozie.service.CallableQueueService$CallableWrapper: 
> SERVER[192-168-88-213.lunix.lan] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] 
> ACTION[-] exception callable [callback], E0800: Action it is not running its 
> in [PREP] state, action [008-140805224842389-oozie-oozi-W@Ssh] 
> org.apache.oozie.command.CommandException: E0800: Action it is not running 
> its in [PREP] state, action [008-140805224842389-oozie-oozi-W@Ssh] 
> at 
> org.apache.oozie.command.wf.CompletedActionXCommand.eagerVerifyPrecondition(CompletedActionXCommand.java:77)
>  
> at org.apache.oozie.command.XCommand.call(XCommand.java:251) 
> at 
> org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:174)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>  
> at java.lang.Thread.run(Thread.java:662) 
> 2014-08-05 23:29:57,262 INFO org.apache.oozie.action.ssh.SshActionExecutor: 
> SERVER[192-168-88-213.lunix.lan] USER[mko] GROUP[-] TOKEN[] APP[Ssh-copy] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] start() ends
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (OOZIE-1974) SSH Action doesn't handle compound commands eg: cmd1 && cmd2 and stuck in [PREP] stage

2019-03-08 Thread Denes Bodo (JIRA)


[ 
https://issues.apache.org/jira/browse/OOZIE-1974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16787848#comment-16787848
 ] 

Denes Bodo commented on OOZIE-1974:
---

[~michalisk] Do you think OOZIE-2126 can be related to your issue? Thanks

> SSH Action doesn't handle compound commands eg: cmd1 && cmd2 and stuck in 
> [PREP] stage
> --
>
> Key: OOZIE-1974
> URL: https://issues.apache.org/jira/browse/OOZIE-1974
> Project: Oozie
>  Issue Type: Bug
>  Components: action
>Affects Versions: trunk
>Reporter: Michalis Kongtongk
>Priority: Major
>
> example WF that will fail:
> {code}
>  
>  
>  
>  
> oozie-u...@somedomain.com 
> kinit 
> oozie-u...@somedomain.com 
> -k 
> -t 
> /home/oozie-user/oozie.keytab 
>  
> hdfs 
> dfs 
> -put 
> /tmp/random-file.txt 
> /tmp/random-file.txt 
>  
>  
>  
>  
>  
> Action failed, error 
> message[${wf:errorMessage(wf:lastErrorNode())}] 
>  
>  
> 
> {code}
> Workaround is to execute the compound command in subshell eg: $(cmd1 && cmd2) 
> {code}
>  
>  
>  
>  
> oozie-u...@somedomain.com 
> $(kinit 
> oozie-u...@somedomain.com 
> -k 
> -t 
> /home/oozie-user/oozie.keytab 
>  
> hdfs 
> dfs 
> -put 
> /tmp/random-file.txt 
> /tmp/random-file.txt 
> ) 
>  
>  
>  
>  
>  
> Action failed, error 
> message[${wf:errorMessage(wf:lastErrorNode())}] 
>  
>  
> 
> {code}
> Stack trace "org.apache.oozie.command.CommandException: E0800: Action it is 
> not running its in [PREP] state,"
> {code}
> 2014-08-05 23:29:49,721 INFO org.apache.oozie.action.ssh.SshActionExecutor: 
> SERVER[192-168-88-213.lunix.lan] USER[mko] GROUP[-] TOKEN[] APP[Ssh-copy] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] start() begins 
> 2014-08-05 23:29:49,723 INFO org.apache.oozie.action.ssh.SshActionExecutor: 
> SERVER[192-168-88-213.lunix.lan] USER[mko] GROUP[-] TOKEN[] APP[Ssh-copy] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] Attempting to copy ssh base 
> scripts to remote host [m...@192-168-88-213.lunix.lan] 
> 2014-08-05 23:29:52,691 INFO org.apache.oozie.servlet.CallbackServlet: 
> SERVER[192-168-88-213.lunix.lan] USER[-] GROUP[-] TOKEN[-] APP[-] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] callback for action 
> [008-140805224842389-oozie-oozi-W@Ssh] 
> 2014-08-05 23:29:52,714 ERROR 
> org.apache.oozie.command.wf.CompletedActionXCommand: 
> SERVER[192-168-88-213.lunix.lan] USER[-] GROUP[-] TOKEN[] APP[-] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] XException, 
> org.apache.oozie.command.CommandException: E0800: Action it is not running 
> its in [PREP] state, action [008-140805224842389-oozie-oozi-W@Ssh] 
> at 
> org.apache.oozie.command.wf.CompletedActionXCommand.eagerVerifyPrecondition(CompletedActionXCommand.java:77)
>  
> at org.apache.oozie.command.XCommand.call(XCommand.java:251) 
> at 
> org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:174)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>  
> at java.lang.Thread.run(Thread.java:662) 
> 2014-08-05 23:29:52,714 WARN 
> org.apache.oozie.service.CallableQueueService$CallableWrapper: 
> SERVER[192-168-88-213.lunix.lan] USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] 
> ACTION[-] exception callable [callback], E0800: Action it is not running its 
> in [PREP] state, action [008-140805224842389-oozie-oozi-W@Ssh] 
> org.apache.oozie.command.CommandException: E0800: Action it is not running 
> its in [PREP] state, action [008-140805224842389-oozie-oozi-W@Ssh] 
> at 
> org.apache.oozie.command.wf.CompletedActionXCommand.eagerVerifyPrecondition(CompletedActionXCommand.java:77)
>  
> at org.apache.oozie.command.XCommand.call(XCommand.java:251) 
> at 
> org.apache.oozie.service.CallableQueueService$CallableWrapper.run(CallableQueueService.java:174)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>  
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>  
> at java.lang.Thread.run(Thread.java:662) 
> 2014-08-05 23:29:57,262 INFO org.apache.oozie.action.ssh.SshActionExecutor: 
> SERVER[192-168-88-213.lunix.lan] USER[mko] GROUP[-] TOKEN[] APP[Ssh-copy] 
> JOB[008-140805224842389-oozie-oozi-W] 
> ACTION[008-140805224842389-oozie-oozi-W@Ssh] start() ends
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)