General Servers and Services: Operate (Linux)
- (Optional) Using the SAS Viya Administration Resource Kit
- Important Consideration Before Stopping SAS Viya Servers
- Read This First: Start and Stop Servers and Services
- Start and Stop a Specific Server or Service
- Start and Stop All Servers and Services
- Considerations While Using svc-ignore File
(Optional) Using the SAS Viya Administration Resource Kit
SAS Viya Administration Resource Kit (SAS Viya ARK) provides information about additional Ansible playbooks and other utilities that can be used to control SAS Viya services. For example, SAS Viya Multi-Machine Services Utilities contains a set of playbooks for starting and stopping SAS Viya services across one or more machines. Because playbooks automate a series of manual steps, using them can save time.
For more information, see SAS Viya Administration Resource Kit (SAS Viya ARK) on GitHub. See the README for each playbook or tool to understand what is supported and how and when to use it.
Important Consideration Before Stopping SAS Viya Servers
Before stopping all SAS Viya servers and services using SAS Viya ARK or manually, make sure that all the nodes on the SAS Infrastructure Data Server cluster are running.
- If the status of any of the nodes is 'down', make sure to recover that node by logging in to that particular machine. For more information, see Recover a Node in SAS Viya Administration: Infrastructure Servers.
- Confirm that the status of all the nodes in the cluster is 'up' and are running. For more information, see Understand Status Output in SAS Viya Administration: Infrastructure Servers.
- If the failed node is not recovered and running or
if the node is running and the
replication_delayvalue is nonzero, then contact SAS Technical Support.
Read This First: Start and Stop Servers and Services
CAUTION
Before shutting down or rebooting the host SAS Viya servers, all SAS Viya services must be stopped. There is a sequence for starting and stopping SAS Viya servers and services. You must follow this sequence to avoid operational issues. The SAS Viya start and stop scripts, including the sas-viya-all-services script, do not span multiple machines. You must run the appropriate script, in the correct sequence, on each machine in your SAS Viya topology.
If you have a multi-machine deployment, then start or stop your services by running the SAS Viya Multi-Machine Services Utilities playbooks. Do not run the sas-viya-all-services script on a multi-machine deployment.
Start SAS Viya Servers and Services
- Before you start these servers and services,
check the system process list and process table, and stop or remove the process for
any orphan
or zombie service.
For more information, see your Linux documentation.
Note: If this is a multi-tenancy deployment, always start the tenant services last. - Start the SAS Configuration Server (Consul) by
running the sas-viya-consul-default script.
For highly available deployments that run SAS Configuration Server on multiple machines, start the configuration server on those machines in any order.
To identify which machines contain SAS Configuration Servers, review the
[consul]host group in your Ansible inventory.ini file.Refer to information about how to run the sas-viya-consul-default script in SAS Viya Administration: Infrastructure Servers.
- SAS Viya machines that do not host the SAS
Configuration Server instead will host the SAS Configuration Server agent. Start the
SAS
Configuration Server agent on all other machines using the sas-viya-consul-default
script.
Note: Most SAS Viya deployments contain either the SAS Configuration Server or its agent. However, there are exceptions. To verify that a machine contains a configuration server agent, look for the sas-viya-consul-default script in /etc/init.d.IMPORTANT On a distributed CAS analytics cluster, it is important to start SAS Configuration Server agents on the CAS worker machines before starting CAS on the CAS controller machine.
- Start all instances of SAS Secret Manager
(Vault).
Note: SAS Secret Manager is deployed wherever the SAS Configuration Server is deployed. SAS Vault does not reside on machines that host configuration server agents.
Refer to information about how to run the sas-viya-vault-default script in SAS Viya Administration: Infrastructure Servers.
- Start SAS Message Broker (RabbitMQ).
If there are multiple instances of SAS Message Broker, start the last instance that went down first. Then, start the other instances.
TipIf you can start all instances of SAS Message Broker within 30 seconds of each other, the order in which you start each instance is unimportant.Refer to information about how to run the sas-viya-rabbitmq-server-default script in SAS Viya Administration: Infrastructure Servers.
- On the pgpool server machine, start the SAS
Infrastructure Data Server cluster. If you want to use the individual scripts, first
start the
data nodes and then start the PGPool nodes.
Refer to information about how to run the sas-viya-sasdatasvrc-postgres-pgpool0 script in SAS Viya Administration: Infrastructure Servers.
Note: Check the status of the cluster (sas-viya-sasdatasvrc-postgres-pgpool0) to make sure that all nodes are running. - Start the HTTP proxy server (Apache HTTP
Server).
Refer to information about how to run the httpd script in SAS Viya Administration: Infrastructure Servers.
- Start the sas-httpproxy service by running the
sas-viya-httpproxy-default script.
Refer to information about how to run the sas-viya-httpproxy-default script in SAS Viya Administration: Infrastructure Servers.
- Then, start all remaining services using sas-viya-all-services.
Note: If you have more than one CAS server instance, always start the additional CAS servers after the original CAS server. The order in which you start the additional servers is unimportant. See Step 11.
After
sas-viya-all-serviceshas finished, runsas-viya-all-services status. If any services are reported as down, start it using its script. - If this is a multi-tenancy deployment, start the tenant services using the tenant all-services command. Order does not matter.
- If you have more than one CAS server instance,
always start the additional CAS servers after the original CAS server. The order in
which you
start the additional servers is unimportant.
On the additional CAS server machines, start the SAS Configuration Server agents first, followed by CAS and other SAS Viya services:
- Run the following command, appropriate for your
operating system:
- On Red Hat Enterprise Linux
7.x (or an equivalent distribution) and SUSE Linux
Enterprise Server 12.x:
sudo systemctl start sas-viya-consul-default - On Red Hat Enterprise Linux
6.x (or an equivalent distribution):
sudo service sas-viya-consul-default start
- On Red Hat Enterprise Linux
7.x (or an equivalent distribution) and SUSE Linux
Enterprise Server 12.x:
- Start all remaining servers and
services:
sudo /etc/init.d/sas-viya-all-services start
- Run the following command, appropriate for your
operating system:
Stop SAS Viya Servers and Services
- If this is a multi-tenancy deployment, always stop the tenant services first.
- If you have more than one CAS server instance,
always stop the additional CAS servers before the original CAS server.
Note: If you have more than one additional CAS server, the order in which you stop the CAS servers is unimportant.
On the additional CAS server machines, stop CAS and other SAS Viya services first, followed by the SAS Configuration Server agents.
- Run the following command, appropriate for your
operating system:
- On Red Hat Enterprise Linux
7.x (or an equivalent distribution) and SUSE Linux
Enterprise Server 12.x:
sudo systemctl stop sas-viya-cascontroller-default - On Red Hat Enterprise Linux
6.x (or an equivalent distribution):
sudo service sas-viya-cascontroller-default stop
- On Red Hat Enterprise Linux
7.x (or an equivalent distribution) and SUSE Linux
Enterprise Server 12.x:
- Stop the other SAS Viya services using their individual service scripts.
- Run the following command, appropriate for your
operating system:
- Stop servers and services on machines that do not
contain the following:
- SAS Infrastructure Data Servers and PGPool server
- SAS Configuration Server (Consul)
- SAS Secret Manager (Vault)
Note: If you have machines that contain SAS Configuration Server, SAS Secret Manager, SAS Infrastructure Data Server, and other SAS Viya services, stop the other services first using their individual service scripts. Then, follow the order that is prescribed in Step 4 – Step 6. - On the pgpool server machine, stop the SAS
Infrastructure Data Server cluster.
Refer to information about how to run the sas-viya-sasdatasvrc-postgres-pgpool0 script in SAS Viya Administration: Infrastructure Servers.
- Stop all instances of SAS Message Broker
(RabbitMQ).
Refer to information about how to run the sas-viya-rabbitmq-server-default script in SAS Viya Administration: Infrastructure Servers.
- Stop all instances of SAS Secret Manager and SAS
Configuration Server.
Refer to information about how to run the sas-viya-vault-default script in the sas-viya-consul-default script in SAS Viya Administration: Infrastructure Servers.
- Run
sudo sas-viya-all-services stopon all the machines to stop any remaining processes.
Start and Stop a Specific Server or Service
SAS Viya provides scripts in /etc/init.d that you use to stop, start, restart, and check the status of an individual SAS Viya server and service.
Syntax
How you run the individual server and service scripts depends on your operating system.
- Red Hat Enterprise Linux
7.x (or an equivalent distribution) and SUSE Linux
Enterprise Server 12.x:
sudo systemctl status | stop | start | restart sas-viya-server-or-service-default - Red Hat Enterprise Linux
6.x (or an equivalent distribution):
sudo service sas-viya-server-or-service-default status | stop | start | restart
Usage Notes and Tips
- You must be logged on
to the machine where the particular service resides that you want
to start or stop. Also, you must have root-level privileges to run
these scripts.
CAUTION
There is a sequence for starting and stopping SAS Viya servers and services. You must follow this sequence to avoid operational issues. The SAS Viya start and stop scripts, including the sas-viya-all-services script, do not span multiple machines. You must run the appropriate script, in the correct sequence, on each machine in your SAS Viya topology.
For more information, see Read This First: Start and Stop Servers and Services.
- On multi-tenant SAS
Viya systems, individual server and service scripts are named
sas-tenant-ID-server-or-service-default. - To see the complete
list of SAS Viya server and service scripts, run the following command:
ls /etc/init.d/sas-viya-*. To operate Apache HTTP Server, see Operate (Linux) in SAS Viya Administration: Infrastructure Servers. - On Linux systems that
support systemd, use the
systemctlcommand when running the individual service and server scripts. Thesystemctlcommand maintains a record of service status that theservicecommand and a direct call does not use.CAUTION
On Red Hat Enterprise Linux 7.x (or an equivalent distribution) and SUSE Linux Enterprise Server 12.x, do not mix System V init and systemd commands. Mixing the System V init (
servicecommand) with the systemd (systemctlcommand) causes several issues. Thesystemctlcommand knows nothing about a SAS Viya service started with theservicecommand. If you startsas-viya-all-serviceson Red Hat Enterprise Linux 7.x with theservicecommand, and later attempt to shut down all services using thesystemctlcommand, the service stops responding and does not shut down. - To reduce the footprint
that SAS Viya occupies, some services have been merged into logical
groups.
Log on to SAS Environment Manager. To see how services have been merged, view them on the Availability section of the dashboard. When you click an individual service instance, you see the Service listed. If this service has been merged with other services, you also see a Host service. This host service is the name of the merged service. When starting or stopping services, use the host service name.
For example, the CAS Proxy service and the CAS Management service have been combined into a CAS Administration service. If the CAS Proxy service is down, then the CAS Administration service must be restarted.
On Red Hat Enterprise Linux 7.x (or an equivalent distribution) and SUSE Linux Enterprise Server 12.x:
sudo systemctl restart sas-cas-administrationOn Red Hat Enterprise Linux 6.x (or an equivalent distribution):
sudo service sas-cas-administration restart
Examples
- To check status of SAS
Logon Manager on Red Hat Enterprise Linux 7.x (or
an equivalent distribution) and SUSE Linux Enterprise Server 12.x:
sudo systemctl status sas-viya-saslogon-default - To stop the Comments
service on Red Hat Enterprise Linux 6.x (or
an equivalent distribution):
sudo service sas-viya-comments-default stop - To start SAS Configuration
Server on Red Hat Enterprise Linux 7.x (or
an equivalent distribution) and SUSE Linux Enterprise Server 12.x:
sudo systemctl start sas-viya-consul-default
Start and Stop All Servers and Services
SAS Viya provides a script,
sas-viya-all-services, in /etc/init.d,
that you use to stop, start, and check the status of all SAS Viya servers and
services.
Syntax
Unlike the individual
server and services start scripts, there is only one method for running sas-viya-all-services:
sas-viya-all-services
status | stop | start
Usage Notes and Tips
- You must be logged on
to the machine where the SAS Viya servers and services reside, and
you must have root-level privileges to run
sas-viya-all-services.CAUTION
There is a sequence for starting and stopping SAS Viya servers and services. You must follow this sequence to avoid operational issues. The SAS Viya start and stop scripts, including the sas-viya-all-services script, do not span multiple machines. You must run the appropriate script, in the correct sequence, on each machine in your SAS Viya topology.
For more information, see Read This First: Start and Stop Servers and Services.
- On multi-tenant SAS
Viya systems,
sas-viya-all-servicesis namedsas-tenant-ID-all-services. sas-viya-all-servicesdoes not control Apache HTTP Server.- When checking status, it is normal for certain servers and services to not display host, port, and PID information. The reason is that these servers and services are not registered with the SAS Configuration Server, including the configuration server itself.
Examples
- To check status of all
servers and services:
sudo /etc/init.d/sas-viya-all-services status - To stop all servers
and services:
sudo /etc/init.d/sas-viya-all-services stop - To start all servers
and services:
sudo /etc/init.d/sas-viya-all-services start
Considerations While Using svc-ignore File
In situations where you do not want a service to
be started by sas-viya-all-services, the
/opt/sas/viya/config/etc/viya-svc-mgr/svc-ignore file can be
used. You can skip the start up of any service by adding the name of the service to
the
svc-ignore file.