0

When i try to connect to my postgres database, i get the error below:

could not connect to server: Connection timed out (0x0000274C/10060) Is the server running on host "10.2.1.96" and accepting TCP/IP connections on port 5432?

I make a ssh connection to the machine which runs postgres service, i get the error like below :

[omerkaraca@btpsndsrpg01 bin]$ systemctl start postgresql.service
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: Selman AY (say)
Password:
==== AUTHENTICATION COMPLETE ===
Failed to start postgresql.service: Unit postgresql.service failed to load: No such file or directory.
[omerkaraca@btpsndsrpg01 bin]$ systemctl status postgresql.service
● postgresql.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)
[omerkaraca@btpsndsrpg01 bin]$ ^C
[omerkaraca@btpsndsrpg01 bin]$ ^C
[omerkaraca@btpsndsrpg01 bin]$ service postgresql start 9.6
Redirecting to /bin/systemctl start  9.6 postgresql.service

How can i restart the postgresql service?

  • 1
    What is the result of ls /usr/lib/systemd/system/postgres*? – Laurenz Albe Aug 16 '19 at 6:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.