# Pega 8.7 Personal Edition Installation error : Unable to connect to database

**URL:** <https://forums.pega.com/t/pega-8-7-personal-edition-installation-error-unable-to-connect-to-database/2655>\
**Category:** General\
**Tags:** 8-7, installation-and-deployment, senior-system-architect\
**Created:** [May 26, 2022, 8:04am UTC](https://forums.pega.com/t/pega-8-7-personal-edition-installation-error-unable-to-connect-to-database/2655 "2022-05-26T08:04:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gayan\_Wijesiri](https://avatars.discourse-cdn.com/v4/letter/g/aca169/32.png) [@Gayan\_Wijesiri](https://forums.pega.com/u/Gayan_Wijesiri)\
**Post date:** [May 26, 2022, 8:04am UTC](https://forums.pega.com/t/pega-8-7-personal-edition-installation-error-unable-to-connect-to-database/2655/1 "2022-05-26T08:04:41Z")

</div>

Hi All,

I’m getting the below error log while trying to install **Pega 8.7 Personal Edition** in Windows 10 operating system.

Could you please help me out to resolve the issues?

**Error log:**

Targets:Initialization,Database Server Installation,Data Load,Configuration,PRPC Launching  
Buildfile: C:\Intel\117149\_PE\_8.7.\pegaGuiInstallerTemp\build.xml

Initialization:  
[echo] Beginning installation of Pega Platform 8.7.0 Personal Edition – this process should take about 5-10 minutes …  
[mkdir] Created dir: C:\PRPCPersonalEdition  
[mkdir] Created dir: C:\PRPCPersonalEdition\temp  
[unzip] Expanding: C:\Intel\117149\_PE\_8.7\pegaGuiInstallerTemp\PersonalEdition.zip into C:\PRPCPersonalEdition  
[echo] Configuring Tomcat (Setting Java Home and Catalina Home)…  
[replace] Replaced 0 occurrences in 0 files.  
[replace] Replaced 1 occurrences in 1 files.  
[replace] Replaced 2 occurrences in 1 files.  
[replace] Replaced 1 occurrences in 1 files.

Database Server Installation:  
[exec] The files belonging to this database system will be owned by user “Delegate”.  
[exec] This user must also own the server process.  
[exec]  
[exec] The database cluster will be initialized with locale “English\_United States.1252”.  
[exec] The default text search configuration will be set to “english”.  
[exec]  
[exec] Data page checksums are disabled.  
[exec]  
[exec] creating directory C:/PRPCPersonalEdition/pgsql/data … ok  
[exec] creating subdirectories … ok  
[exec] selecting default max\_connections … 100  
[exec] selecting default shared\_buffers … 128MB  
[exec] selecting default timezone … Asia/Calcutta  
[exec] selecting dynamic shared memory implementation … windows  
[exec] creating configuration files … ok  
[exec] running bootstrap script … ok  
[exec] performing post-bootstrap initialization … ok  
[exec]  
[exec] WARNING: enabling “trust” authentication for local connections  
[exec] You can change this by editing pg\_hba.conf or using the option -A, or  
[exec] --auth-local and --auth-host, the next time you run initdb.  
[exec] syncing data to disk … ok  
[exec]  
[exec] Success. You can now start the database server using:  
[exec]  
[exec] C:/PRPCPersonalEdition/pgsql/bin/pg\_ctl -D ^“C^:^\PRPCPersonalEdition^/pgsql^\data^” -l logfile start  
[exec]  
[echo]  
[echo] Waiting for Postgres to start…  
[echo] Connected to Database.  
[exec] ALTER ROLE  
[exec] ALTER ROLE  
[exec] psql:C:/PRPCPersonalEdition/scripts/installPLJava.sql:6: WARNING: Java virtual machine not yet loadedCREATE SCHEMA  
[exec] GRANT  
[exec]  
[exec] CREATE FUNCTION  
[exec] CREATE LANGUAGEDETAIL: The specified module could not be found.  
[exec] CREATE FUNCTION  
[exec]  
[exec]  
[exec] CREATE LANGUAGE  
[exec] CREATE TABLEHINT: SET pljava.libjvm\_location TO the correct path to the jvm library (libjvm.so or jvm.dll, etc.)  
[exec] GRANT  
[exec]  
[exec] CREATE TABLE  
[exec] GRANT  
[exec] CREATE TABLE  
[exec] GRANT  
[exec] CREATE TABLE  
[exec] GRANT  
[exec] CREATE TABLE  
[exec] GRANT  
[exec] CREATE FUNCTION  
[exec] CREATE FUNCTION  
[exec] CREATE FUNCTION  
[exec] CREATE FUNCTION  
[exec] CREATE FUNCTION  
[exec] CREATE FUNCTION  
[exec] CREATE FUNCTION  
[exec] CREATE FUNCTION  
[exec] CREATE FUNCTION

Data Load:  
[exec] The process cannot access the file because it is being used by another process.  
[exec] pg\_ctl: could not start server  
[exec] Examine the log output.  
[exec] Result: 1  
[echo]  
[echo] Waiting for Postgres to restart…  
May 26, 2022 12:42:50 PM 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)  
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)  
at org.postgresql.jdbc.PgConnection.(PgConnection.java:194)  
at org.postgresql.Driver.makeConnection(Driver.java:431)  
at org.postgresql.Driver.connect(Driver.java:247)  
at java.sql.DriverManager.getConnection(DriverManager.java:664)  
at java.sql.DriverManager.getConnection(DriverManager.java:208)  
at com.pega.pegarules.util.anttasks.IsDBAvailable.execute(IsDBAvailable.java:112)  
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)  
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
at java.lang.reflect.Method.invoke(Method.java:498)  
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)  
at org.apache.tools.ant.Task.perform(Task.java:350)  
at org.apache.tools.ant.Target.execute(Target.java:449)  
at org.apache.tools.ant.Target.performTasks(Target.java:470)  
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)  
at org.apache.tools.ant.Project.executeTarget(Project.java:1374)  
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)  
at org.apache.tools.ant.Project.executeTargets(Project.java:1264)  
at org.tp23.antinstaller.antmod.Main.runBuild(Main.java:710)  
at org.tp23.antinstaller.antmod.Main.startAnt(Main.java:218)  
at org.tp23.antinstaller.antmod.Launcher.run(Launcher.java:216)  
at org.tp23.antinstaller.runtime.exe.AntLauncherFilter.exec(AntLauncherFilter.java:79)  
at org.tp23.antinstaller.runtime.ExecInstall.exec(ExecInstall.java:88)  
at org.tp23.antinstaller.selfextract.SelfExtractor.main(SelfExtractor.java:398)  
Caused by: java.net.ConnectException: Connection refused: connect  
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)  
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)  
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)  
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)  
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)  
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)  
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)  
at java.net.Socket.connect(Socket.java:589)  
at org.postgresql.core.PGStream.(PGStream.java:62)  
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:144)  
… 25 more

Unable to connect to database – will retry in 1 second…  
May 26, 2022 12:42:53 PM 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)  
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)  
at org.postgresql.jdbc.PgConnection.(PgConnection.java:194)  
at org.postgresql.Driver.makeConnection(Driver.java:431)  
at org.postgresql.Driver.connect(Driver.java:247)  
at java.sql.DriverManager.getConnection(DriverManager.java:664)  
at java.sql.DriverManager.getConnection(DriverManager.java:208)  
at com.pega.pegarules.util.anttasks.IsDBAvailable.execute(IsDBAvailable.java:112)  
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)  
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
at java.lang.reflect.Method.invoke(Method.java:498)  
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)  
at org.apache.tools.ant.Task.perform(Task.java:350)  
at org.apache.tools.ant.Target.execute(Target.java:449)  
at org.apache.tools.ant.Target.performTasks(Target.java:470)  
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)  
at org.apache.tools.ant.Project.executeTarget(Project.java:1374)  
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)  
at org.apache.tools.ant.Project.executeTargets(Project.java:1264)  
at org.tp23.antinstaller.antmod.Main.runBuild(Main.java:710)  
at org.tp23.antinstaller.antmod.Main.startAnt(Main.java:218)  
at org.tp23.antinstaller.antmod.Launcher.run(Launcher.java:216)  
at org.tp23.antinstaller.runtime.exe.AntLauncherFilter.exec(AntLauncherFilter.java:79)  
at org.tp23.antinstaller.runtime.ExecInstall.exec(ExecInstall.java:88)  
at org.tp23.antinstaller.selfextract.SelfExtractor.main(SelfExtractor.java:398)  
Caused by: java.net.ConnectException: Connection refused: connect  
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)  
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)  
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)  
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)  
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)  
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)  
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)  
at java.net.Socket.connect(Socket.java:589)  
at org.postgresql.core.PGStream.(PGStream.java:62)  
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:144)  
… 25 more

Unable to connect to database – will retry in 1 second…  
May 26, 2022 12:42:56 PM 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)  
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)  
at org.postgresql.jdbc.PgConnection.(PgConnection.java:194)  
at org.postgresql.Driver.makeConnection(Driver.java:431)  
at org.postgresql.Driver.connect(Driver.java:247)  
at java.sql.DriverManager.getConnection(DriverManager.java:664)  
at java.sql.DriverManager.getConnection(DriverManager.java:208)  
at com.pega.pegarules.util.anttasks.IsDBAvailable.execute(IsDBAvailable.java:112)  
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)  
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
at java.lang.reflect.Method.invoke(Method.java:498)  
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)  
at org.apache.tools.ant.Task.perform(Task.java:350)  
at org.apache.tools.ant.Target.execute(Target.java:449)  
at org.apache.tools.ant.Target.performTasks(Target.java:470)  
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)  
at org.apache.tools.ant.Project.executeTarget(Project.java:1374)  
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)  
at org.apache.tools.ant.Project.executeTargets(Project.java:1264)  
at org.tp23.antinstaller.antmod.Main.runBuild(Main.java:710)  
at org.tp23.antinstaller.antmod.Main.startAnt(Main.java:218)  
at org.tp23.antinstaller.antmod.Launcher.run(Launcher.java:216)  
at org.tp23.antinstaller.runtime.exe.AntLauncherFilter.exec(AntLauncherFilter.java:79)  
at org.tp23.antinstaller.runtime.ExecInstall.exec(ExecInstall.java:88)  
at org.tp23.antinstaller.selfextract.SelfExtractor.main(SelfExtractor.java:398)  
Caused by: java.net.ConnectException: Connection refused: connect  
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)  
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)  
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)  
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)  
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)  
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)  
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)  
at java.net.Socket.connect(Socket.java:589)  
at org.postgresql.core.PGStream.(PGStream.java:62)  
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:144)  
… 25 more

 ![Installtion - Error.png](https://pega1.discourse-cdn.com/pega/original/2X/d/d8a7366e72f732bab090e25cb68ea1dc6a5b361e.png)

---

<div class="post-metadata">

**Author:** ![MarijeSchillern](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/marijeschillern/32/23321_2.png) [@MarijeSchillern](https://forums.pega.com/u/MarijeSchillern)\
**Post date:** [May 26, 2022, 9:06am UTC](https://forums.pega.com/t/pega-8-7-personal-edition-installation-error-unable-to-connect-to-database/2655/2 "2022-05-26T09:06:56Z")

</div>

@Gayan_Wijesiri

Please can you check the Related Content forum posts with show up on the forum search with similar issues?

[Unable to install Pega personal edition 8.6 version unable to connect database](https://collaborate.pega.com/question/unable-install-pega-personal-edition-86-version-unable-connect-database)

[unable to install 8.6.0 PE](https://collaborate.pega.com/question/unable-install-860-pe)

[Unable to install Pega 8.5.1 PE](https://collaborate.pega.com/question/unable-install-pega-851-pe)

[DB Port 5432 unavailable error](https://collaborate.pega.com/question/db-port-5432-unavailable-error)

[PEGA PE 8.6 install error](https://collaborate.pega.com/question/pega-pe-86-install-error)

[Pega 8.7 installation error-unable to connect to db](https://collaborate.pega.com/question/pega-87-installation-error-unable-connect-db)

[How to update postgres port in Pega 7.3.1 PE](https://collaborate.pega.com/question/how-update-postgres-port-pega-731-pe)

Suggest:

This error might be because of port unavailability.

Before starting of installation check whether the port numbers are available or not.

Try to proceed with the installation after installing VC++ runtime on Windows Server

> **[Latest supported Visual C++ Redistributable downloads](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170)**
>
> This article provides download links for the latest Visual C++ Redistributable packages.

Users above were able solve it by installing the Microsoft Visual C++ 2015 Redistributable Update 3 RC program.  
_"The issue was that the pg\_ctl executable was not able to run due to the VCRUNTIME140.dll being missing in the Windows System. This error is not exclusive of the pg\_ctl command but it seems to be common for other programs that need that DLL to run correctly_."

Please delete this folder C:/PRPCPersonalEdition/ and then try to install it again. or you can give a new folder name during the installation with new port for database and server.

Please go through all the posts I’ve listed above,

eg [Pega 8.7 installation error-unable to connect to db | Support Center](https://collaborate.pega.com/question/pega-87-installation-error-unable-connect-db).

---

<div class="post-metadata">

**Author:** ![SabryAshroff](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@SabryAshroff](https://forums.pega.com/u/SabryAshroff)\
**Post date:** [May 26, 2022, 1:16pm UTC](https://forums.pega.com/t/pega-8-7-personal-edition-installation-error-unable-to-connect-to-database/2655/3 "2022-05-26T13:16:22Z")

</div>

@Gayan_Wijesiri What worked for me for this error I cleared the installation directory and did a restart of the machine and tried the installation again.
