Error:

postgresql-13.service failed because the control process exited with error code

Solution:

  1. Access SSH using Putty to connect with FortiSiem Virtual Appliance which is Centos Linux based.
  2. Check status of service by running the following command;
systemctl status *post*
Check Permissions on the following;
ls -la /var/lib/pgsql/13/data

you will notice that postgres is owner of this directory, so run the following to switch user;

su postgres

now run the following;

initdb -D '/var/lib/pgsql/13/data/'

then enable & start the service;

systemctl enable postgresql-13.service

systemctl start postgresql-13.service

systemctl status postgresql-13.service