Postgresql – Postgres Installed in Linux (RHEL) and trying to access / connect using pgadmin (Windows)

installationpostgresql-9.4redhat

I've installed and configured postgresql in Linux successfully,

1. postgres user created
2. new db created successfully
3. I'm trying to connect using pgadmin III (Windows)
4. Following details are adding in pgadmin window

Host: DEMO
Host: XXXX
Port: 5432
Maintenance DB: postgres
Username: postgres
password: G0!mf17.

5. Clicked on OK

It's tried to connect and displayed message connecting to database…. Failed.

I'm not sure why it's failed and what needs to configure in linux system.

I'm new to linux, If anyone able to guide me solve this issue it will be greatful.

Please let me know if you need more details.

Best Answer

First try to be more specific:

  • Which version of RHEL are you using?
  • Which version of Windows are you using?
  • How are these computers connected?
    • Are they in the same network segment?
    • Are there any firewalls in between

Next, try the following:

  • Check firewall configurations
    • Windows firewall configuration (or any Antivirus/Firewall software that may be blocking the pgAdmin)
    • SELinux configuration and/or any antivirus/firewall that may be preventing connections to the linux host
    • If the host is a 'hostname' then check that the network services is translating the name correctly. Try a ping to the IP and then ping to the hostname. Or issue a dnslookup.
  • In the linux system try netstat -a | grep LISTEN |grep "5432" to verify that there is a process actively LISTENING on port 5432

Hope this helps you to start solving your problem.