You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "wy (Jira)" <ji...@apache.org> on 2022/10/13 06:41:00 UTC

[jira] [Created] (YARN-11346) Hardcoded absolute path for bash and mv command

wy created YARN-11346:
-------------------------

             Summary: Hardcoded absolute path for bash and mv command
                 Key: YARN-11346
                 URL: https://issues.apache.org/jira/browse/YARN-11346
             Project: Hadoop YARN
          Issue Type: Bug
          Components: nodemanager
    Affects Versions: 3.3.4
         Environment: Used Hadoop 3.3.4 downloaded from official site. Configs are in the attachment.

OS: NixOS-WSL ([https://github.com/nix-community/NixOS-WSL])
JDK version: 8
            Reporter: wy
         Attachments: hadoop-conf.zip, image-2022-10-13-14-21-52-653.png

Not all operating systems have bash and mv in /bin folder. Seems that in HADOOP-13457 it is already aware but currently the issue still exists in [hadoop-yarn|https://github.com/apache/hadoop/blob/branch-3.3.4/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java].
!image-2022-10-13-14-21-52-653.png!

For example, in NixOS, bash and mv is in /nix/store/..., linked to /run/current-system/sw/bin. In this case, when running:
{quote}./bin/hadoop jar ./share/hadoop/mapreduce/hadoop-mapreduce-examples-3.3.4.jar grep input output 'dfs[a-z.]+'
{quote}
It will fail when running default_container_executor.sh with the following message:
{quote}Exception message: .../nm-local-dir/usercache/weko/appcache/application_1665637385308_0007/container_1665637385308_0007_02_000001/ .sh: line 2: /bin/bash: No such file or directory
.../nm-local-dir/usercache/weko/appcache/application_1665637385308_0007/container_1665637385308_0007_02_000001/default_container_executor.sh: line 5: /bin/mv: No such file or directory
{quote}
because the script cannot find /bin/bash and /bin/mv.

For your information, "{{{}/usr/bin/env bash{}}}", which is more generic, can be used to replace "{{{}/bin/bash{}}}". It also works for "{{{}/bin/mv{}}}".



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org