Unable to start postgresql service

Hi,

we are using postgresql 9.6 on ubuntu 14.04 and was running fine. the issue arises after the Operating system restarts. as usual, I run after-reboot command and it fails on a task

TASK [monit : start monit] ********************************************************************************************************************************************
fatal: [172.19.3.40]: FAILED! => {"changed": false, "msg": "Error loading unit file 'monit': org.freedesktop.DBus.Error.FileNotFound "No such file or directory""}

RUNNING HANDLER [monit : reload monit] ********************************************************************************************************************************

PLAY RECAP ************************************************************************************************************************************************************
172.19.3.40 : ok=4 changed=2 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

Then I run the after-reboot cmd with --step to pass the error on monit playbook and able to decrypt /opt/data directory.

The, i tried to manually start postgresql server, but found the following error.

ansible@echis1:~$ sudo service postgresql start

  • Starting PostgreSQL 9.6 database server
  • Failed to issue method call: Unit postgresql@9.6-main.service failed to load: No such file or directory. See system logs and 'systemctl status postgresql@9.6-main.service' for details.
    ...fail!

Then i checked the detail log with systemctl status postgresql@9.6-main.service

ansible@echis1:~$ systemctl status postgresql@9.6-main.service
Failed to issue method call: No such interface 'org.freedesktop.DBus.Properties' on object at path /org/freedesktop/systemd1/unit/postgresql_409_2e6_2dmain_2eservice

Hi Demis,

Are you able to see the PostgreSQL data in /opt/data directory?

Thanks,
Sanjay

Hi Sanjay,

I've successfully upgraded to Ubuntu 16.04 and the service is up and running.

Thanks