Postgres service fails to start on LCM if logging_collector is enabled
search cancel

Postgres service fails to start on LCM if logging_collector is enabled

book

Article ID: 391445

calendar_today

Updated On: 03-20-2025

Products

VMware Aria Suite

Issue/Introduction

If the logging_collector is enabled for vpostgres on Aria Suite Lifecycle Manager the postgres service fails to restart

Logs like the following can be seen with the command journalctl -u vpostgres | grep FATAL:

Jan 01 00:00:00 <nodenam> postgres[<pid>] 2025-01-01 00:00:00.000 UTC [<pid>] FATAL: could not open log file "/var/log/postgres/postgresql-Mon": Permission denied

Environment

Aria Suite Lifecycle Manager 8.x

Cause

When the logging collector is enabled the postgres service will try to log to "/var/log/postgres". This directory does not exist on LCM appliance out of the box and leads to a FATAL error in the postgres service

Resolution

To resolve the behavior, create the logging directory and give the postgres user permissions to write within it using the following steps:

  1. Using a console or SSH session login as root to the LCM appliance
  2. Create the logging directory:
    1. mkdir /var/log/postgres
  3. Set the appropriate ownership for the directory:
    1. cd /var/log/postgres
    2. chown -R postgres . 
  4. Start the vpostgres service
    1. systemctl start vpostgres
  5. Confirm that postgres is running without issue:
    1. systemctl status vpostgres