Installation of Pega 24.1.1 on Kubernetes and PostgreSQL stuck at step to read pr_data_admin from db

We are doing an installation of Pega 24.1.1 on Kubernetes (for the first time), Open Source version (so not on AWS or other cloud, and not Red Hat Opn Shift), using PostgreSQL.
We are now stuck at the step where Pega wants to read things from the database.
Based on the logs we cannot determine if the problem is that Pega cannot find info on the db account, or that it cannot establish the connection, or that it just cannot find the pr_data_admin table because it just is not there. (There are some “Could not find…” lines but they have level INFO, so not sure if they are fatal, or a signal that Pega will next look for an alternative.)

pr_data_admin not being there would be very plausible, because we cannot find any instructions on how to populate the database (which is a fresh install of PostgreSQL) with all the tables etc that Pega needs!

Attached is a full log, but the essential lines in the log are, I think, these:

14-Aug-2024 11:49:49.763 INFO [main] com.pega.pegarules.internal.bootstrap.PRBootstrapDataSource. Loading bootstrap properties from /prbootstrap.properties
14-Aug-2024 11:49:49.764 INFO [main] com.pega.pegarules.internal.bootstrap.SettingReaderJNDI. Could not find java:comp/env/prbootstrap/ in the local JNDI context, skipping prconfig setting lookup
14-Aug-2024 11:49:49.764 INFO [main] com.pega.pegarules.internal.bootstrap.SettingReaderJNDI. Could not find prbootstrap in the local JNDI context, skipping prconfig setting lookup
14-Aug-2024 11:49:49.771 INFO [main] com.pega.pegarules.internal.bootstrap.PRBootstrapDataSource. Bootstrap datatables schema: pegadata
14-Aug-2024 11:49:49.948 SEVERE [main] com.pega.pegarules.internal.bootstrap.PRBootstrapDataSource. Unable to connect to database. Will only use properties from file.
org.postgresql.util.PSQLException: ERROR: relation “pegadata.pr_data_admin” does not exist
Position: 34

Help is appreciated.

web1_log.txt (43.1 KB)

@Marchart

It seems that the Database being used here is PostgreSQL 16.4?

Cross checking with the Platform Support Guide, that isn’t a supported DB option yet.

Can you try again using PostgreSQL 15?

@PhilipShannon
Thank you for your reply. I have asked our customer to uninstall PostgreSQL 16.4 and install 15.

In the mean time, the error says “relation “pegadata.pr_data_admin” does not exist”.
To me, that means that the connection to the database is properly established, but that the table really does not exist. Is that correct?

Because, I really cannot find anywhere how, during installation, all the Pega tables are imported into pegadata and pegarules. I have a strong suspicion that that is where the problem lies. So I do not know how to verify that this import has succeeded.

Kind regards, Marc

@PhilipShannon

Ehm, that’s interesting. I read it as part of the same statement. Where “Unable to connect to database” would be a conclusion from Pega, with the underlying error message would be the one from the database, stating that it could not find that table. That’s why I would like to verify the import of tables into the schema. I might try another way to verify that.

@PhilipShannon

This morning, PostgreSQL 16 has been replaced by PostgreSQL 15. We still see the same errors. See attached log file.

To summarise, the log says about the bootstrap configuration:

============ PegaRULES Bootstrap Configuration ============
           Date: Mon Sep 16 09:08:31 GMT 2024
   Java Version: Eclipse Adoptium 11.0.24
  Configuration: file:/usr/local/tomcat/webapps/prweb/WEB-INF/classes/prbootstrap.properties
Pega-EngineCode: 
       Database: PostgreSQL 15.5
         Driver: PostgreSQL JDBC Driver 42.7.3

(!) Unable to use given database configuration
(!) Unable to locate classes on filesystem
=============== End Bootstrap Configuration ===============

Before this, the log says, among others:

16-Sep-2024 09:08:31.505 INFO [main] com.pega.pegarules.internal.bootstrap.PRBootstrapDataSource. Loading bootstrap properties from /prbootstrap.properties
16-Sep-2024 09:08:31.506 INFO [main] com.pega.pegarules.internal.bootstrap.SettingReaderJNDI. Could not find java:comp/env/prbootstrap/ in the local JNDI context, skipping prconfig setting lookup
16-Sep-2024 09:08:31.507 INFO [main] com.pega.pegarules.internal.bootstrap.SettingReaderJNDI. Could not find prbootstrap in the local JNDI context, skipping prconfig setting lookup

and

6-Sep-2024 09:08:31.707 WARNING [main] com.pega.pegarules.internal.bootstrap.PRMiniLoader. Could not find file:/usr/local/tomcat/webapps/prweb/WEB-INF/lib/prbootstrap-8.24.1-195.jar

This to me looks like Pega cannot fine datasource settings (because it cannot find bootstrap.properties), and cannot find engine classes needed for the installation. It looks for a specific version of prbootstrap jar, but where is this version defined or deduced?

pega-web-tomcat-20240916.txt (43.1 KB)

Turns out that pr_data_admin was indeed missing, while the database and the connection to it were working perfectly fine. Indeed this meant that the database schema’s were not populated. The missing piece of information is that the instruction to populate the database is either part of the Yaml file or part of the Helm command:

In Yaml file:
Pega Helm Charts Actions

shows that you can use install or install-deploy to “Install Pega Platform into your database”. For example:

global:
  actions:
    execute: "install"

For us, install worked better than install-deploy.

In Helm command:
Guide: Deploying Pega on OpenShift

shows:
“In this document, you specify that the Helm chart always “deploys” by using the setting, actions.execute: “deploy”. In the following tasks, you overwrite this function on your initial Helm install by specifying --set global.actions.execute:install-deploy, which invokes an installation of Pega Platform using your installation Docker image and then automatically followed by a deploy. In subsequent Helm deployments, you should not use the override argument, --set global.actions.execute=, since Pega Platform is already installed in your database.”

This way, you do not need to change your Helm chart.
The complete command would then be e.g.

helm install mypega pega/pega --namespace mypega --values pega.yaml --set global.actions.execute:install-deploy

Thank you Michel Kraaij for pointing us in this direction.

@Marchart

Is never easy to know for sure when looking at logfiles as only source of info, but just before the line that you mentioned I saw this line:

14-Aug-2024 11:49:49.948 SEVERE [main] com.pega.pegarules.internal.bootstrap.PRBootstrapDataSource. Unable to connect to database. Will only use properties from file.

Because of that line, I do not think it’s able to connect to the DB at all.