0

I am trying to install postgres and facing issue, unable to connect to server, i have installed postrges when try to connect with postgres it doesn't connect-> use below commands and get errors.

when i try sudo systemctl status postgresql@12-main.service

 postgresql@12-main.service - PostgreSQL Cluster 12-main
   Loaded: loaded (/lib/systemd/system/postgresql@.service; indirect; vendor preset: enabled)
   Active: failed (Result: protocol) since Wed 2021-03-31 14:18:01 PKT; 8min ago

مارچ 31 14:18:01 nabeel-hp-elite systemd[1]: Starting PostgreSQL Cluster 12-main...
مارچ 31 14:18:01 nabeel-hp-elite postgresql@12-main[30143]: Error: /usr/lib/postgresql/12/bin/pg_ctl /usr/lib/postgresql/12/bin/pg_ctl start -
مارچ 31 14:18:01 nabeel-hp-elite postgresql@12-main[30143]: 2021-03-31 14:18:01.117 PKT [30148] FATAL:  private key file "/etc/ssl/private/ssl
مارچ 31 14:18:01 nabeel-hp-elite postgresql@12-main[30143]: 2021-03-31 14:18:01.117 PKT [30148] DETAIL:  File must have permissions u=rw (0600
مارچ 31 14:18:01 nabeel-hp-elite postgresql@12-main[30143]: 2021-03-31 14:18:01.117 PKT [30148] LOG:  database system is shut down
مارچ 31 14:18:01 nabeel-hp-elite postgresql@12-main[30143]: pg_ctl: could not start server
مارچ 31 14:18:01 nabeel-hp-elite postgresql@12-main[30143]: Examine the log output.
مارچ 31 14:18:01 nabeel-hp-elite systemd[1]: postgresql@12-main.service: Can't open PID file /run/postgresql/12-main.pid (yet?) after start: N
مارچ 31 14:18:01 nabeel-hp-elite systemd[1]: postgresql@12-main.service: Failed with result 'protocol'.
مارچ 31 14:18:01 nabeel-hp-elite systemd[1]: Failed to start PostgreSQL Cluster 12-main.

And when i try to connect to the server using sudo su - postgres and alter the user password it gives

    Is the server running locally and accepting
    connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

Kindly help me, i have googled a lot but unable to install it

Muhammad Nabeel
  • 111
  • 1
  • 14

0 Answers0