{"id":1823,"date":"2019-06-18T15:45:36","date_gmt":"2019-06-18T10:15:36","guid":{"rendered":"http:\/\/blog.tenthplanet.in\/?p=1823"},"modified":"2026-07-03T14:48:58","modified_gmt":"2026-07-03T09:18:58","slug":"clustering-and-loadbalancing-pba-with-standalone-postgres-and-apache-web-service","status":"publish","type":"post","link":"https:\/\/tenthplanet.in\/blogs\/clustering-and-loadbalancing-pba-with-standalone-postgres-and-apache-web-service\/","title":{"rendered":"Clustering and Loadbalancing PBA with standalone postgres and Apache web service"},"content":{"rendered":"<p><strong>Clustering and Load balancing in Pentaho+ BA server<\/strong><\/p>\n<p><strong>Prerequisite:<\/strong><\/p>\n<p>Multiple pentaho+ server<br \/>\nStanalone postgres<br \/>\nApache web server<\/p>\n<p><strong>Initialize Postgres Database For Both the Pentaho Plus Servers<\/strong><\/p>\n<p><strong>Change Default Passwords:<\/strong><br \/>\nTo change the passwords, go to the pentaho\/server\/pentaho-server\/data\/postgresql directory and use any text editor to change the passwords in these SQL scripts:<br \/>\ncreate_quartz_postgresql.sql<br \/>\ncreate_jcr_postgresql.sql<br \/>\ncreate_repository_postgresql.sql<br \/>\npentaho_mart_postgresql.sql<br \/>\nRun SQL Scripts:<br \/>\nRun these scripts from the PSQL Console window in the pgAdminIII tool:<br \/>\n\\i &lt;your filepath&gt;\/create_quartz_postgresql.sql<br \/>\n\\i &lt;your filepath&gt;\/create_repository_postgresql.sql<br \/>\n\\i &lt;your filepath&gt;\/create_jcr_postgresql.sql<br \/>\n\\i &lt;your filepath&gt;\/pentaho_mart_postgresql.sql<br \/>\nCheck the postgres schema whether the components are present. (Quartz, Hibernate, JCR, Pentaho Operations Mart)<\/p>\n<p>Specify Data Connection Between Pentaho+ BA server and Tomcat web server<br \/>\nSet Up JNDI Connections for the Pentaho+ Server<br \/>\nStop the Tomcat and Pentaho Plus servers.<br \/>\nConsult your database documentation to determine the class name and connection string for your database.<br \/>\nEdit the \/tomcat\/webapps\/pentaho\/WEB-INF\/web.xml file.<br \/>\nAt the end of the &lt;web-app&gt; element, in the same part of the file where you see &lt;!&#8211; insert additional resource-refs &#8211;&gt;, add the following XML snippet:<br \/>\n&lt;resource-ref&gt;<br \/>\n&lt;description&gt;postgres&lt;\/description&gt;<br \/>\n&lt;res-ref-name&gt;jdbc\/postgres&lt;\/res-ref-name&gt;<br \/>\n&lt;res-type&gt;javax.sql.DataSource&lt;\/res-type&gt;<br \/>\n&lt;res-auth&gt;Container&lt;\/res-auth&gt;<br \/>\n&lt;\/resource-ref&gt;<br \/>\nSave and close the web.xml file.<br \/>\nEdit the \/tomcat\/conf\/context.xml with a text editor. Alternatively, you can modify the \/tomcat\/webapps\/pentaho\/META-INF\/context.xml file if you want this data connection to be available only to the Pentaho+ Server. Adding JNDI connections to the context.xml makes them available to all of the webapps deployed to this Tomcat instance.<br \/>\nAnywhere inside of the Context element, add the following XML snippet:<br \/>\n&lt;Resource name=&#8221;jdbc\/postgres&#8221;<br \/>\nauth=&#8221;Container&#8221; type=&#8221;javax.sql.DataSource&#8221;<br \/>\nfactory=&#8221;org.apache.tomcat.jdbc.pool.DataSourceFactory&#8221;<br \/>\nmaxActive=&#8221;20&#8243;<br \/>\nmaxIdle=&#8221;5&#8243;<br \/>\nmaxWait=&#8221;10000&#8243;<br \/>\nusername=&#8221;postgres&#8221;<br \/>\npassword=&#8221;password&#8221;<br \/>\ndriverClassName=&#8221;org.postgresql.Driver&#8221;<br \/>\nurl=&#8221;jdbc:postgresql:\/\/ip:port\/myDataSource&#8221;<br \/>\n\/&gt;<br \/>\nThe example above shows a simple PostgreSQL configuration. Replace the Resource name, username, password, driverClassName, and url parameters, or any relevant connection settings, to match your database connection information and the details you supplied in the web.xml file earlier.<br \/>\nSave and close the context.xml file.<br \/>\nDelete the pentaho.xml filed located in the \/tomcat\/conf\/catalina\/directory. The pentaho.xml is a cached copy of the context.xml file you modified. Since the cache is not usually configured to update frequently, you have to delete the pentaho.xml file and let Tomcat recreate it when it starts up. (If you could not find pentaho.xml in specified path, skip to next step. It is because of pentaho repository have not cached.)<br \/>\nStart the Tomcat and Pentaho+ servers. Tomcat can now properly connect to your data.<\/p>\n<p><strong>Configure PostgreSQL Pentaho+ Repository Database<\/strong><br \/>\n1.<strong> Set Up Quartz on PostgreSQL Pentaho+ Repository Database:<\/strong><br \/>\nOpen the pentaho\/server\/pentaho-server\/pentaho-solutions\/system\/quartz\/quartz.properties file in any text editor.<br \/>\nLocate the #_replace_jobstore_properties section and set the org.quartz.jobStore.driverDelegateClass as shown here.<br \/>\norg.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.PostgreSQLDelegate<br \/>\nLocate the # Configure Datasources section and set the org.quartz.dataSource.myDS.jndiURL equal to Quartz. For example, on Tomcat, this setting should be:<br \/>\norg.quartz.dataSource.myDS.jndiURL = Quartz<br \/>\nSave the file and close the text editor.<br \/>\n2. <strong>Set Hibernate Settings for PostgreSQL:<\/strong><br \/>\nOpen the hibernate-settings.xml file in a text editor. Find the &lt;config-file&gt; tags and confirm that it is configured for PostgreSQL.<br \/>\n&lt;config-file&gt;system\/hibernate\/postgresql.hibernate.cfg.xml&lt;\/config-file&gt;<br \/>\nSave the file if you made changes, then close the file.<br \/>\nOpen the postgresql.hibernate.cfg.xml file in a text editor.<br \/>\nMake sure that the password and port number match the ones you specified in your configuration. Make changes if necessary, then save and close the file.<br \/>\n3. <strong>Modify Jackrabbit Repository Information for PostgreSQL:<\/strong><br \/>\nNavigate to the pentaho\/server\/pentaho-server\/pentaho-solutions\/system\/jackrabbit and open the repository.xml file with any text editor.<br \/>\nFollowing the table below, locate and verify or change the code so that the PostgreSQL lines are not commented out, but the MySQL, Oracle, and MS SQL Server lines are commented out.<\/p>\n<table width=\"643\" cellspacing=\"0\" cellpadding=\"4\">\n<colgroup>\n<col width=\"115\" \/>\n<col width=\"510\" \/> <\/colgroup>\n<tbody>\n<tr valign=\"top\">\n<td width=\"115\">Item<\/td>\n<td width=\"510\">Code Section<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"115\">Repository<\/td>\n<td width=\"510\">&lt;FileSystem class=&#8221;org.apache.jackrabbit.core.fs.db.DbFileSystem&#8221;&gt;<\/p>\n<p>&lt;param name=&#8221;driver&#8221; value=&#8221;org.postgresql.Driver&#8221;\/&gt;<\/p>\n<p>&lt;param name=&#8221;url&#8221; value=&#8221;jdbc:postgresql:\/\/ip:port\/jackrabbit&#8221;\/&gt;<\/p>\n<p>&#8230;<\/p>\n<p>&lt;\/FileSystem&gt;<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"115\">DataStore<\/td>\n<td width=\"510\">&lt;DataStore class=&#8221;org.apache.jackrabbit.core.data.db.DbDataStore&#8221;&gt;<\/p>\n<p>&lt;param name=&#8221;url&#8221; value=&#8221;jdbc:postgresql:\/\/ip:port\/jackrabbit&#8221;\/&gt;<\/p>\n<p>&#8230;<\/p>\n<p>&lt;\/DataStore&gt;<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"115\">Workspaces<\/td>\n<td width=\"510\">&lt;FileSystem class=&#8221;org.apache.jackrabbit.core.fs.db.DbFileSystem&#8221;&gt;<\/p>\n<p>&lt;param name=&#8221;driver&#8221; value=&#8221;org.postgresql.Driver&#8221;\/&gt;<\/p>\n<p>&lt;param name=&#8221;url&#8221; value=&#8221;jdbc:postgresql:\/\/ip:port\/jackrabbit&#8221;\/&gt;<\/p>\n<p>&#8230;<\/p>\n<p>&lt;\/FileSystem&gt;<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"115\">Persistence Manager (1)<\/td>\n<td width=\"510\">&lt;PersistenceManager class=&#8221;org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager&#8221;&gt;<\/p>\n<p>&lt;param name=&#8221;url&#8221; value=&#8221;jdbc:postgresql:\/\/ip:port\/jackrabbit&#8221;\/&gt;<\/p>\n<p>&#8230;<\/p>\n<p>&lt;\/PersistenceManager&gt;<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"115\">Versioning<\/td>\n<td width=\"510\">&lt;FileSystem class=&#8221;org.apache.jackrabbit.core.fs.db.DbFileSystem&#8221;&gt;<\/p>\n<p>&lt;param name=&#8221;driver&#8221; value=&#8221;org.postgresql.Driver&#8221;\/&gt;<\/p>\n<p>&lt;param name=&#8221;url&#8221; value=&#8221;jdbc:postgresql:\/\/ip:port\/jackrabbit&#8221;\/&gt;<\/p>\n<p>&#8230;<\/p>\n<p>&lt;\/FileSystem&gt;<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"115\">Persistence Manager (2)<\/td>\n<td width=\"510\">&lt;PersistenceManager class=&#8221;org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager&#8221;&gt;<\/p>\n<p>&lt;param name=&#8221;url&#8221; value=&#8221;jdbc:postgresql:\/\/ip:port\/jackrabbit&#8221;\/&gt;<\/p>\n<p>&#8230;<\/p>\n<p>&lt;\/PersistenceManager&gt;<\/td>\n<\/tr>\n<tr valign=\"top\">\n<td width=\"115\">Database Journal<\/td>\n<td width=\"510\">&lt;Journal class=&#8221;org.apache.jackrabbit.core.journal.DatabaseJournal&#8221;&gt;<\/p>\n<p>&lt;param name=&#8221;revision&#8221; value=&#8221;${rep.home}\/revision.log&#8221;\/&gt;<\/p>\n<p>&lt;param name=&#8221;url&#8221; value=&#8221;jdbc:postgresql:\/\/ip:port\/jackrabbit&#8221;\/&gt;<\/p>\n<p>&lt;param name=&#8221;driver&#8221; value=&#8221;org.postgresql.Driver&#8221;\/&gt;<\/p>\n<p>&lt;param name=&#8221;user&#8221; value=&#8221;jcr_user&#8221;\/&gt;<\/p>\n<p>&lt;param name=&#8221;password&#8221; value=&#8221;password&#8221;\/&gt;<\/p>\n<p>&lt;param name=&#8221;schema&#8221; value=&#8221;postgresql&#8221;\/&gt;<\/p>\n<p>&lt;param name=&#8221;schemaObjectPrefix&#8221; value=&#8221;cl_j_&#8221;\/&gt;<\/p>\n<p>&lt;param name=&#8221;janitorEnabled&#8221; value=&#8221;true&#8221;\/&gt;<\/p>\n<p>&lt;param name=&#8221;janitorSleep&#8221; value=&#8221;86400&#8243;\/&gt;<\/p>\n<p>&lt;param name=&#8221;janitorFirstRunHourOfDay&#8221; value=&#8221;3&#8243;\/&gt;<\/p>\n<p>&lt;\/Journal&gt;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Note: If you have a different port or different password, make sure that you change the password and port number in these examples to match the ones in your configuration.<\/p>\n<p><strong>Perform Tomcat-Specific Connection Tasks<\/strong><br \/>\n1. Download Driver and Apply to the Pentaho+ Server:<br \/>\nDownload a JDBC driver JAR from your database vendor or a third-party driver developer.<br \/>\nCopy the JDBC driver JAR you just downloaded to the pentaho\/server\/pentaho-server\/tomcat\/lib folder.<br \/>\nCopy the hsqldb-2.3.2.jar file to pentaho-server\/tomcat\/lib if you want to retain the sample provided by Pentaho Plus.<br \/>\n2. Modify JDBC Connection Information in the Tomcat Context XML File:<br \/>\nGo to the pentaho-server\/tomcat\/webapps\/pentaho\/META-INF directory and open the context.xml file with any file editor.<br \/>\nComment out the resource references that refer to databases other than PostgreSQL, such as MySQL, MS SQL Server, and Oracle. Then, add the following code to the file if it does not already exist. Be sure to adjust the port numbers and passwords to reflect your environment, if necessary.<br \/>\n&lt;Resource name=&#8221;jdbc\/Hibernate&#8221; auth=&#8221;Container&#8221; type=&#8221;javax.sql.DataSource&#8221; factory=&#8221;org.apache.tomcat.jdbc.pool.DataSourceFactory&#8221; initialSize=&#8221;0&#8243; maxActive=&#8221;20&#8243; maxIdle=&#8221;10&#8243; maxWait=&#8221;10000&#8243; username=&#8221;hibuser&#8221; password=&#8221;password&#8221; driverClassName=&#8221;org.postgresql.Driver&#8221; url=&#8221;jdbc:postgresql:\/\/ip:port\/hibernate&#8221; validationQuery=&#8221;select 1&#8243;\/&gt;<br \/>\n&lt;Resource name=&#8221;jdbc\/Audit&#8221; auth=&#8221;Container&#8221; type=&#8221;javax.sql.DataSource&#8221; factory=&#8221;org.apache.tomcat.jdbc.pool.DataSourceFactory&#8221; initialSize=&#8221;0&#8243; maxActive=&#8221;20&#8243; maxIdle=&#8221;10&#8243; maxWait=&#8221;10000&#8243; username=&#8221;hibuser&#8221; password=&#8221;password&#8221; driverClassName=&#8221;org.postgresql.Driver&#8221; url=&#8221;jdbc:postgresql:\/\/ip:port\/hibernate&#8221; validationQuery=&#8221;select 1&#8243;\/&gt;<br \/>\n&lt;Resource name=&#8221;jdbc\/Quartz&#8221; auth=&#8221;Container&#8221; type=&#8221;javax.sql.DataSource&#8221; factory=&#8221;org.apache.tomcat.jdbc.pool.DataSourceFactory&#8221; initialSize=&#8221;0&#8243; maxActive=&#8221;20&#8243; maxIdle=&#8221;10&#8243; maxWait=&#8221;10000&#8243; username=&#8221;pentaho_user&#8221; password=&#8221;password&#8221; driverClassName=&#8221;org.postgresql.Driver&#8221; url=&#8221;jdbc:postgresql:\/\/ip:port\/quartz&#8221; validationQuery=&#8221;select 1&#8243;\/&gt;<br \/>\n&lt;Resource name=&#8221;jdbc\/pentaho_operations_mart&#8221; auth=&#8221;Container&#8221; type=&#8221;javax.sql.DataSource&#8221; factory=&#8221;org.apache.tomcat.jdbc.pool.DataSourceFactory&#8221; initialSize=&#8221;0&#8243; maxActive=&#8221;20&#8243; maxIdle=&#8221;10&#8243; maxWait=&#8221;10000&#8243; username=&#8221;hibuser&#8221; password=&#8221;password&#8221; driverClassName=&#8221;org.postgresql.Driver&#8221; url=&#8221;jdbc:postgresql:\/\/ip:port\/pentaho_operations_mart&#8221; validationQuery=&#8221;select 1&#8243;\/&gt;<br \/>\n&lt;Resource name=&#8221;jdbc\/PDI_Operations_Mart&#8221; auth=&#8221;Container&#8221; type=&#8221;javax.sql.DataSource&#8221; factory=&#8221;org.apache.tomcat.jdbc.pool.DataSourceFactory&#8221; initialSize=&#8221;0&#8243; maxActive=&#8221;20&#8243; maxIdle=&#8221;10&#8243; maxWait=&#8221;10000&#8243; username=&#8221;hibuser&#8221; password=&#8221;password&#8221; driverClassName=&#8221;org.postgresql.Driver&#8221; url=&#8221;jdbc:postgresql:\/\/ip:port\/hibernate&#8221; validationQuery=&#8221;select 1&#8243;\/&gt;<br \/>\nMake sure that the validationQuery variable for your database is set as follows: validationQuery=&#8221;select 1&#8243;<br \/>\nSave the context.xml file, then close it.<br \/>\nClear the tomcat\/work and tomcat\/temp directories.<br \/>\nStart the tomcat and pentaho servers.<\/p>\n<p><strong>Initialize and Configure Pentaho Plus Repository<\/strong><br \/>\n1)Clean Up Pentaho Plus Repository:<br \/>\nAfter you have initialized and configured your repository, you should clean up these files by following these steps.<br \/>\nLocate the &#8230;pentaho-server\/tomcat directory and remove all files and folders from the temp folder.<br \/>\nLocate the &#8230;pentaho-server\/tomcat directory and remove all files and folders from the work folder.<br \/>\nLocate the &#8230;pentaho-server\/pentaho-solutions\/system\/jackrabbit\/repository directory and remove all files and folders from the final repository folder.<br \/>\nLocate the &#8230;pentaho-server\/pentaho-solutions\/system\/jackrabbit\/repository directory and remove all files and folders from the workspaces folder.<br \/>\nYou now have a configured repository and are ready to move to the next step for clustering.<br \/>\nConfigure Jackrabbit Journal<br \/>\n1. Locate the repository.xml file in the &#8230;\/pentaho-server\/pentaho-solutions\/system\/jackrabbit directory and open it with any text editor.<br \/>\n2. Scroll to the bottom of the file and replace the section that begins with &lt;!&#8211; Run with a cluster journal &#8211;&gt; with the correct code for your type of database repository.<br \/>\nChange in the 1st pentaho server \u2013 Node1 \/Server 1<br \/>\n&lt;!&#8211;<br \/>\nRun with a cluster journal<br \/>\n&#8211;&gt;<br \/>\n&lt;Cluster id=&#8221;node1&#8243;&gt;<br \/>\n&lt;Journal class=&#8221;org.apache.jackrabbit.core.journal.DatabaseJournal&#8221;&gt;<br \/>\n&lt;param name=&#8221;revision&#8221; value=&#8221;${rep.home}\/revision.log&#8221;\/&gt;<br \/>\n&lt;param name=&#8221;url&#8221; value=&#8221;jdbc:postgresql:\/\/ip:port\/jackrabbit&#8221;\/&gt;<br \/>\n&lt;param name=&#8221;driver&#8221; value=&#8221;org.postgresql.Driver&#8221;\/&gt;<br \/>\n&lt;param name=&#8221;user&#8221; value=&#8221;jcr_user&#8221;\/&gt;<br \/>\n&lt;param name=&#8221;password&#8221; value=&#8221;password&#8221;\/&gt;<br \/>\n&lt;param name=&#8221;databaseType&#8221; value=&#8221;postgresql&#8221;\/&gt;<br \/>\n&lt;param name=&#8221;janitorEnabled&#8221; value=&#8221;true&#8221;\/&gt;<br \/>\n&lt;param name=&#8221;janitorSleep&#8221; value=&#8221;86400&#8243;\/&gt;<br \/>\n&lt;param name=&#8221;janitorFirstRunHourOfDay&#8221; value=&#8221;3&#8243;\/&gt;<br \/>\n&lt;\/Journal&gt;<br \/>\n&lt;\/Cluster&gt;<br \/>\nChange in the 2nd pentaho server \u2013 Node 2 \/Server 2<br \/>\n&lt;!&#8211;<br \/>\nRun with a cluster journal<br \/>\n&#8211;&gt;<br \/>\n&lt;Cluster id=&#8221;node2&#8243;&gt;<br \/>\n&lt;Journal class=&#8221;org.apache.jackrabbit.core.journal.DatabaseJournal&#8221;&gt;<br \/>\n&lt;param name=&#8221;revision&#8221; value=&#8221;${rep.home}\/revision.log&#8221;\/&gt;<br \/>\n&lt;param name=&#8221;url&#8221; value=&#8221;jdbc:postgresql:\/\/ip:port\/jackrabbit&#8221;\/&gt;<br \/>\n&lt;param name=&#8221;driver&#8221; value=&#8221;org.postgresql.Driver&#8221;\/&gt;<br \/>\n&lt;param name=&#8221;user&#8221; value=&#8221;jcr_user&#8221;\/&gt;<br \/>\n&lt;param name=&#8221;password&#8221; value=&#8221;password&#8221;\/&gt;<br \/>\n&lt;param name=&#8221;databaseType&#8221; value=&#8221;postgresql&#8221;\/&gt;<br \/>\n&lt;param name=&#8221;janitorEnabled&#8221; value=&#8221;true&#8221;\/&gt;<br \/>\n&lt;param name=&#8221;janitorSleep&#8221; value=&#8221;86400&#8243;\/&gt;<br \/>\n&lt;param name=&#8221;janitorFirstRunHourOfDay&#8221; value=&#8221;3&#8243;\/&gt;<br \/>\n&lt;\/Journal&gt;<br \/>\n&lt;\/Cluster&gt;<\/p>\n<p>3. Save and close the file. Jackrabbit journaling is now set up for your cluster. Next, you need to cluster the quartz tables to avoid duplicate scheduling on each node.<\/p>\n<p><strong>Configure Quartz<\/strong><br \/>\n1. Locate the quartz.properties file in the &#8230;\/pentaho-server\/pentaho-solutions\/system\/quartz directory and open it with any text editor.<br \/>\n2. Find the org.quartz.scheduler.instanceId = INSTANCE_ID line and change INSTANCE_ID to AUTO.<br \/>\norg.quartz.scheduler.instanceId = AUTO<br \/>\n3. Find the #_replace_jobstore_properties section and change the default value of org.quartz.jobStore.isClustered to true as shown.<br \/>\n#_replace_jobstore_properties<br \/>\norg.quartz.jobStore.misfireThreshold = 60000<br \/>\norg.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.PostgreSQLDelegate<br \/>\norg.quartz.jobStore.useProperties = false<br \/>\norg.quartz.jobStore.dataSource = myDS<br \/>\norg.quartz.jobStore.tablePrefix = QRTZ5_<br \/>\norg.quartz.jobStore.isClustered = true<br \/>\n4. Add this line just after the org.quartz.jobStore.isClustered = true line.<br \/>\norg.quartz.jobStore.clusterCheckinInterval = 20000<br \/>\n5. Save the Editor. Quartz is now configured for your cluster.<br \/>\n6. Restart the postgresql, tomcat and pentaho server. And the clustering of two servers is working properly.<\/p>\n<p><strong>Tomcat Configuration for Load Balancer in High Availability<\/strong><br \/>\n1. Shut down the Tomcat server on each node in the cluster.<br \/>\n2. Open the tomcat\/conf\/server.xml file in a text editor.<br \/>\n3. Locate the following line &lt;Engine name=&#8221;Catalina&#8221; defaultHost=&#8221;localhost&#8221;&gt;.<br \/>\n4. The jvmRoute value will need to be unique for each node. This value will map to the<br \/>\nBalancerMember setup in the following section when configuring Apache. Add the<br \/>\njvmRoute attribute like this:<br \/>\nChange in Pentaho Server 1<br \/>\n&lt;Engine name=&#8221;Catalina&#8221; defaultHost=&#8221;localhost&#8221; jvmRoute=&#8221;server1&#8243;&gt;<\/p>\n<p>Change in Pentaho Server 2<br \/>\n&lt;Engine name=&#8221;Catalina&#8221; defaultHost=&#8221;localhost&#8221; jvmRoute=&#8221;server2&#8243;&gt;<br \/>\n5. To close connections so they do not become orphaned and cause errors, locate the<br \/>\nfollowing line:<br \/>\n&lt;Connector URIEncoding=&#8221;UTF-8&#8243; port=&#8221;8009&#8243; protocol=&#8221;AJP\/1.3&#8243;<br \/>\nredirectPort=&#8221;8443&#8243; \/&gt;<br \/>\nChange it to:<br \/>\n&lt;Connector port=&#8221;8009&#8243; protocol=&#8221;AJP\/1.3&#8243; redirectPort=&#8221;8443&#8243;<br \/>\nconnectionTimeout=&#8221;10000&#8243; keepAliveTimeout=&#8221;10000&#8243; \/&gt;<br \/>\n6. Edit the pentaho-solutions\/system\/server.properties and change the fully-qualified-server-url param-value to the load balancer\u2019s URL.<br \/>\nfully-qualified-server-url=http:\/\/ip:port\/pentaho\/<br \/>\n7. Start the Tomcat service back up after configuring this file.<br \/>\n8. Repeat this process throughout all nodes within the cluster.<br \/>\nApache Configuration<br \/>\nLocate and edit the Apache configuration file. For Debian-based distributions, this is located by default in \/etc\/apache2\/sites-available\/000-default.conf.<br \/>\nWithin this configuration file, you will need to edit the existing (or add a new) VirtualHost directive. Make sure to reflect the BalancerMember hostname with your Pentaho cluster nodes:<br \/>\n&lt;VirtualHost *:80&gt;<br \/>\n# The ServerName directive sets the request scheme, hostname and port that<br \/>\n# the server uses to identify itself. This is used when creating<br \/>\n# redirection URLs. In the context of virtual hosts, the ServerName<br \/>\n# specifies what hostname must appear in the request&#8217;s Host: header to<br \/>\n# match this virtual host. For the default virtual host (this file) this<br \/>\n# value is not decisive as it is used as a last resort host regardless.<br \/>\n# However, you must set it for any further virtual host explicitly.<br \/>\nServerName master-server<br \/>\nServerAdmin webmaster@localhost<br \/>\nDocumentRoot \/var\/www\/html<br \/>\n# Available loglevels: trace8, &#8230;, trace1, debug, info, notice, warn,<br \/>\n# error, crit, alert, emerg.<br \/>\n# It is also possible to configure the loglevel for particular<br \/>\n# modules, e.g.<br \/>\n#LogLevel info ssl:warn<br \/>\nErrorLog ${APACHE_LOG_DIR}\/error.log<br \/>\nCustomLog ${APACHE_LOG_DIR}\/access.log combined<br \/>\n# For most configuration files from conf-available\/, which are<br \/>\n# enabled or disabled at a global level, it is possible to<br \/>\n# include a line for only one particular virtual host. For example the<br \/>\n# following line enables the CGI configuration for this host only<br \/>\n# after it has been globally disabled with &#8220;a2disconf&#8221;.<br \/>\n#Include conf-available\/serve-cgi-bin.conf<br \/>\n&lt;Location &#8220;\/pentaho&#8221;&gt;<br \/>\nProxyPass balancer:\/\/reportingcluster<br \/>\nProxyPassReverseCookiePath \/ \/pentaho<br \/>\n&lt;\/Location&gt;<br \/>\n&lt;Location &#8220;\/pentaho-style&#8221;&gt;<br \/>\nProxyPass balancer:\/\/reportingcluster-style<br \/>\nProxyPassReverseCookiePath \/ \/pentaho<br \/>\n&lt;\/Location&gt;<br \/>\n&lt;\/VirtualHost&gt;<br \/>\nProxyPreserveHost On<br \/>\nProxyPass \/pentaho balancer:\/\/reportingcluster<br \/>\nProxyPassReverseCookiePath \/ \/pentaho<br \/>\nProxyPass \/pentaho-style balancer:\/\/reportingcluster-style<br \/>\nProxyPassReverseCookiePath \/ \/pentaho<br \/>\nTimeout 600<br \/>\nProxyTimeout 600<br \/>\n&lt;Proxy balancer:\/\/reportingcluster&gt;<br \/>\nProxySet stickysession=JSESSIONID timeout=360 scolonpathdelim=On failonstatus=502,503<br \/>\nBalancerMember http:\/\/ip:port\/pentaho connectiontimeout=10 loadfactor=10 route=server1 max=20 ttl=120 retry=1<br \/>\nBalancerMember http:\/\/ip:port\/pentaho connectiontimeout=10 loadfactor=10 route=server2 max=20 ttl=120 retry=1<br \/>\nBalancerMember http:\/\/ip:port\/pentaho route=server3 retry=1 connectiontimeout=10 loadfactor=10 max=20 ttl=120 status=+H<br \/>\nProxySet lbmethod=bytraffic<br \/>\n&lt;\/Proxy&gt;<br \/>\n&lt;Proxy balancer:\/\/reportingcluster-style&gt;<br \/>\nProxySet stickysession=JSESSIONID timeout=360 scolonpathdelim=On failonstatus=502,503<br \/>\nBalancerMember http:\/\/ip:port\/pentaho-sytle connectiontimeout=10 loadfactor=10 route=server1 max=20 ttl=120 retry=1<br \/>\nBalancerMember http:\/\/ip:port\/pentaho-sytle connectiontimeout=10 loadfactor=10 route=server2 max=20 ttl=120 retry=1<br \/>\nBalancerMember http:\/\/ip:port\/pentaho-sytle route=server3 retry=1 connectiontimeout=10 loadfactor=10 max=20 ttl=120 status=+H<br \/>\nProxySet lbmethod=bytraffic<br \/>\n&lt;\/Proxy&gt;<br \/>\n# vim: syntax=apache ts=4 sw=4 sts=4 sr noet<br \/>\nAfter adding the above code, save the file and restart the Apache service.<br \/>\nYou should now be able to browse to your load balancer and see the Pentaho User<br \/>\nConsole, for example:<\/p>\n<p><strong>Screenshot of Load Balancing:<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1826\" src=\"https:\/\/tenthplanet.in\/blogs\/wp-content\/uploads\/sites\/21\/2019\/06\/lb-300x185.png\" alt=\"\" width=\"508\" height=\"313\" title=\"\" srcset=\"https:\/\/tenthplanet.in\/blogs\/wp-content\/uploads\/sites\/21\/2019\/06\/lb-300x185.png 300w, https:\/\/tenthplanet.in\/blogs\/wp-content\/uploads\/sites\/21\/2019\/06\/lb-1024x630.png 1024w, https:\/\/tenthplanet.in\/blogs\/wp-content\/uploads\/sites\/21\/2019\/06\/lb-768x472.png 768w, https:\/\/tenthplanet.in\/blogs\/wp-content\/uploads\/sites\/21\/2019\/06\/lb.png 1369w\" sizes=\"auto, (max-width: 508px) 100vw, 508px\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1825\" src=\"https:\/\/tenthplanet.in\/blogs\/wp-content\/uploads\/sites\/21\/2019\/06\/lb_edited_1-300x185.png\" alt=\"\" width=\"499\" height=\"308\" title=\"\" srcset=\"https:\/\/tenthplanet.in\/blogs\/wp-content\/uploads\/sites\/21\/2019\/06\/lb_edited_1-300x185.png 300w, https:\/\/tenthplanet.in\/blogs\/wp-content\/uploads\/sites\/21\/2019\/06\/lb_edited_1-1024x631.png 1024w, https:\/\/tenthplanet.in\/blogs\/wp-content\/uploads\/sites\/21\/2019\/06\/lb_edited_1-768x473.png 768w, https:\/\/tenthplanet.in\/blogs\/wp-content\/uploads\/sites\/21\/2019\/06\/lb_edited_1.png 1364w\" sizes=\"auto, (max-width: 499px) 100vw, 499px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Clustering and Loadbalancing PBA with standalone postgres and Apache web service<\/p>\n","protected":false},"author":23,"featured_media":1870,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[424],"tags":[527,528,447,529],"class_list":["post-1823","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pentaho","tag-high-availability-and-pentaho","tag-loadbalancing","tag-pentaho-clustering","tag-pentaho-load-balancing"],"_links":{"self":[{"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/posts\/1823","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/users\/23"}],"replies":[{"embeddable":true,"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/comments?post=1823"}],"version-history":[{"count":1,"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/posts\/1823\/revisions"}],"predecessor-version":[{"id":11436,"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/posts\/1823\/revisions\/11436"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/media\/1870"}],"wp:attachment":[{"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/media?parent=1823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/categories?post=1823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tenthplanet.in\/blogs\/wp-json\/wp\/v2\/tags?post=1823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}