I want to use prconfig.xml instead of context.xml and connect to the DB. Also need steps to encrypt database password in prconfig.

こんにちは、みんな、

この手段を試していますが、うまくいきません。

しかし、prlogging.xml はどこにも存在しません。

以下のコマンドを実行しましたが、結果は表示の通りです。

ーーーーーーーーーーーーーーーーーーーーーーーーーーー

find / -name prlogging.xml

find / -name prlog*

/tmp/PegaInstallTemp-25-August-2022-06.47.24/load/prlog4j2.xml
/opt/tomcat9/webapps/prweb/WEB-INF/classes/prlog4j2.xml
/home/ec2- user/pega8.7.3/scripts/config/prlog4j2.xml
/home/ec2-user/pega8.7.3/Additional_Products/BIX/config/prlog4j2.xml
/home/ec2-user/pega/scripts/config/prlog4j2.xml
/ home/ec2-user/pega/Additional_Products/BIX/config/prlog4j2.xml

ーーーーーーーーーーーーーーーーーーーーーーーーーーー

prlogging.xml を取得するにはどうすればよいですか?
それとも不要ですか?

ありがとうございました。

@YUKIK063

In Any Micro Services Environment, the requested config files location is: opt/pega/config.

pegauser@pega-cs-uat-web-6fbbc4c489-zhdp6:/opt/pega/config$ ls
context.xml.tmpl prconfig.xml prlog4j2.xml server.xml
pegauser@pega-cs-uat-web-6fbbc4c489-zhdp6:/opt/pega/config

Command to find the paths: find / -type d(or)f | grep “text-to-search”

Note: d - for Directory search & f - for File Search.

I’ll check on the other post from you about Password encryption and comeback soon.

@SaikishoreS16598123

thank you for answering.

I tried the command as follows, but nothing was output.

find / -type f | grep prlogging.xml

find / -type d | grep prlogging.xml

find / -type f | grep “prlogging.xml”

find / -type d | grep “prlogging.xml”

find / -type d | grep pega/config

find / -type d | grep “pega/config”

Is prlogging.xml not present in Pega Platform 8.7.3?

Please let me know if there is an alternative file.

Objective.

I want to use prconfig.xml instead of context.xml and connect to the DB. Also need steps to encrypt database password in prconfig.

@SaikishoreS16598123

thank you for answering.

In Pega Platform 7.x 8, prlogging.xml has been replaced by prlog4j2.xml at the URL below.

@YUKIK063

Were you able to use prconfig.xml instead of context.xml? if yes please guide on what things need to be removed from context and additions to prconfig.

I have tried copying the database related ones to prconfig, removing them from context, however the node is not coming up throwing errors for db connectivity.

@RojaB

prconfig.xml and context.xml purpose are different. May I know what have you been looking for and what is the issue?

@Kishore Sanagapalli Thank you responding,

My requirement is to encrypt DB user name and password, currently which are residing in context.xml. Pega’s suggested steps for encryption is available when these parameters are in prconfig.xml. So, as a first step i am trying to move DB things to prconfig from context

@RojaB

If you’re using Openshift / Kubernetes, You could consider the option of creating secrets for user name and password.

If not, Do you have the setting details to configure in prconfig.xml file? if yes, where did you stuck?

@Kishore Sanagapalli

We are not using Kubernetes.

Pega version is 8.7.2. Following is the code I am trying to fit in to prconfig removing the same from context

@RojaB

Yes, The above mentioned parameters are configurable from prconfig.xml. Did you update them and start the application?

@Kishore Sanagapalli

Yes, I removed them from context and configured in prconfig. Application is not starting failing with DB errors.

@RojaB

Could you attach the log file here?

@Kishore Sanagapalli

28-May-2024 09:44:22.282 WARNING [localhost-startStop-1] org.apache.naming.NamingContext.lookup Unexpected exception resolving reference
org.postgresql.util.PSQLException: The connection attempt failed.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:292)
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
at org.postgresql.jdbc.PgConnection.(PgConnection.java:195)
at org.postgresql.Driver.makeConnection(Driver.java:454)
at org.postgresql.Driver.connect(Driver.java:256)
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:319)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:212)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:736)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:668)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:483)
at org.apache.tomcat.jdbc.pool.ConnectionPool.(ConnectionPool.java:154)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:118)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:107)
at org.apache.tomcat.jdbc.pool.DataSourceFactory.createDataSource(DataSourceFactory.java:560)
at org.apache.tomcat.jdbc.pool.DataSourceFactory.getObjectInstance(DataSourceFactory.java:244)
at org.apache.naming.factory.FactoryBase.getObjectInstance(FactoryBase.java:94)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:332)
at org.apache.naming.NamingContext.lookup(NamingContext.java:839)
at org.apache.naming.NamingContext.lookup(NamingContext.java:159)
at org.apache.naming.NamingContext.lookup(NamingContext.java:827)
at org.apache.naming.NamingContext.lookup(NamingContext.java:173)
at org.apache.catalina.core.NamingContextListener.addResource(NamingContextListener.java:1015)
at org.apache.catalina.core.NamingContextListener.createNamingContext(NamingContextListener.java:556)
at org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingContextListener.java:252)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1420)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1410)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)

Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
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.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:607)
at org.postgresql.core.PGStream.(PGStream.java:70)
at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:91)
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:192)
… 32 more

28-May-2024 09:44:22.282 WARNING [localhost-startStop-1] org.apache.catalina.core.NamingContextListener.addResource Failed to register in JMX: [javax.naming.NamingException: Unexpected exception resolving reference [Root exception is org.postgresql.util.PSQLException: The connection attempt failed.]]