Example of FTP Connection to Pega 7 PRPC for Private Virtual Server Installations

When running on a virtual machine as the Pega Exercise System, the PRPC 7 file system can be accessed using an FTP client application such as FileZilla to exchange files between the host system and the virtual machine.

Summary

  1. Access the Virtual Machine running Pega 7 to Confirm that SFTP Server is Running
  2. Using FileZilla FTP Client to open a Connection to the Pega 7 Virtual Machine
  3. Obtaining the IP Address of the Pega 7 Virtual Machine

Related Posts

  • The Pega 7 Exercise System personal virtual server (PVS) is based on a virtual machine that uses Ubuntu as the operating system by default.
  • Open the VMWare Player and click on the virtual machine name that you want to use.
  • Then click on the link Edit virtual machine settings to review the network settings of the virtual machine.

VMWare Player Edit - virtual machine settings

  • Clicking on Network Adapter will open a view showing the current network connection settings.
  • In this example, the virtual machine is configured to use Host-only so that the virtual machine will be using an IP address in a 192.168 private network with the host operating system.

VMWare Player - Virtual Machine Settings - Network Adapter

  • Click on the Play virtual machine link to start the virtual machine and use the VMWare Player to access the command line. The default login credentials for pega 7 are:
Pega 7.1.6: username = architect and password = password
Pega 7.1.9: username = root and password = install

VMWare Player - Ubuntu Virtual Machine Command Line Login

  • The following command can be used to confirm that the SFTP service is running.
netstat -nltup | more
  • By default, the SFTP service should be running.

VMWare Player - Ubuntu Virtual Machine SFTP Run netstat command

  • A list of active TCP connections will be shown. Look for the one where the port shows 22 and the state shows LISTEN.
  • The IP address 0.0.0.0 indicates that the FTP server is reachable at all of its IP addresses (if it has multiple interfaces).

VMWare Player - Ubuntu Virtual Machine - Confirm FTP Server is running

  • To further confirm that the SFTP server is running properly and that the architect/root users can be used to open a connection, run the following command:
sftp [email protected]
Pega 7.1.6: username = architect and password = password
Pega 7.1.9: username = root and password = install

VMWare Player - Ubuntu Virtual Machine SFTP Confirm Localhost Connection

  • To close the SFTP connection and to exit the program, enter: quit.

  • The FileZilla client for Windows and Mac can be downloaded for free from the source below.
  • Install the client and the run it. Navigate to File > Site Manager and add a new site by clicking on the New Site button.
  • Enter the SFTP connection parameters as shown below.
Host: prpc or IP address, here 192.168.241.128
Port: 22 or blank for default, which is 22 for SFTP
Protocol: SFTP - SSH File Transfer Protocol for secure FTP over SSL
Logon Type: Normal …with username and password
User: architect for 7.1.6 or root for 7.1.9
Password: password for 7.1.6 or install for 7.1.9

FileZilla - Site Manager Create New Site

  • Click on the Connect button to open the connection.
  • A message may appear, asking if the server SSL certificate should be trusted. Click on Yes to continue.
  • FileZilla can now be used to navigate the file system of the virtual machine and to copy files to and from the host operating system.

FileZilla - Access Pega PRPC File System on Virtual Machine Ubuntu

  • Note: FileZilla can also be used to set file permissions. Right-click on a directory or file and select File permissions from the context menu.

FileZilla - Context Menu Change File Permissions

  • The dialog can be used to set read, write and execute permissions for owners, groups and public.

FileZilla - Change File Attributes

  • Note: If the Designer Studio or the FTP server are not reachable using the prpc hostname, the IP address of the virtual machine should be used instead.
  • Open the VMWare command line and log into the virtual machine. For Linux based PVS, execute the command:
ifconfig -a
  • In this case, the IP address that is used by the PVS virtual machine is 192.168.241.128.

VMWare Player - Ubuntu Virtual Machine Run ifconfig to get IP Address

  • From the Windows or Mac host machine, confirm that the virtual machine is reachable by the given IP address.
  • On Windows, open a command line window by clicking on the Start icon and entering cmd in the text box of the Windows menu.
  • The cmd program should be listed at the top of the list under Programs.
  • In the cmd window execute the ping command using the ip address that was obtained from the VM command line using the ifconfig command. Here it is, 192.168.241.128.

Windows 7 Command Line Ping Ubuntu Virtual Machine

  • If pinging the virtual machine was successful, continue with section 3 below. If not, it may be necessary to change the network settings of the VM in the VMWare Player (…NAT, Bridged).
  • In addition, make sure that there are no firewall issues on the host machine.
  • If the host machine is in a VPN, this could also cause problems with resolving the IP address of the VM.

Example of Connecting to Pega 7 PRPC PostgreSQL DB with pgAdmin

This post shows how the PRPC database –assuming PRPC is configured to use PostgreSQL– and its tables can be accessed using the pgAdmin tool. This example applies to the following PRPC installation method:

  1. PegaRULES Process Commander is installed as a Personal Virtual Server (PVS) utilizing the VMWare Player as described in the Downloading the Exercise System section of the System Architect Essentials I (7.1) and Senior System Architect (7.1) courses provided by Pega Academy.
  2. For this example, Windows 7 is used as the host operating system. The steps should be similar for other OS.

Related Posts

Summary

  1. Installation of the PostgreSQL pgAdmin Console
  2. Configuration of PostgreSQL DB Server to Accept Remote Connections
  3. Configuration of Connection Settings in postgresql.conf File
  4. Setup of PostgreSQL DB User for pgAdmin Connections
  5. Configuring the Connection to the Pega 7 DB in pgAdmin

Download the pgAdmin tool for Windows from https://www.pgadmin.org/download/windows.php or for the Mac from https://www.pgadmin.org/download/macosx.php. In this example, pgAdmin version 1.14.3 for Windows was used. Follow the pgAdmin installation instructions to install the application.

  • The exercise systems on Pega Academy use the PostgreSQL DB server as part of the PRPC personal virtual server installation.
  • Open the VMWare Player and click on the virtual machine and then click on the link Edit virtual machine settings.

VMWare Player Edit Virtual Machine Settings

  • Clicking on Network Adapter opens a view showing the current network connection settings.
  • In this example, the Network Adapter under Virtual Machine Settings of the VMWare Player is configured to use NAT (network address translation), so that the host’s IP address is shared (in this case the Windows OS on which the VMWare Player is running).
  • This will result in the virtual machine using an IP address in the 192.168 private network that is shared with the host operating system.

VMWare Player Edit Virtual Machine Settings - Network Adapter NAT Used to share the hosts IP Address

  • Next, use the VMWare Player to start the virtual machine by clicking on the link Play virtual machine and access it through the command line using the default user architect and the default password password.
  • For newer versions of the Pega Exercise System, use the default user root and the password install.

VMWare Player Ubuntu Command Line Login to Virtual Machine

  • The PostgreSQL server instance needs to be configured so that it allows connections from the 192.168 private network since pgAdmin has been installed on the host operating system.
  • Navigate to the folder /etc/postgresql/9.1/main on the virtual machine and locate the file pg_hba.conf.
  • Open the file in the vi editor using the command sudo vi pg_hba.conf

VMWare Player Ubuntu Command Line - Edit pg_hba.conf

  • In the section # IPv4 local connections, add: host all all 192.168.0.0/16 md5 to allow incoming connections from pgAdmin running on the Windows host operating system.

VMWare Player Ubuntu Command Line - Edit pg_hba.conf with VI

  • Navigate to the folder /etc/postgresql/9.1/main and locate the file postgresql.conf and open it in vi using the command:
sudo vi postgresql.conf
  • Locate the section # CONNECTIONS AND AUTHENTICATION and uncomment the parameter listen_addresses and set its value to '*'.

VMWare Player Ubuntu Command Line - Edit postgresql.conf

  • In order for the changes to take effect, the virtual machine can either be restarted or the command:
/etc/init.d/postgresql restart
  • …can be used to only restart PostgreSQL so that it applies the updated configuration files.

VMWare Player Ubuntu Command Line - Restart PostgreSql DB Server

  • The PostgreSQL DB server running on the virtual machine will now accept remote connections from any IP address.

  • It is recommended to create a dedicated PostgreSQL database user that will be used in the pgAdmin console. Execute the following command to create a new super user with access to all databases:
sudo -u postgres createuser --superuser <username>
  • Then open the PostgreSQL command line with by executing the command:
sudo -u postgres psql
  • Set the password of the new super user with the psql command:
\password <username>

VMWare Player Ubuntu Command Line - Create New PostgreSql DB User

  • The PostgreSQL server port should be 5432. It can be checked by executing the command:
sudo -u postgres psql -c "SHOW port;"

VMWare Player Ubuntu Command Line - Get PostgreSql DB Server Port 5432

  • Obtain the IP address of the virtual server by executing the command:
ifconfig -a

VMWare Player Ubuntu Command Line - Get Virtual Machine IP Address ifconfig command

  • In this case, the IP address of the virtual machine is 192.168.1.128.
  • Open the pgAdmin application on the Windows host system.

  • In pgAdmin, click on File in the top level menu and select Add Server.
  • In the New Server Registration dialog, enter the name for the connection, the host name, the port and the username and the password of the super user account created earlier.
  • Then click on Ok to open the connection.

pgAdmin Console - Add New Server - Properties

  • Double clicking on the new server connection opens a tree menu showing the Pega PRPC database named pega.
  • pgAdmin can be used to understand how PRPC operates and how it maintains data and rules by looking at the tables in the associated schemas.

pgAdmin Console - Accessing pegarules schema of pega database

Caution: Modifying or deleting data or PRPC system tables can compromise a PRPC instance and render it useless.