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
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
add a comment |
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
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
add a comment |
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
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
java shell hadoop bigdata oozie
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
add a comment |
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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