Reply
New Contributor
Posts: 3
Registered: ‎06-08-2017

How to stop cdh services command line on linux 7

I would like to know how to stop all the JDK processes using command line on linux7

 

Following does not work for linux 7.

https://www.cloudera.com/documentation/enterprise/5-4-x/topics/cdh_ig_services_stop.html

 

already did :

service cloudera-scm-agent stop
service cloudera-scm-server stop

New Contributor
Posts: 3
Registered: ‎06-08-2017

Re: How to stop cdh services command line on linux 7

And how to remove/add them to system startup

to start those services when server reboots.

Posts: 394
Topics: 11
Kudos: 60
Solutions: 35
Registered: ‎09-02-2016

Re: How to stop cdh services command line on linux 7

 

You can get list of services currently running by:

$ service --status-all

 

To check the status:

Ex:

$ service cloudera-scm-agent status

 

You can also list the configration and swiitch off as follows:

$ chkconfig --list

Ex:

$ chkconfig  cloudera-scm-agent off

 

I don't think any single command is available to stop all the service, so check the list and stop one by one and check the status and switch off in chkconfig. Note: It may take few mins to reflect the change, so check the status after some time

New Contributor
Posts: 3
Registered: ‎06-08-2017

Re: How to stop cdh services command line on linux 7

Thanks. That worked for startup!

 

Follow up questions :

When quickstart cluster is under CM control

a. Is that possible to start/stop individual services using unix cmd line ?

    eg. service hadoop-hdfs-datanode start  

     In my working RHEL6, cluster all these individual services are shown stopped.

      only scm server/agent are running

 

b. in RHEL7 non of those services show up in 

/bin/systemctl status <service name>

 

A little bit confused as how hadoop services are implemented in os ?

 

 

in RHEL 7 :

[cloudera@quickstart ~]$ chkconfig --list | grep hadoop

       <== nothing

 

[cloudera@quickstart ~]$ chkconfig --list | grep scm

cloudera-scm-agent      0:off   1:off   2:on    3:on    4:on    5:on    6:off
cloudera-scm-server     0:off   1:off   2:on    3:on    4:on    5:on    6:off

 

++++++++++++++++

in RHEL 6 :

[cloudera@quickstart ~]$ chkconfig --list | grep hadoop
hadoop-hdfs-datanode    0:off   1:off   2:off   3:off   4:off   5:off   6:off
hadoop-hdfs-journalnode 0:off   1:off   2:off   3:off   4:off   5:off   6:off
hadoop-hdfs-namenode    0:off   1:off   2:off   3:off   4:off   5:off   6:off
hadoop-hdfs-secondarynamenode   0:off   1:off   2:off   3:off   4:off   5:off   6:off
hadoop-httpfs   0:off   1:off   2:off   3:off   4:off   5:off   6:off
hadoop-mapreduce-historyserver  0:off   1:off   2:off   3:off   4:off   5:off   6:off
hadoop-yarn-nodemanager 0:off   1:off   2:off   3:off   4:off   5:off   6:off
hadoop-yarn-proxyserver 0:off   1:off   2:off   3:off   4:off   5:off   6:off
hadoop-yarn-resourcemanager     0:off   1:off   2:off   3:off   4:off   5:off   6:off


[cloudera@quickstart ~]$ chkconfig --list | grep scm
cloudera-scm-agent      0:off   1:off   2:on    3:on    4:on    5:on    6:off
cloudera-scm-server     0:off   1:off   2:on    3:on    4:on    5:on    6:off

Posts: 642
Topics: 3
Kudos: 105
Solutions: 67
Registered: ‎08-16-2016

Re: How to stop cdh services command line on linux 7

If I am understanding you correctly, you are using RHEL 7 or CentOS 7 and the service command isn't working. Try using the systemctl command. The new command would look like this:

systemctl stop cloudera-scm-agent
Highlighted
Champion
Posts: 601
Registered: ‎05-16-2016

Re: How to stop cdh services command line on linux 7

 Below are my response for your questionaire . 

 

a. Is that possible to start/stop individual services using unix cmd line ?

    eg. service hadoop-hdfs-datanode start  

 

Ideally when it is managed by Cloudera manager it is good practice to leave the cloudera manager do its job pertain to stopping instances , services. Lot happens under the hood of cloudera manager . 

 

     In my working RHEL6, cluster all these individual services are shown stopped.

      only scm server/agent are running

 

is your cloudera-scm-db is up and runining ? 

 

b. in RHEL7 non of those services show up in 

/bin/systemctl status <service name>

try the below command 

 

Login in as root  - 

sudo service cloudera-scm-agent status
sudo service cloudera-scm-server status
sudo service cloudera-scm-server-db status

 

Champion
Posts: 601
Registered: ‎05-16-2016

Re: How to stop cdh services command line on linux 7

@ayya  

 

And how to remove/add them to system startup

to start those services when server reboots.

 

you can see those files under 

 

cd /etc

perform 

ls like /etc/rc* 

you will get a list of directories like rc0.d  , rc1.d  , rc2.d  and many 

when you get in to those directories you will see scripts 
Announcements