Fix Error: "If it is running, make sure you are pointing to the right pid file (/var/run/gonit.pid)"

cedar@nowhere:~$ sudo /opt/bitnami/ctlscript.sh status
Cannot find any running daemon to contact. 
If it is running, make sure you are pointing to the right pid file (/var/run/gonit.pid)
cedar@nowhere:~$ cd /opt/bitnami
cedar@nowhere:/opt/bitnami$ ls
apache   bncert-tool             bndiagnostic-tool  elasticsearch  kibana    properties.ini  var
apache2  bndiagnostic            common             gonit          logstash  scripts
bncert   bndiagnostic-regex.ini  ctlscript.sh       java           nami      stats
cedar@nowhere:/opt/bitnami$ less ctlscript.sh 
cedar@nowhere:/opt/bitnami$ gonit
file '/etc/gonit/gonitrc' must be owned by you.
cedar@nowhere:/opt/bitnami$ ls -altr /etc/gonit/gonitrc 
-rw------- 1 root root 105 May  4 08:14 /etc/gonit/gonitrc
cedar@nowhere:/opt/bitnami$ sudo less ctlscript.sh 
cedar@nowhere:/opt/bitnami$ sudo gonit
Starting gonit daemon
cedar@nowhere:/opt/bitnami$ sudo /opt/bitnami/ctlscript.sh status
apache not running
elasticsearch already running
kibana already running
logstash already running
cedar@nowhere:/opt/bitnami$ 

Posted in Developing Software on May 04, 2022