I am setting up PostgreSQL on the company's test VM. One is database VM running Windows Server 2016 contains other databases like SQL Server. I set up Postgres 10.15 and set listen_addresses = '*'
in postgresql.conf
and added these lines in pg_hba.conf
host all all 0.0.0.0/0 trust
host all all ::/0 trust
I was trying to access with psql command psql -h <VM IP> -p 5432 -U postgres
but it shows:
psql: could not connect to server: Connection timed out (0x0000274C/10060)
Is the server running on host "<VM IP>" and accepting
TCP/IP connections on port 5432?
This command works when executed on the machine where Postgres is installed. But doesn't when I try to access it remotely.
After looking into several answers, I created inbound rules to open port 5432 in Windows Firewall, still no luck.
I want to connect my spring boot application running on another VM (Windows Server 2019). Everything works on local If I keep database and application on same machine.
I am using Windows 10.
Am I missing something in this?
User contributions licensed under CC BY-SA 3.0