node services
Starts, stops, or restarts services on one or more server nodes. Permissions
required: ss
, fc
or a
.
To start or stop services, you must specify the service name, the action (start, stop, or restart), and the nodes on which to perform the action. You can specify the nodes in one of two ways:
- Use the
nodes
parameter to specify a space-delimited list of node names. - Use the
filter
parameter to specify all nodes that match a certain pattern. See Filters for more information.
Syntax
- CLI
-
/opt/mapr/bin/maprcli node services -h node services [ -cluster cluster name ] [ -filter node names filter. Please put it in quotes"" ] [ -zkconnect ZooKeeper Connect String: 'host:port,host:port,host:port,...' ] [ -nodes node names space separated ] [ -cldb managing cldb service: [start, stop, suspend, resume, restart, enable, disable] ] [ -fileserver managing fileserver service: [start, stop, suspend, resume, restart, enable, disable] ] [ -hbmaster managing hbprimary service: [start, stop, suspend, resume, restart, enable, disable] ] [ -hbregionserver managing hbregionserver service: [start, stop, suspend, resume, restart, enable, disable] ] [ -jobtracker managing jobtracker service: [start, stop, suspend, resume, restart, enable, disable] ] [ -nfs managing nfs service: [start, stop, suspend, resume, restart, enable, disable] ] [ -tasktracker managing tasktracker service: [start, stop, suspend, resume, restart, enable, disable] ] [ -apiserver managing apiserver service: [start, stop, suspend, resume, restart, enable, disable] ] [ -name service name to perform action on ] [ -action service action. One of: [start, stop, suspend, resume, restart, enable, disable] ] [ -nfs4 managing nfs4 service: [start, stop, suspend, resume, restart, enable, disable] ] [ -s3server managing s3server service: [start, stop, suspend, resume, restart, enable, disable] ] [ -keycloak managing keycloak service: [start, stop, suspend, resume, restart, enable, disable]]
- REST
Request Type POST Request URL http[s]://<host>:<port>/rest/node/services[?<parameters>]
Parameters
To perform an action on a service, on a particular set of nodes, you must specify the following three parameters:
-
action
- the action to perform:- Start, stop, restart a service.
- Disable a service to prevent it from starting when Warden restarts and enable a service to allow the service to start when Warden restarts.
NOTESuspend and resume are not supported. -
node
orfilter
- the nodes on which to perform the action; either a list of nodes, or a filter that matches a set of nodes -
name
- the service on which to perform the action
The following table lists the parameters available with the node
services
command.
Parameter |
Description |
---|---|
action |
An action to perform on a service specified in the name
parameter: Values: start, stop, suspend, resume, restart, enable, or disable |
apiserver |
Starts, stops, or restarts the apiserver. Values: start, stop, restart, enable, or disable |
cldb |
Starts, stops, or restarts the cldb service. Values: start, stop, suspend, resume, restart, enable, or disable |
cluster |
The cluster on which to run the command. |
fileserver |
Starts, stops, or restarts the fileserver service. Values: start, stop, suspend, resume, restart, enable, or disable |
filter |
A filter specifying nodes on which to start or stop services. For fields
to use with the filter, see the node table. See Filters for more information about
filters. NOTE You must specify either the filter parameter
or the nodes parameter. |
name |
A service on which to perform an action specified by the
action parameter. Any service can be specified with this
option, but the following services can be specified only with the
name option: collectd ,
elasticsearch , fluentd ,
grafana , historyserver ,
hivemeta , hoststats ,
hs2 , httpfs , hue ,
kibana , nodemanager ,
opentsdb , oozie , and
resourcemanager.
|
nfs |
Starts, stops, or restarts the nfs service. Values: start, stop, suspend, resume, restart, enable, or disable |
nfs4 |
Starts, stops, or restarts the NFSv4 service. Values: start, stop, restart, enable, or disable |
nodes |
A list of node names, separated by spaces. NOTE Either
this or filter is required. |
zkconnect |
The ZooKeeper Connect String. |
s3server |
The parameter can be used to perform an action on the MOSS or s3server
service that runs as part of a cluster or fabric. One of the action words,
start, stop, suspend, resume, restart, enable, disable ,
must be used after the parameter to indicate the action to be taken with
respect to the s3server service. |
keycloak |
The parameter can be used to perform an action on the keycloak service.
One of the action words, start, stop, suspend, resume, restart,
enable, disable , must be used after the parameter to indicate
the action to be taken with respect to the keycloak service. |
Examples
Start the NodeManager Service
/opt/mapr/bin/maprcli node services -name nodemanager -nodes abc.sj.us -action start
Stop the ResourceManager Service
/opt/mapr/bin/maprcli node services -name resourcemanager -nodes abc.sj.us -action stop
Restart the ResourceManager Service
/opt/mapr/bin/maprcli node services -name resourcemanager -nodes abc.sj.us -action restart
Restart NFS4 server
/opt/mapr/bin/maprcli node services -nodes abc.sj.us -nfs4 restart
Restart NFS4 server using a filter
Using a filter is common, especially in HBase environments, where full restarts of region and master servers are needed.
/opt/mapr/bin/maprcli node services -filter ["csvc==nfs"] -nfs4 restart
Start the Hue Service
/opt/mapr/bin/maprcli node services -name hue -action start -nodes <node n>
Restart the hoststats service
Restart the hoststats service after making changes to the HPE Ezmeral Data Fabric Metrics database. You do not need to restart warden.
/opt/mapr/bin/maprcli node services -name hoststats -action restart -nodes <nodes>
OR
/opt/mapr/bin/maprcli node services -name hoststats -action restart -filter '[csvc==hoststats]'
Restart the MOSS service
maprcli node services -nodes <host FQDN for node> -s3server restart
Stop the MOSS service
maprcli node services -nodes <host FQDN for node> -s3server stop
Stop the keycloak service
maprcli node services -nodes <host FQDN for node> -keycloak stop