On master node "Failed to start LSB: Bitnami Init Script"

Keywords: PostgreSQL - Google Cloud Platform - Technical issue - Application configuration

bndiagnostic ID: d3ab7b9f-070a-1934-d354-a638d9fd35e4

bndiagnostic output:

? Connectivity: Found possible issues
https://docs.bitnami.com/general/faq/administration/use-firewall/

bndiagnostic failure reason: The suggested guides are not related with my issue

Description:
After running “sudo service bitnami stop” and then “sudo service bitnami start” and then check by “sudo service bitnami status” I got error:

bitnami.service - LSB: Bitnami Init Script
Loaded: loaded (/etc/init.d/bitnami; generated)
Active: failed (Result: exit-code) since Wed 2022-06-22 11:59:46 UTC; 7min ago
Docs: man:systemd-sysv-generator(8)
Process: 517 ExecStart=/etc/init.d/bitnami start (code=exited, status=1/FAILURE)

Jun 22 11:58:41 postgresql-cluster-1-node-0 systemd[1]: Starting LSB: Bitnami Init Script…
Jun 22 11:58:45 postgresql-cluster-1-node-0 bitnami[517]: 2022-06-22T11:58:45.899Z - info: Saving configuration info to disk
Jun 22 11:58:46 postgresql-cluster-1-node-0 bitnami[517]: 2022-06-22T11:58:46.182Z - info: Mounting data disk filesystem
Jun 22 11:58:46 postgresql-cluster-1-node-0 bitnami[517]: 2022-06-22T11:58:46.325Z - info: Performing service start operation for postgresql
Jun 22 11:59:46 postgresql-cluster-1-node-0 bitnami[517]: postgresql 11:59:46.42 ERROR ==> postgresql did not start
Jun 22 11:59:46 postgresql-cluster-1-node-0 bitnami[517]: 2022-06-22T11:59:46.427Z - error: Unable to perform start operation Export start for postgresql failed with exit code 1
Jun 22 11:59:46 postgresql-cluster-1-node-0 systemd[1]: bitnami.service: Control process exited, code=exited, status=1/FAILURE
Jun 22 11:59:46 postgresql-cluster-1-node-0 systemd[1]: bitnami.service: Failed with result ‘exit-code’.
Jun 22 11:59:46 postgresql-cluster-1-node-0 systemd[1]: Failed to start LSB: Bitnami Init Script.

The same error appears when I also stop/start master node using GCP VM Instance stop/start

Hi @gklymenko,

Can you take a look at the database’s log at /opt/bitnami/postgresql/logs/postgresql.log? It’ll probably give you more details about the error the database is running into.

You can also try to restart the services this way to see if it returns any error in the command line

for file in `find /opt/bitnami/scripts/ -name stop.sh`; do sudo $file; done
for file in `find /opt/bitnami/scripts/ -name start.sh`; do sudo $file; done

Hi @jota

Here is logs from /postgresql.log. Seems that master node can not be stopped correctly. I tried it many times:

  1. Launch Bitnami cluster
  2. Stop master instance
  3. See the same error on stopping (via GCP or using command " ```
    sudo service bitnami stop

2022-06-23 08:42:06.980 GMT [1219] LOG:  starting PostgreSQL 14.4 on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
2022-06-23 08:42:06.981 GMT [1219] LOG:  listening on IPv6 address "::1", port 5432
2022-06-23 08:42:06.981 GMT [1219] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2022-06-23 08:42:06.983 GMT [1219] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2022-06-23 08:42:06.987 GMT [1220] LOG:  database system was shut down at 2022-06-23 08:42:06 GMT
2022-06-23 08:42:06.990 GMT [1219] LOG:  database system is ready to accept connections
2022-06-23 08:42:07.151 GMT [1219] LOG:  received fast shutdown request
2022-06-23 08:42:07.153 GMT [1219] LOG:  aborting any active transactions
2022-06-23 08:42:07.154 GMT [1219] LOG:  background worker "logical replication launcher" (PID 1226) exited with exit code 1
2022-06-23 08:42:07.154 GMT [1221] LOG:  shutting down
2022-06-23 08:42:07.167 GMT [1219] LOG:  database system is shut down
postgresql 08:42:07.64 INFO  ==> ** Starting PostgreSQL **
2022-06-23 08:42:07.658 GMT [1323] LOG:  pgaudit extension initialized
2022-06-23 08:42:07.724 GMT [1323] LOG:  starting PostgreSQL 14.4 on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
2022-06-23 08:42:07.724 GMT [1323] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2022-06-23 08:42:07.724 GMT [1323] LOG:  listening on IPv6 address "::", port 5432
2022-06-23 08:42:07.727 GMT [1323] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2022-06-23 08:42:07.731 GMT [1334] LOG:  database system was shut down at 2022-06-23 08:42:07 GMT
2022-06-23 08:42:07.735 GMT [1323] LOG:  database system is ready to accept connections
2022-06-23 09:04:18.710 GMT [2322] FATAL:  password authentication failed for user "postgres"
2022-06-23 09:04:18.710 GMT [2322] DETAIL:  Connection matched pg_hba.conf line 3: "local    all             all                                     md5"
2022-06-23 09:05:07.966 GMT [2331] FATAL:  password authentication failed for user "bitnami"
2022-06-23 09:05:07.966 GMT [2331] DETAIL:  Role "bitnami" does not exist.
	Connection matched pg_hba.conf line 3: "local    all             all                                     md5"
2022-06-23 09:05:07.966 GMT [2331] LOG:  could not send data to client: Broken pipe
2022-06-23 09:05:10.754 GMT [2333] FATAL:  password authentication failed for user "bitnami"
2022-06-23 09:05:10.754 GMT [2333] DETAIL:  Role "bitnami" does not exist.
	Connection matched pg_hba.conf line 3: "local    all             all                                     md5"
2022-06-23 09:06:50.254 GMT [1323] LOG:  received fast shutdown request
2022-06-23 09:06:50.263 GMT [1323] LOG:  aborting any active transactions
2022-06-23 09:06:50.264 GMT [1323] LOG:  background worker "logical replication launcher" (PID 1340) exited with exit code 1
2022-06-23 09:06:50.265 GMT [1335] LOG:  shutting down
2022-06-23 09:06:50.309 GMT [1323] LOG:  database system is shut down
postgresql 09:09:52.42 INFO  ==> ** Starting PostgreSQL **
2022-06-23 09:09:52.605 GMT [918] LOG:  pgaudit extension initialized
2022-06-23 09:09:52.673 GMT [918] LOG:  starting PostgreSQL 14.4 on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
2022-06-23 09:09:52.673 GMT [918] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2022-06-23 09:09:52.673 GMT [918] LOG:  listening on IPv6 address "::", port 5432
2022-06-23 09:09:52.676 GMT [918] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2022-06-23 09:09:52.681 GMT [929] LOG:  database system was shut down at 2022-06-23 09:06:50 GMT
2022-06-23 09:09:52.682 GMT [929] LOG:  invalid primary checkpoint record
2022-06-23 09:09:52.682 GMT [929] PANIC:  could not locate a valid checkpoint record
2022-06-23 09:09:52.682 GMT [918] LOG:  startup process (PID 929) was terminated by signal 6: Aborted
2022-06-23 09:09:52.682 GMT [918] LOG:  aborting startup due to startup process failure
2022-06-23 09:09:52.690 GMT [918] LOG:  database system is shut down

name-l@postgresql-cluster-node-0:~$ for file in find /opt/bitnami/scripts/ -name stop.sh; do sudo $file; done

postgresql 09:16:24.85 INFO ==> postgresql is not running

namr-l@postgresql-cluster-node-0:~$ for file in find /opt/bitnami/scripts/ -name start.sh; do sudo $file; done

postgresql 09:17:47.47 ERROR ==> postgresql did not start

@jota And I also want to ask is any failover manager is installed on Bitnami cluster or I need to install it separatelly?