I have a bit of an update below.
For your request
sudo /opt/bitnami/ctlscript.sh start
returns
Starting services..
When I type
sudo /opt/bitnami/ctlscript.sh status
It returns
apache not running
mariadb not running
php-fpm not running
Now if i start it with
sudo gonit start
it doesn't respond with anything but it does start monitoring as expected. But only while the instatance is live. If it is stopped and started or reset, ie from GCP Compute engine instance interface, it goes back to service "not running".
sudo gonit status
It works as expected for now, until instance is cycled.
Uptime 10m3s
Last Check 2020-12-12 04:25:48.336255777 +0000 UTC m=+600.049049352
Next Check 2020-12-12 04:27:48.336255777 +0000 UTC m=+720.049049352
Pid 1234
Pid File /var/run/gonit.pid
Control File /etc/gonit/gonitrc
Socket File /var/run/gonit.sock
Log File /var/log/gonit.log
Process 'apache'
status Running
pid 123
uptime 10m3s
monitoring status monitored
Process 'mariadb'
status Running
pid 12
uptime 10m3s
monitoring status monitored
Process 'php-fpm'
status Running
pid 43
uptime 10m3s
monitoring status monitored
(I changed the PID #...)
So what i have learned so far. Facts
- Basic LAMP stack from bitnami does not have this problem at all. Gonit starts and monitors all the time no matter if instances are restarted it restarts properly as I would expect.
- For the drupal bitnami image on first boot from a fresh image, gonit works as expected. (wasn't always but it is now)
- ctlscript.sh does not seem to start. It will report status, but doesn't start monitoring.
- This is happening on all drupal 9 images. existing ones I had previously and newly created ones.
The basic LAMP stack works. Drupal does not. ok so I tried to compare the two. So far have not found differences (Process ids are different etc, ) Looked for file names, directories, file permissions, ownership. Ports and processes seem to be the same (identical) but observably am missing something!
What I didn't do is compare them programmaticly. Might take me a week or 2 to learn how to do just that
Briefly looked through startup script on google for that instance, tried to look in the init for the OS and Bitnami's (/opt/bitnami/var/init & /opt/bitnami/scripts/init) but not sure am looking in the right spot.
Did a grep -a "gonit" and a * if I didn't run out of memory or specified a file might be in.
So I guess I need help. gulp