0

Im trying to connect to a DB with Postgres JDBC, both machines are linux

  1. the firewall, selinux, iptables are down on both machines
  2. I can connect to the DB, (on my personal windows computer) with Mobaxterm and DBeaver using ssh: ssh -L 9999:127.0.0.1:5432 root@dbhost
  3. they can ping each other
  4. I can Telnet to port 22, but no 5432
  5. I get this when I run the command netstat -nlp | grep 5432 tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 86870/postgres

I have added this lines at the end of postgresql.conf

listen_addresses = '*'
port = 5432

I have added this lines pg_hba.conf

host    all         all         0.0.0.0/0             md5
host    all         all         ::/0                  md5

and I have run this query to reload the config SELECT pg_reload_conf();

but still can't connect, What do you recommend?

3
  • 2
    Did you restart the service after adding those lines? Commented Nov 4, 2020 at 3:39
  • no, I read that you can reload the config with SELECT pg_reload_conf();....do you think that will not work?...Im afraid on restarting the service because it has NNM running getting data from multiple machines
    – JhonDoe
    Commented Nov 4, 2020 at 3:44
  • 2
    It's not going to read the config file again until you restart the service. Commented Nov 4, 2020 at 3:46

0

You must log in to answer this question.

Browse other questions tagged .