General Servers and Services: Operate (Linux)

Note: For a more detailed description about techniques or troubleshooting and resolving SAS Viya 3.5 service start-up problems on Linux, see Resolving SAS Viya 3.5 service start-up problems on Linux.

(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.

Note: Before you run the SAS Viya Multi-Machine Services Utilities playbooks, first verify that the sas-viya-all-services script is exempted from system reboots by running the viya-services-disable.yml playbook. This step prevents the script from executing automatically when the machine is restarted. For more information, see Requirements for Running the SAS Viya Multi-Machine Services Utilities Playbooks.

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_delay value 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.

Note: For more information about how to use the individual start and stop scripts, see Start and Stop a Specific Server or Service.

Start SAS Viya Servers and Services

  1. 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.
  2. 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.

  3. 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.
  4. 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.

  5. 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.

  6. 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.
  7. Start the HTTP proxy server (Apache HTTP Server).

    Refer to information about how to run the httpd script in SAS Viya Administration: Infrastructure Servers.

  8. 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.

  9. 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-services has finished, run sas-viya-all-services status. If any services are reported as down, start it using its script.

  10. If this is a multi-tenancy deployment, start the tenant services using the tenant all-services command. Order does not matter.
  11. 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:

    1. 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

    2. Start all remaining servers and services:

      sudo /etc/init.d/sas-viya-all-services start

Note: After following these steps, if the service still does not start as expected, check the log for the respective service in /opt/sas/viya/config/var/log/. For multi-tenant environments, check /opt/sas/tenant/config/var/log/.
TipBecause the SAS Viya service start and stop sequence is so important, a best practice is to record the start and stop order of services for your site.

Stop SAS Viya Servers and Services

  1. If this is a multi-tenancy deployment, always stop the tenant services first.
  2. 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.

    1. 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

    2. Stop the other SAS Viya services using their individual service scripts.
  3. 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 4Step 6.
  4. 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.

  5. 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.

  6. 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.

  7. Run sudo sas-viya-all-services stop on all the machines to stop any remaining processes.
Note: After following these steps, if the service still does not stop as expected, check the log for the respective service in /opt/sas/viya/config/var/log/. For multi-tenant environments, check /opt/sas/tenant/config/var/log/.

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 systemctl command when running the individual service and server scripts. The systemctl command maintains a record of service status that the service command 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 (service command) with the systemd (systemctl command) causes several issues. The systemctl command knows nothing about a SAS Viya service started with the service command. If you start sas-viya-all-services on Red Hat Enterprise Linux 7.x with the service command, and later attempt to shut down all services using the systemctl command, 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-administration

    On 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-services is named sas-tenant-ID-all-services.
  • sas-viya-all-services does 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.

IMPORTANT Be diligent when you add any services to this file. For example, if you add saslogon, or a Consul service to this file, you might encounter an outage of your environment or you might have a non-functioning environment.
Last updated: December 11, 2025