Table of Contents
Question content
Solution
Home Java start-all.sh, start-dfs.sh commands not found

start-all.sh, start-dfs.sh commands not found

Feb 09, 2024 pm 01:24 PM

php editor Apple may encounter a common problem when using Hadoop: "start-all.sh, start-dfs.sh commands not found". This problem usually occurs when starting a Hadoop cluster and may be caused by incorrect path configuration or non-existent script file. To solve this problem, we need to check the Hadoop installation path and environment variable configuration to ensure they are set correctly, and ensure that the relevant script files exist in the corresponding paths. The following will introduce in detail how to solve this problem, let's take a look together!

Question content

I am using ubuntu 16.04 lts and installed hadoop 2.7.2.

Output
  hadoop version
Copy after login

yes

  hadoop 2.7.2
  subversion https://git-wip-us.apache.org/repos/asf/hadoop.git -r b165c4fe8a74265c792ce23f546c64604acf0e41
  compiled by jenkins on 2016-01-26t00:08z
  compiled with protoc 2.5.0
  from source with checksum d0fda26633fa762bff87ec759ebe689c
  this command was run using /usr/local/hadoop-2.7.2/share/hadoop/common/hadoop-common-2.7.2.jar
Copy after login

When I run

  whereis hadoop
Copy after login

The output it gives is

  hadoop: /usr/local/hadoop /usr/local/hadoop-2.7.2/bin/hadoop.cmd /usr/local/hadoop-2.7.2/bin/hadoop
Copy after login

But when I run the command

  start-all.sh
Copy after login

It says the command cannot be found. Same thing when I run

  start-dfs.sh
Copy after login

The output it gives is command not found.

I am able to run these commands when I navigate to the hadoop directory, but I want to run these commands without navigating to the hadoop directory.

Solution

Your problem is that bash doesn’t know where to look for ./start-all.sh.

You can resolve this issue by opening $home/.bashrc and adding the lines shown below:

path=$path:/usr/local/hadoop/sbin
Copy after login

This tells bash that it should look start-all.sh in "/usr/local/hadoop/sbin".

Notice:

Changes to $home/.bashrc will not take effect in any currently open terminal.

If you need the changes to take effect in the currently open terminal, run

source $home/.bashrc
Copy after login

I have to use find to search for it.

find / -iname start-all.sh 2>  /dev/null
Copy after login

Discover:

/usr/local/sbin/start-all.sh
/usr/local/cellar/hadoop/3.3.4/libexec/sbin/start-all.sh
/usr/local/cellar/hadoop/3.3.4/sbin/start-all.sh
Copy after login

So in addition to the previous answers, the variables in $home/.bashrc look like this:

PATH=$PATH:/usr/local/sbin/
Copy after login

Note: I'm not sure which one should be set to path

The above is the detailed content of start-all.sh, start-dfs.sh commands not found. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)