How to fix broken bitnami init script "Failed to start LSB: bitnami init script"

Keywords: General - Microsoft Azure - Technical issue - Other
bnsupport ID: 4f9ceb80-cd1b-3607-2291-97bade99a3e2
Description:
So basically I am not able to access any of my services including mysql, apache

When I run service bitnami status I get the following error

bitnami[6559]: /etc/init.d/bitnami: 20: .: Can’t open /opt/bitnami/scripts/init/functions
I checked and found there is no init folder in /opt/bitnami/scripts

Please guide me on what is the issue and how to resolve it.

Screenshots from the Bitnami LAMP Stack hosted in Azure VM

Mysql cannot be started

Hi @prashanth_c

Thanks for using Bitnami LAMP!

I have checked your MySQL’s logs and they seem to point that another instance has already bound to that port:

2021-04-12T18:58:47.699852Z 0 [ERROR] [MY-010262] [Server] Can't start server: Bind on TCP/IP port: Address already in use
2021-04-12T18:58:47.699997Z 0 [ERROR] [MY-010257] [Server] Do you already have another mysqld server running on port: 3306 ?
2021-04-12T18:58:47.700297Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-04-12T18:58:49.124921Z 0 [System] [MY-010910] [Server] /opt/bitnami/mysql/bin/mysqld.bin: Shutdown complete (mysqld 8.0.22)  MySQL Community Server - GPL.

Upon checking the running processes, it turns out that your machine has another instance of the MySQL DB that was installed using system packages. This process is the one responsible for preventing Bitnami’s MySQL DB to start.

-----------------------------------
Running: ps aux | grep 'apache\|mysql\|nginx\|/opt/bitnami'
In: /opt/bitnami

Output:

mysql     6428  0.0  0.5 1798404 85688 ?       Ssl  18:56   0:00 /usr/sbin/mysqld
root      8087 29.7  1.1 217224 181368 pts/0   Sl+  19:15   0:13 /opt/bitnami/bnsupport-tool
root      8383  0.0  0.0   2388   760 pts/0    S+   19:16   0:00 /bin/sh -c "ps" aux | grep 'apache\|mysql\|nginx\|/opt/bitnami'
root      8385  0.0  0.0   6212   892 pts/0    S+   19:16   0:00 grep apache\|mysql\|nginx\|/opt/bitnami

In order to stop it, you may run the following commands:

sudo systemctl disable mysqld
sudo systemctl stop mysqld
sudo systemctl status mysqld

After that, could you please check if the sudo /opt/bitnami/ctlscript.sh restart command succeeds now?

Best regards,
Jose Antonio Carmona


Was my answer helpful? Click on :heart:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.