Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Linux script to stop/start cluster services

avatar
New Contributor

Hola,

i need stop/start the roles and CM services many time for patching the servers. Is there a solution by one script?

Thank you!!

1 ACCEPTED SOLUTION

avatar
Super Collaborator

Starting/stopping cluster or services (and many other actions) will be done in Cloudera Manager UI or using the Cloudera Manager API 

 

The CM API can be used from curl commands in a shell script or when using the bindings from a Python script or Java code.

View solution in original post

4 REPLIES 4

avatar
Explorer

Starting Agents

To start Agents, the supervisord process, and all managed service processes, use the following command:

Start

sudo service cloudera-scm-agent start

Stop

sudo service cloudera-scm-agent stop

Restart

sudo service cloudera-scm-agent restart

 

**Hard Stopping and Restarting Agents**

To stop or restart Agents, the supervisord process, and all managed service processes, use one of the following commands:


Note: The hard_stop and hard_restart commands kill all running managed service processes on the host(s) where the command is run.

 

1)Hard Stop

For RHEL 7, SLES 12, Debian 8, Ubuntu 16.04:

sudo systemctl stop cloudera-scm-supervisord.service

For RHEL 5 or 6, SLES 11, Debian 6 or 7, Ubuntu 12.04, 14.04:

sudo service cloudera-scm-agent hard_stop

 

2)Hard Restart

For RHEL 7, SLES 12, Debian 8, Ubuntu 16.04 and higher:

sudo systemctl stop cloudera-scm-supervisord.service
sudo systemctl start cloudera-scm-agent

For RHEL 5 or 6, SLES 11, Debian 6 or 7, Ubuntu 12.04, 14.04:

sudo service cloudera-scm-agent hard_restart

 

3)Checking Agent Status

To check the status of the Agent process, use the command:
sudo service cloudera-scm-agent status

avatar
New Contributor

thank you very much!

one question more,

if I have to stop before the roles for each worker and manager node (with this order):

Cloudera Management Service

ZooKeeper

HDFS

Solr

Flume

HBase

Key-Value Store Indexer

MapReduce or YARN

Hive

Impala

Oozie

Sqoop

Hue  
HOw is should be with line comands?
THANKU!

avatar
Super Collaborator

Starting/stopping cluster or services (and many other actions) will be done in Cloudera Manager UI or using the Cloudera Manager API 

 

The CM API can be used from curl commands in a shell script or when using the bindings from a Python script or Java code.

avatar
Community Manager

@CajamarBBDD Has any of the replies helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future. 



Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community: