Nolio Agent will not start: "runuser: may not be used by non-root users"

book

Article ID: 208396

calendar_today

Updated On:

Products

CA Release Automation - Release Operations Center (Nolio)

Issue/Introduction

We have a Nolio Agent installed on a server that will not start. When the user runs <NOLIO_AGENT_HOME>/nolio_agent_restart.sh to try and start the agent the agent does not start. In the nohup.out file that gets created they see the message : runuser: may not be used by non-root users.

The agent also does not start and the same message is shown when they try to start the agent with ./nolio_agent.sh start or ./deployer_daemon.sh start.

 

Cause

The deployer_daemon.sh script tests the id of the user executing the script with the id in the RUN_AS_USER config setting.

  • If they're different then the script tries to start the agent with the RUN_AS_USER using the runuser binary (except runuser can only be run as root).
  • If they are the same then it doesn't need/try to start the agent with the runuser binary. 

Environment

Release : 6.6

Component : CA RELEASE AUTOMATION RELEASE OPERATIONS CENTER

Resolution

Make sure that the RUN_AS_USER is set to run as the appropriate user. It is best practice for the RUN_AS_USER to be set with a value that:

  • Is the same as the user that owns the files/folders in the NOLIO_AGENT_HOME directory; and
  • Is the same user that you login with to stop/start the agent with (unless you normally login with root to restart/stop/start the agent).

Additional Information

The RUN_AS_USER is often set when the agent is installed as a non-root user. This helps start the agent with the appropriate user if the server is rebooted. If the agent is installed as a non-root user and the RUN_AS_USER is not set to be the userid that installed the agent then rebooting will result in the agent to be started as the root user.

If the agent is installed as a non-root user, the RUN_AS_USER is not set, and the server is reboot then the user that installed the agent will not be able to stop the agent. They will need to get a sysadmin to stop the agent (as root) and possibly change permissions on any files recreated as root before they can proceed with managing the state of the agent.