Getting error in installing Pega 8.5.1Personal Edition

I am getting PostGre database installation error while setting up Pega 8.5.1 Personal Edition.

Please error I got from logs:

Mar 11, 2021 11:28:08 AM org.postgresql.Driver connect
SEVERE: Connection error:
org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:265)

Can anyone know root cause of this and how to fix this.

This issue is still not resolved. If some one has any solution, then please reply.

@PUSHKARRAJ I am facing the same error. The Pega PE 8.5.1 worked well for first few attempts, but i wonder that after my system reboot it has stopped coming up with exact same error: -

12-Apr-2021 13:40:20.812 INFO [localhost-startStop-1] com.pega.pegarules.internal.bootstrap.PRBootstrapDataSource. Bootstrap datatables schema: data
12-Apr-2021 13:40:22.866 SEVERE [localhost-startStop-1] org.postgresql.Driver.connect Connection error:
org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

@ANANDSINGH @PUSHKARRAJ The problem was that it didn’t have VCRUNTIME140.dll. needed to run the DB. Just download and install “Visual C++ Redistributable for Visual Studio 2015”. This would install the library that is needed.

@ANANDSINGH My issue got resolved by completely deleting the contents of following directory C:\PRPCPersonalEdition\tomcat\kafka-data , if you are using a VPN or dynamic IP, the IP address of you machine is cached by Kafka which creates this problem. Clean restart of Pega PE after clearing off this folder helped me.

@PUSHKARRAJ are you still having the issue?