Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Ambari-server:command not found

Ambari-server:command not found

Expert Contributor

ambari-server-status.png

I logged in to sandbox, started all services from Start-scripts folder, it displayed status 'starting ambari server/agent'. Later when I checked amabri-server status, it was showing command not found. Attached screenshot.

Can you please help me understand what is the issue or if I did something wrong.

6 REPLIES 6

Re: Ambari-server:command not found

New Contributor

Hi,

Sandbox Hortonworks 2.5 is dockerized. See

http://hortonworks.com/hadoop-tutorial/learning-the-ropes-of-the-hortonworks-sandbox for more information.

Connect throught ssh on port 2222 if you want.

Re: Ambari-server:command not found

Guru

@Viswa, There can be few possibilities on why couldn't you find ambari-server.

1. Ambari -server is Running but its missing from PATH

In this case, can you please check if ambari-server is actually running ? Run ps aux to check if Ambari server is running.

[root@xxx ~]# ps aux | grep ambari-server
root       83696  6.2  0.3 17957784 958424 ?     Sl   07:02  56:53 /usr/lib/jvm/java-openjdk/bin/java -server -XX:NewRatio=3 -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -XX:CMSInitiatingOccupancyFraction=60 -XX:+CMSClassUnloadingEnabled -Dsun.zip.disableMemoryMapping=true -Xms512m -Xmx2048m -XX:MaxPermSize=128m -Djava.security.auth.login.config=/etcambari-server/conf/krb5JAASLogin.conf -Djava.security.krb5.conf=/etc/krb5.conf -Djavax.security.auth.useSubjectCredsOnly=false -cp /etc/ambari-server/conf:/usr/lib/ambari-server/*:/usr/share/java/mysql-connector-java.jar org.apache.ambari.server.controller.AmbariServer

try to find out where is ambari-server installed. In most of the environment, ambari-server can be found at /usr/sbin/ambari-server.

find / -name "ambari-server"

Try running ambari-server --help with full path. It should print out message as below.

root@xxx ~]# /usr/sbin/ambari-server --help

Using python  /usr/bin/python

Usage: /usr/sbin/ambari-server

        {start|stop|reset|restart|upgrade|status|upgradestack|setup|setup-jce|setup-ldap|sync-ldap|set-current|setup-security|refresh-stack-hash|backup|restore|update-host-names|check-database|enable-stack|setup-sso|db-cleanup|install-mpack|uninstall-mpack|upgrade-mpack|setup-kerberos} [options]

        Use /usr/sbin/ambari-server.py <action> --help to get details on options available.

        Or, simply invoke ambari-server.py --help to print the options.

In this case, it is likely that /usr/sbin is missing from path.

Please add /usr/bin to path with export PATH=$PATH:/usr/sbin

2. Ambari server failing

Check if ambari server is running, with ps -aux | grep ambari.

If you do not find ambari server process, please check a log for ambari-server. You can find ambari server logs at /var/log/ambari-server/ambari-server.log

Highlighted

Re: Ambari-server:command not found

Expert Contributor

@yvora thank you. Am trying to understand in a multi node cluster, how to find on which node is ambari-server installed.

Re: Ambari-server:command not found

Guru

@Viswa, Refer to "2.1 USE TERMINAL TO FIND THE HOST IP SANDBOX RUNS ON" section in below document.

https://hortonworks.com/hadoop-tutorial/learning-the-ropes-of-the-hortonworks-sandbox/#explore-ambar...

From above steps find out the ambari host. Typically 1st node has ambari server running.

After figuring out ambari-server host , you can follow steps from 1st comment to see if you can access ambari-sever.

Re: Ambari-server:command not found

Expert Contributor

If still not able to find, here you go use below command (modify IPs as your environment) and run any node to find out entire cluster which node runs on ambari-server.

for i in {1..6}; do ssh 192.168.0.5$i "hostname;ps -eaf |grep ambari-server; echo -e '\n'";done

Re: Ambari-server:command not found

New Contributor

@Viswa, try using sudo service ambari-server restart instead

Don't have an account?
Coming from Hortonworks? Activate your account here