runing shell command inside java action on Oozie throws Permission deniedHadoop Streaming in .NETError while executing Java code in RFTwhat this exception means in oracle jaxd-ws soap web serviceHive Metastore Sql server :thrift.transport.TTransportException: No keytab specifiedHow to implement curl(POST the json file) using javaError in sqoop action in oozie while fetching data from teradata to hiveI have been trying to run selenium basic test in itelliJ and I am getting the following errorNoclassDefFoundError with MavenGSON: java.lang.ClassCastException: com.google.gson.internal.LinkedTreeMap cannot be cast to My Generic ClassOozie Spark access to hive with kerberos

Can you use Vicious Mockery to win an argument or gain favours?

How can ping know if my host is down

How could a planet have erratic days?

Can I say "fingers" when referring to toes?

What is the English pronunciation of "pain au chocolat"?

Has any country ever had 2 former presidents in jail simultaneously?

Delete multiple columns using awk or sed

Does Doodling or Improvising on the Piano Have Any Benefits?

"It doesn't matter" or "it won't matter"?

Review your own paper in Mathematics

Does the Linux kernel need a file system to run?

US tourist/student visa

It grows, but water kills it

Pre-mixing cryogenic fuels and using only one fuel tank

Creating two special characters

Why do ¬, ∀ and ∃ have the same precedence?

How to get directions in deep space?

What's the name of the logical fallacy where a debater extends a statement far beyond the original statement to make it true?

How do I tell my boss that I'm quitting soon, especially given that a colleague just left this week

Are Captain Marvel's powers affected by Thanos breaking the Tesseract and claiming the stone?

Why does AES have exactly 10 rounds for a 128-bit key, 12 for 192 bits and 14 for a 256-bit key size?

Does "he squandered his car on drink" sound natural?

Can I cause damage to electrical appliances by unplugging them when they are turned on?

When were female captains banned from Starfleet?



runing shell command inside java action on Oozie throws Permission denied


Hadoop Streaming in .NETError while executing Java code in RFTwhat this exception means in oracle jaxd-ws soap web serviceHive Metastore Sql server :thrift.transport.TTransportException: No keytab specifiedHow to implement curl(POST the json file) using javaError in sqoop action in oozie while fetching data from teradata to hiveI have been trying to run selenium basic test in itelliJ and I am getting the following errorNoclassDefFoundError with MavenGSON: java.lang.ClassCastException: com.google.gson.internal.LinkedTreeMap cannot be cast to My Generic ClassOozie Spark access to hive with kerberos













0















I have this java code



public static void main(String... args) throws IOException, InterruptedException 
execute("echo "Amer"");


private static void execute(String command) throws IOException, InterruptedException
ProcessBuilder builder = new ProcessBuilder();
builder.command(command);
//builder.directory(new File(System.getProperty("user.home")));
Process process = builder.start();

StreamGobbler streamGobbler =
new StreamGobbler(process.getInputStream(), System.out::println);
Executors.newSingleThreadExecutor().submit(streamGobbler);
int exitCode = process.waitFor();
assert exitCode == 0;



and I am trying to run it on a Oozie workflow via java action
but when i submit the workflow, it's killed with the following exception (java.io.IOException: error=13, Permission denied)




org.apache.oozie.action.hadoop.JavaMainException: java.io.IOException:
Cannot run program "echo "Amer"": error=13, Permission denied at
org.apache.oozie.action.hadoop.JavaMain.run(JavaMain.java:60) at
org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:78)
at org.apache.oozie.action.hadoop.JavaMain.main(JavaMain.java:35) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:231)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54) at
org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:465) at
org.apache.hadoop.mapred.MapTask.run(MapTask.java:349) at
org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:174) at
java.security.AccessController.doPrivileged(Native Method) at
javax.security.auth.Subject.doAs(Subject.java:422) at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1688)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:168) Caused
by: java.io.IOException: Cannot run program "echo "Amer"": error=13,
Permission denied at
java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at
ShellCommandExecutor.execute(ShellCommandExecutor.java:18) at
ShellCommandExecutor.main(ShellCommandExecutor.java:11) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
org.apache.oozie.action.hadoop.JavaMain.run(JavaMain.java:57) ... 15
more Caused by: java.io.IOException: error=13, Permission denied at
java.lang.UNIXProcess.forkAndExec(Native Method) at
java.lang.UNIXProcess.(UNIXProcess.java:247) at
java.lang.ProcessImpl.start(ProcessImpl.java:134) at
java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 22 more




any hint ?










share|improve this question



















  • 1





    builder.command("sh", "-c", command); if you want to run a shell command instead of a program with an argument array

    – that other guy
    Mar 7 at 23:56












  • thank you so much , it works !!

    – Amer Abu Hassan
    Mar 8 at 0:00















0















I have this java code



public static void main(String... args) throws IOException, InterruptedException 
execute("echo "Amer"");


private static void execute(String command) throws IOException, InterruptedException
ProcessBuilder builder = new ProcessBuilder();
builder.command(command);
//builder.directory(new File(System.getProperty("user.home")));
Process process = builder.start();

StreamGobbler streamGobbler =
new StreamGobbler(process.getInputStream(), System.out::println);
Executors.newSingleThreadExecutor().submit(streamGobbler);
int exitCode = process.waitFor();
assert exitCode == 0;



and I am trying to run it on a Oozie workflow via java action
but when i submit the workflow, it's killed with the following exception (java.io.IOException: error=13, Permission denied)




org.apache.oozie.action.hadoop.JavaMainException: java.io.IOException:
Cannot run program "echo "Amer"": error=13, Permission denied at
org.apache.oozie.action.hadoop.JavaMain.run(JavaMain.java:60) at
org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:78)
at org.apache.oozie.action.hadoop.JavaMain.main(JavaMain.java:35) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:231)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54) at
org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:465) at
org.apache.hadoop.mapred.MapTask.run(MapTask.java:349) at
org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:174) at
java.security.AccessController.doPrivileged(Native Method) at
javax.security.auth.Subject.doAs(Subject.java:422) at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1688)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:168) Caused
by: java.io.IOException: Cannot run program "echo "Amer"": error=13,
Permission denied at
java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at
ShellCommandExecutor.execute(ShellCommandExecutor.java:18) at
ShellCommandExecutor.main(ShellCommandExecutor.java:11) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
org.apache.oozie.action.hadoop.JavaMain.run(JavaMain.java:57) ... 15
more Caused by: java.io.IOException: error=13, Permission denied at
java.lang.UNIXProcess.forkAndExec(Native Method) at
java.lang.UNIXProcess.(UNIXProcess.java:247) at
java.lang.ProcessImpl.start(ProcessImpl.java:134) at
java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 22 more




any hint ?










share|improve this question



















  • 1





    builder.command("sh", "-c", command); if you want to run a shell command instead of a program with an argument array

    – that other guy
    Mar 7 at 23:56












  • thank you so much , it works !!

    – Amer Abu Hassan
    Mar 8 at 0:00













0












0








0








I have this java code



public static void main(String... args) throws IOException, InterruptedException 
execute("echo "Amer"");


private static void execute(String command) throws IOException, InterruptedException
ProcessBuilder builder = new ProcessBuilder();
builder.command(command);
//builder.directory(new File(System.getProperty("user.home")));
Process process = builder.start();

StreamGobbler streamGobbler =
new StreamGobbler(process.getInputStream(), System.out::println);
Executors.newSingleThreadExecutor().submit(streamGobbler);
int exitCode = process.waitFor();
assert exitCode == 0;



and I am trying to run it on a Oozie workflow via java action
but when i submit the workflow, it's killed with the following exception (java.io.IOException: error=13, Permission denied)




org.apache.oozie.action.hadoop.JavaMainException: java.io.IOException:
Cannot run program "echo "Amer"": error=13, Permission denied at
org.apache.oozie.action.hadoop.JavaMain.run(JavaMain.java:60) at
org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:78)
at org.apache.oozie.action.hadoop.JavaMain.main(JavaMain.java:35) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:231)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54) at
org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:465) at
org.apache.hadoop.mapred.MapTask.run(MapTask.java:349) at
org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:174) at
java.security.AccessController.doPrivileged(Native Method) at
javax.security.auth.Subject.doAs(Subject.java:422) at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1688)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:168) Caused
by: java.io.IOException: Cannot run program "echo "Amer"": error=13,
Permission denied at
java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at
ShellCommandExecutor.execute(ShellCommandExecutor.java:18) at
ShellCommandExecutor.main(ShellCommandExecutor.java:11) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
org.apache.oozie.action.hadoop.JavaMain.run(JavaMain.java:57) ... 15
more Caused by: java.io.IOException: error=13, Permission denied at
java.lang.UNIXProcess.forkAndExec(Native Method) at
java.lang.UNIXProcess.(UNIXProcess.java:247) at
java.lang.ProcessImpl.start(ProcessImpl.java:134) at
java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 22 more




any hint ?










share|improve this question
















I have this java code



public static void main(String... args) throws IOException, InterruptedException 
execute("echo "Amer"");


private static void execute(String command) throws IOException, InterruptedException
ProcessBuilder builder = new ProcessBuilder();
builder.command(command);
//builder.directory(new File(System.getProperty("user.home")));
Process process = builder.start();

StreamGobbler streamGobbler =
new StreamGobbler(process.getInputStream(), System.out::println);
Executors.newSingleThreadExecutor().submit(streamGobbler);
int exitCode = process.waitFor();
assert exitCode == 0;



and I am trying to run it on a Oozie workflow via java action
but when i submit the workflow, it's killed with the following exception (java.io.IOException: error=13, Permission denied)




org.apache.oozie.action.hadoop.JavaMainException: java.io.IOException:
Cannot run program "echo "Amer"": error=13, Permission denied at
org.apache.oozie.action.hadoop.JavaMain.run(JavaMain.java:60) at
org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:78)
at org.apache.oozie.action.hadoop.JavaMain.main(JavaMain.java:35) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:231)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54) at
org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:465) at
org.apache.hadoop.mapred.MapTask.run(MapTask.java:349) at
org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:174) at
java.security.AccessController.doPrivileged(Native Method) at
javax.security.auth.Subject.doAs(Subject.java:422) at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1688)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:168) Caused
by: java.io.IOException: Cannot run program "echo "Amer"": error=13,
Permission denied at
java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at
ShellCommandExecutor.execute(ShellCommandExecutor.java:18) at
ShellCommandExecutor.main(ShellCommandExecutor.java:11) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
org.apache.oozie.action.hadoop.JavaMain.run(JavaMain.java:57) ... 15
more Caused by: java.io.IOException: error=13, Permission denied at
java.lang.UNIXProcess.forkAndExec(Native Method) at
java.lang.UNIXProcess.(UNIXProcess.java:247) at
java.lang.ProcessImpl.start(ProcessImpl.java:134) at
java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 22 more




any hint ?







java shell hadoop bigdata oozie






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 8 at 9:09









danielsepulvedab

4961716




4961716










asked Mar 7 at 23:55









Amer Abu HassanAmer Abu Hassan

1




1







  • 1





    builder.command("sh", "-c", command); if you want to run a shell command instead of a program with an argument array

    – that other guy
    Mar 7 at 23:56












  • thank you so much , it works !!

    – Amer Abu Hassan
    Mar 8 at 0:00












  • 1





    builder.command("sh", "-c", command); if you want to run a shell command instead of a program with an argument array

    – that other guy
    Mar 7 at 23:56












  • thank you so much , it works !!

    – Amer Abu Hassan
    Mar 8 at 0:00







1




1





builder.command("sh", "-c", command); if you want to run a shell command instead of a program with an argument array

– that other guy
Mar 7 at 23:56






builder.command("sh", "-c", command); if you want to run a shell command instead of a program with an argument array

– that other guy
Mar 7 at 23:56














thank you so much , it works !!

– Amer Abu Hassan
Mar 8 at 0:00





thank you so much , it works !!

– Amer Abu Hassan
Mar 8 at 0:00












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55054700%2fruning-shell-command-inside-java-action-on-oozie-throws-permission-denied%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55054700%2fruning-shell-command-inside-java-action-on-oozie-throws-permission-denied%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

Understanding generators in Python2019 Community Moderator ElectionGenerator function not working pythonFor loop not executing two timesGenerators - Printing generated valuesWhy can a python generator only be used once?What exactly do generators do?What does the “yield” keyword do?What does “list comprehension” mean? How does it work and how can I use it?sklearn Kfold acces single fold instead of for loopIs a generator the callable? Which is the generator?Apply Border To Range Of Cells Using OpenpyxlCalling an external command in PythonWhat are metaclasses in Python?What is the difference between @staticmethod and @classmethod?Finding the index of an item given a list containing it in PythonDifference between append vs. extend list methods in PythonHow can I safely create a nested directory in Python?Does Python have a ternary conditional operator?Understanding slice notationUnderstanding Python super() with __init__() methodsDoes Python have a string 'contains' substring method?

How can I change the color of pagination dots of UIPageControl?How to change UIPageControl dotsIs there a way to change page indicator dots colorCustomize dot with image of UIPageControl at index 0 of UIPageControlNo visible @interface for 'NSObject<PageControlDelegate>' declares the selector 'pageControlPageDidChange:'How to change the color of pagination dots in UIPageControl with a different color per pagepagecontrol indicator custom image instead of DefaultChanging the colour of UIPageControl dots in MonoTouchpagecontrol selectable page visibility color?Alternative way to load ViewControllers on a UIPageControlHow to set only layer.border-color for UIpage control dots in swiftHow can I develop for iPhone using a Windows development machine?How to change the name of an iOS app?UITableView - change section header coloruipagecontrol indicator(dot)issueCustom UIPageControl dots color not changingchange the interspace between UIPageControl dotsHow to change Status Bar text color in iOSHow can I change image tintColor in iOS and WatchKitUIPageControl dots with larger space in between each dotsHow to change the color of pagination dots in UIPageControl with a different color per page