vRLSCM 8.x deployment through Easy Installer or vCF might fail while initializing postgres database with below exception
Below snippet is taken from /var/log/bootstrap/firstboot/firstboot.log
2022-06-22 11:45:03.719 UTC [3053] DEBUG: proc_exit(-1): 0 callbacks to make
ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
/opt/vmware/vpostgres/current/bin/pg_ctl -D /storage/db/pgdata -l logfile start
Warning: your password will expire in 5 days
Failed to start vpostgres.service: Transaction is destructive.
See system logs and 'systemctl status vpostgres.service' for details.
Ensure PostgreSQL server is fully started...
Warning: your password will expire in 5 days
PSQL: Sleeping 2 seconds for Postgres to start fully...
+ set -eu
+ set -x
+ log 'main bootstrap firstboot started'
++ date '+%Y-%m-%d %H:%M:%S'
+ echo '2022-06-22 11:45:28 main bootstrap firstboot started'
2022-06-22 11:45:28 main bootstrap firstboot started
+ for script in "${BOOTSTRAP_DIR}"/*
+ echo
When it works following output is expected
2022-06-13 01:37:56.259 UTC [3064] DEBUG: proc_exit(-1): 0 callbacks to make
ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
/opt/vmware/vpostgres/current/bin/pg_ctl -D /storage/db/pgdata -l logfile start
Ensure PostgreSQL server is fully started...
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+---------+-------+-----------------------
postgres | postgres | UTF8 | C | C |
template0 | postgres | UTF8 | C | C | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | C | C | =c/postgres +
| | | | | postgres=CTc/postgres
(3 rows)
PostgreSQL server started.
You are required to change your password immediately (password expired)
su: Authentication token is no longer valid; new one required
(Ignored)
ALTER ROLE
CREATE ROLE
ALTER ROLE
CREATE DATABASE
password updated successfully
The cause of the problem is that vmware-studio invokes firstboot script twice.
This retriggers postgres configuration again while other one (original firstboot) was failed to configure fully.
Note: "In case of VCF environment, execute steps 1 to 7"
1. SSH to SDDC Manager appliance and switch to root user
2. Open /etc/vmware/vcf/domainmanager/application-prod.properties in a text editor.
3. Add this line vrslcm.firstboot.timeout.period.in.minutes=15
4. Save the file and close the editor.
5. Restart the Domain Manager with: systemctl restart domainmanager
6. Wait 2 minutes for the service to restart. You can check status using: systemctl status domainmanager
7. Run the "Deploy vRealize Suite Lifecycle Manager" operation from the SDDC Manager UI.
8. Delete the postgres directory and run postgres configuration script. Incase of a vcf environment, customer has to perform this within 5mins or quicker. Once vRSLCM appliance gets deployed, login to Web Console from vCenter Server and perform following steps:
1. rm -rf /storage/db/pgdata/
2. /etc/bootstrap/firstboot.d/02-configure-postgres.sh
3. /etc/bootstrap/firstboot.d/20-start-services
9. Reboot vRSLCM
10. Check vpostgres status
service vpostgres status
if in case admin@local password does not work , then use below command to reset it
/opt/vmware/share/vami/vami-vlcm-passwd-reset
Reboot Appliance and Login
Verification
After this workaround, vRSLCM UI will be up and running
Check systemctl status vpostgres is in running state.
Comments