Question
Bank of America
US
Last activity: 4 Oct 2018 13:54 EDT
Not able to conncet to postgres DB from Pega 7.1.9 PVS
Not able to connect to postgres db of Pega 7.1.9 PVS (CLSA 7.1 course), host = prpc, port = 5432, user = pega, password = pega
Have tried the followings as mentioned in the posts:https://pdn.pega.com/forums/lead-system-architect-71/pega-717-pvs-database-connection-details
I used pgAdmin3.exe from my laptop's Personal Edition. host = prpc, user = prpc, password = password.
You can run the script below after which I recommend doing "Machine -> Reset" to 100% guarantee the database is restarted.
Use WinSCP.exe to copy the script to the PVS, naming it "pgEnable,sh", then make it executable using: chmod +x pgEnable,sh
After that execute the script using "sudo", for example, sudo ./pgEnable.sh
After execution of the script I can see pg_hba.conf & postgresql.conf are updated properly as per the script but also can see 1 error "./pgEnable.sh: line 33: at: command not found"
Have used pgAdmin3.exe and tried to connect with following credentials:host = prpc, port = 5432, user = pega, password = pega but getting error "couldn't translate hostname prpc to address, Unknown server error'
Any suggestion.
**Moderation Team has archived post**
Not able to connect to postgres db of Pega 7.1.9 PVS (CLSA 7.1 course), host = prpc, port = 5432, user = pega, password = pega
Have tried the followings as mentioned in the posts:https://pdn.pega.com/forums/lead-system-architect-71/pega-717-pvs-database-connection-details
I used pgAdmin3.exe from my laptop's Personal Edition. host = prpc, user = prpc, password = password.
You can run the script below after which I recommend doing "Machine -> Reset" to 100% guarantee the database is restarted.
Use WinSCP.exe to copy the script to the PVS, naming it "pgEnable,sh", then make it executable using: chmod +x pgEnable,sh
After that execute the script using "sudo", for example, sudo ./pgEnable.sh
After execution of the script I can see pg_hba.conf & postgresql.conf are updated properly as per the script but also can see 1 error "./pgEnable.sh: line 33: at: command not found"
Have used pgAdmin3.exe and tried to connect with following credentials:host = prpc, port = 5432, user = pega, password = pega but getting error "couldn't translate hostname prpc to address, Unknown server error'
Any suggestion.
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Likes (1)
Vachan Chauhan -
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
As delivered the Postgres DB running within the PVS does not allow external connections. Copy the script below to a file, then use WinSCP to send it to root/install's home directory on the PVS. Then execute the script from the command line using: bash ./AllowExternalDBConnections.sh
For simplicity on Windows you can define "vapp" in C:\WIndows\System32\Drivers\etc\hosts" as Proprietary information hidden.
Use any tool you want on your WIndows laptop to connect to the DB, for example Squirrel or the pgAdmin3 app that comes with a Personal Edition.
On the PVS look at /opt/tomcat/conf/context.xml for database port, user, and password information.
9080 is the port used to connect to Tomcat on the PVS, A different port number is used to connect to the Postgres DB.
8>< - - - - - - - - AllowExternalDBConnections.sh - - - - - - - - - ><8
#! /bin/bash
#SuperUser=YES
echo
echo Fix RDBMS settings in your virtual machine
echo
pg=`find / -mount -name postgresql.conf 2> /dev/null`
if [ -n "$pg" ]
then
echo
echo Changing listening address for postgresql
grep "^listen_addresses = '\*'" $pg > /dev/null 2>&1 || echo "listen_addresses = '*'" >> $pg
else
echo Postgres.conf file not found
fi
As delivered the Postgres DB running within the PVS does not allow external connections. Copy the script below to a file, then use WinSCP to send it to root/install's home directory on the PVS. Then execute the script from the command line using: bash ./AllowExternalDBConnections.sh
For simplicity on Windows you can define "vapp" in C:\WIndows\System32\Drivers\etc\hosts" as Proprietary information hidden.
Use any tool you want on your WIndows laptop to connect to the DB, for example Squirrel or the pgAdmin3 app that comes with a Personal Edition.
On the PVS look at /opt/tomcat/conf/context.xml for database port, user, and password information.
9080 is the port used to connect to Tomcat on the PVS, A different port number is used to connect to the Postgres DB.
8>< - - - - - - - - AllowExternalDBConnections.sh - - - - - - - - - ><8
#! /bin/bash
#SuperUser=YES
echo
echo Fix RDBMS settings in your virtual machine
echo
pg=`find / -mount -name postgresql.conf 2> /dev/null`
if [ -n "$pg" ]
then
echo
echo Changing listening address for postgresql
grep "^listen_addresses = '\*'" $pg > /dev/null 2>&1 || echo "listen_addresses = '*'" >> $pg
else
echo Postgres.conf file not found
fi
pg=`find / -mount -name pg_hba.conf 2> /dev/null`
if [ -n "$pg" ]
then
echo Changing host allowance for postgresql
grep "^host.*0\.0\.0\.0/0" $pg > /dev/null 2>&1 || echo "host all all Proprietary information hidden/0 trust" >> $pg
echo applying md5 to peer authentication
sed -i "/^local.*all.*all.*peer$/s/peer/md5/g" $pg
echo Reset your PVS
else
echo Postgres pg_hba.conf file not found
fi
Pegasystems Inc.
US
The database connection details changed for the 7.1.9 PVS images.
See: https://pdn.pega.com/forums/lead-system-architect-71/new-pega-719-pvs-database-connection-details
User Name: postgres
Password: postgres
Do not worry about the "Command not found" error in the script.
The command may only apply to a Windows OS.
You can do a PVS "reset" instead.
The 7.1.9 PVS host name is "vapp" but to use that name you need to define it in C:\Windows\System32\Drivers\etc\hosts.
Alternatively you can use the PVS's IP address.
Issue "ifconfig" from the PVS command line.
IT
SK
Hello, Lee,
This is very helpful post and your suggestions. I was not able to use the SQUIRELL, but I rather used PostgreMAESTRO trial and it worked fine with the same suggestions you provided.
The link you gave is not working any more due to PDN update, but the following link would work:
https://collaborate.pega.com/discussion/pega-717-pvs-database-connection-details
Areteans
IN
Hi,
The link specified is not opening. Please share the alternative links if any.
Thanks!!
Bank of America
US
Thanks a lot for the update.
Your suggestion worked. I can access db using ip address now
initially it won't work, after I restart the server it started working --- /etc/init.d/postgresql-9.3 restart
Just wondering what's - PVS "reset"? Is there anyway to tune performance of PVS?
I have noticed it's now not as fast as it was before when I installed couple of months back.
Areteans
IN
Hi Aniruddha,
The link that was there in the portal is not working any more. Can you please share me the steps that you used for configuring the Post GRE?
Thanks,
Sayan
Pegasystems Inc.
US
Hi Sayan,
Do you still require assistance with the steps used for configuring the Post GRE? If so, I will help get you the answers you need.
Maryrita Styer
Community Manager | Pegasystems
Pegasystems Inc.
US
In Oracle Virtual Box you can reboot the entire PVS, server, db, and all, using Machine -> Reset
There are a number of Agents that you can disable in the PVS since they are never used.
Start by checking for errors in the logs that are Agent related.
Pegasystems Inc.
US
Hi Maryrita,
Thanks for writing back. I am still not able to configure the Post GRE. Would appreciate any help in resolving the same. I am working with the PVS for LSA that is provided as a part of the couse. I have installed the PVS on my Windows 10 laptop. I have installed PostgreSql 9.1 in my Windows10 laptop and I am trying to add a server by clicking on File->Add Server. I am giving the details as Host = my IP address with which i can access the Designer Studio, port as 5432, username as postgres and password as postgres.
Please let me know what I need to do.
Do I need to install Postgre Sql 9.1 inside the PVS Linux box? If so, then what is the step for doing that?
The architecture is still not quite clear to me. I understand that PVS is running LINUX.
Hi Maryrita,
Thanks for writing back. I am still not able to configure the Post GRE. Would appreciate any help in resolving the same. I am working with the PVS for LSA that is provided as a part of the couse. I have installed the PVS on my Windows 10 laptop. I have installed PostgreSql 9.1 in my Windows10 laptop and I am trying to add a server by clicking on File->Add Server. I am giving the details as Host = my IP address with which i can access the Designer Studio, port as 5432, username as postgres and password as postgres.
Please let me know what I need to do.
Do I need to install Postgre Sql 9.1 inside the PVS Linux box? If so, then what is the step for doing that?
The architecture is still not quite clear to me. I understand that PVS is running LINUX.
It has the below configuration for Application server.
- Application Server: Apache Tomcat/7.0.53
- Server IP address: Proprietary information hidden
- Server port: 9080
And it has a DataBase installed inside the PVS. I am trying to add an admin tool to connect to the DB.
Is that the correct understanding?
Thanks,
Sayan
Accepted Solution
Pegasystems Inc.
US
As delivered the Postgres DB running within the PVS does not allow external connections. Copy the script below to a file, then use WinSCP to send it to root/install's home directory on the PVS. Then execute the script from the command line using: bash ./AllowExternalDBConnections.sh
For simplicity on Windows you can define "vapp" in C:\WIndows\System32\Drivers\etc\hosts" as Proprietary information hidden.
Use any tool you want on your WIndows laptop to connect to the DB, for example Squirrel or the pgAdmin3 app that comes with a Personal Edition.
On the PVS look at /opt/tomcat/conf/context.xml for database port, user, and password information.
9080 is the port used to connect to Tomcat on the PVS, A different port number is used to connect to the Postgres DB.
8>< - - - - - - - - AllowExternalDBConnections.sh - - - - - - - - - ><8
#! /bin/bash
#SuperUser=YES
echo
echo Fix RDBMS settings in your virtual machine
echo
pg=`find / -mount -name postgresql.conf 2> /dev/null`
if [ -n "$pg" ]
then
echo
echo Changing listening address for postgresql
grep "^listen_addresses = '\*'" $pg > /dev/null 2>&1 || echo "listen_addresses = '*'" >> $pg
else
echo Postgres.conf file not found
fi
As delivered the Postgres DB running within the PVS does not allow external connections. Copy the script below to a file, then use WinSCP to send it to root/install's home directory on the PVS. Then execute the script from the command line using: bash ./AllowExternalDBConnections.sh
For simplicity on Windows you can define "vapp" in C:\WIndows\System32\Drivers\etc\hosts" as Proprietary information hidden.
Use any tool you want on your WIndows laptop to connect to the DB, for example Squirrel or the pgAdmin3 app that comes with a Personal Edition.
On the PVS look at /opt/tomcat/conf/context.xml for database port, user, and password information.
9080 is the port used to connect to Tomcat on the PVS, A different port number is used to connect to the Postgres DB.
8>< - - - - - - - - AllowExternalDBConnections.sh - - - - - - - - - ><8
#! /bin/bash
#SuperUser=YES
echo
echo Fix RDBMS settings in your virtual machine
echo
pg=`find / -mount -name postgresql.conf 2> /dev/null`
if [ -n "$pg" ]
then
echo
echo Changing listening address for postgresql
grep "^listen_addresses = '\*'" $pg > /dev/null 2>&1 || echo "listen_addresses = '*'" >> $pg
else
echo Postgres.conf file not found
fi
pg=`find / -mount -name pg_hba.conf 2> /dev/null`
if [ -n "$pg" ]
then
echo Changing host allowance for postgresql
grep "^host.*0\.0\.0\.0/0" $pg > /dev/null 2>&1 || echo "host all all Proprietary information hidden/0 trust" >> $pg
echo applying md5 to peer authentication
sed -i "/^local.*all.*all.*peer$/s/peer/md5/g" $pg
echo Reset your PVS
else
echo Postgres pg_hba.conf file not found
fi
Bank Of America
IN
Hey PEDEL
I tried putting the script and running it , it is throwing error , please refer below image , can you help in this .?
Staid Logic LLC
US
you cannot copy the text file into unix directory, try to add manually , I hope issue will get resolved.
Tata Consultancy Services Limited
IN
I followed the instructions and could successfully connect to CSSA PVS 7.2. The database connections details are available in /opt/tomcat/conf/Catalina/localhost/prweb.xml
Infosys Limited
GB
Process to connect pgadmin:-
Change following path files:-
1. /var/lib/pgsql/9.4/data/postgresql.conf
a. Change the line from listen_addresses=’localhost’ to listen_addresses=’*’ (uncomment as well)
2. /var/lib/pgsql/9.4/data/pg_hba.conf
a. add a line under: local all postgres peer
host all all Proprietary information hidden/0 trust
Configuration of pgadmin server (present in /opt/tomcat/conf/Catalina/localhost/prweb.xml file):-
Name of the server : as per your choice
Url :- url in my case ( Proprietary information hidden)
port number :- 5432
username :- pega
password :- pega
database name :- pega
Thanks
Shashank Jain
USU GmbH
DE
FYI,
to get a connection to the postgres DB on the LSA 7.3 VM it was enough to add only the second point you mentioned.
Add the following line into the file /var/lib/pgsql/9.4/data/pg_hba.conf
host all all Proprietary information hidden/0 trust