Friday, March 24, 2017

Solving jps: command not found error message

jps is a command line utility that comes with jdk which allows you to view all the Java processes running on a host. It is extremely useful when your environment has multiple background java processes running, like it happens in a Hadoop cluster. If you happen to create a hadoop cluster by yourself as mentioned in my previous blogs, 'jps' command is very useful to diagnostic utility to make sure the NameNodes, DataNodes, ProcessManager and ResourceManager processes are running.

Sometimes if you try to use 'jps' and get the error message "jps: command not found error message" here is how you solve it


Step 1) Make sure you have installed a JDK, not a jre. In order to do that, you have to find out the directory where the jre is present. Mostly you can find it from the JAVA_HOME environment variable. A general rule of thumb is if the Java installation directory only has a 'jre' folder , then you might not have JDK installed.

Below is the output if you just have jre installed
$ cd $JAVA_HOME
$ cd ..
$ ls
jre  LICENSE  THIRD_PARTY_README

On a linux you can install JDK by appending '-devel' to the installation package
$ sudo yum install java-1.7.0-openjdk-devel

Run 'ls' command again, you should see the below output
$ cd $JAVA_HOME
$ cd ..
$ ls
bin  include  jre  lib  LICENSE  tapset  THIRD_PARTY_README


Step 2) Make sure the JDK_INSTALL_PATH/bin is in the classpath

Now if you try the 'jps' command, you should see the java processes running. On a Hadoop name node, you should see the below output

$jps
JPS
NameNode
TaskTracker
JobTracker

6 comments:

  1. Thanks a lot very much for the high quality and results-oriented help. I won’t think twice to endorse your blog post to anybody who wants and needs support

    about this area.
    hadoop training in

    bangalore

    ReplyDelete
  2. Thanks for one marvelous posting! I enjoyed reading it; you are a great
    author. I will make sure to bookmark your blog and may come back
    someday. I want to encourage that you continue your great posts, have
    a nice weekend!


    java training in chennai


    java training in bangalore

    ReplyDelete
  3. Ciitnoida provides Core and java training institute in

    noida
    . We have a team of experienced Java professionals who help our students learn Java with the help of Live Base Projects. The object-

    oriented, java training in noida , class-based build

    of Java has made it one of most popular programming languages and the demand of professionals with certification in Advance Java training is at an

    all-time high not just in India but foreign countries too.

    By helping our students understand the fundamentals and Advance concepts of Java, we prepare them for a successful programming career. With over 13

    years of sound experience, we have successfully trained hundreds of students in Noida and have been able to turn ourselves into an institute for best

    Java training in Noida.

    java training institute in noida
    java training in noida

    ReplyDelete
  4. Best Summer Internship In Noida

    These technologies prepare individuals for fields like software programming, technical support, graphic design, software testing, business analytics. Embedded Systems, Industrial Automation Training and more. Candidates go through a series of comprehensive practical sessions where they work on live problems and implement solutions on real-time basis.
    It has a dedicated placement cell which provides 100% placement assistance to students. The benefits that a student gets out of summer training are innumerable. CIITN,Best Summer training Center for B.Tech/CS/CSE/IT/ BCA/MCA/ B.E /M.tech / B.sc/ M.sc/ Engineering Student has already accomplished itself successfully in the field of Training and Development after setting milestones and bringing smiles to the faces of more than 1 Lakh students. CIITN was incorporated in the year 2002 and over the years CIITN has grown remarkably into the greatest training giant of Northern India.
    There is no looking back to technology! Those passionate for it need not worry about the professional prospects it offers. Courses and trainings in the field of Computer Science and Applications open a wide array of choices for individuals. All you need to do it prepare yourself right!

    Summer Internship Course In Noida

    Summer Internship Training In Noida

    ReplyDelete
  5. Thanks a lot very much for the high quality and results-oriented help. I won’t think twice to endorse your blog post to anybody who wants and needs support
    Sap Hybris Training From India

    Sailpoint Training From India

    Dellboomi Training From India

    ReplyDelete

Blog Archive