The error "setup_rabbit_cluster Returned status was 127" occurs when you deploy SAS® Viya™


Problem
When you are deploying SAS Viya, you might see the following errors:

setup_rabbit_cluster The RabbitMQ service sas-viya-rabbitmq-server-default could not be started.
setup_rabbit_cluster Returned status was 127


Cause
This issue can be caused by an incorrect path defined for the /etc/sudoers file. To confirm that this is the cause for the issue that you are experiencing, run the following: 

ansible rabbitmq -m shell -a "which service" -b --become-user sas

If you then see the following error, you are experiencing the issue described in this SAS KB article:

deployTarget | FAILED | rc=1 >>
which: no service in (/bin:/usr/bin)​


Workaround
To proceed with your SAS Viya deployment, edit the /etc/sudoers file. This only needs to be done on the host(s) that are part of the [rabbitmq] host group. Make sure that /usr/sbin is in the secure_path as follows:

Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin

 

​Verify That the Issue Is Resolved
Once again, run the following: 

ansible rabbitmq -m shell -a "which service" -b --become-user sas

You should then see this:

deployTarget | SUCCESS | rc=0 >>
/sbin/service


You should now be able to simply re-execute the deployment, without having to uninstall first.