Clustering Jedox with Two Machines

image_pdfimage_print

This article describes how to cluster Jedox components across two machines:

  • Machine 1 running OLAP (In-Memory DB) and Tomcat (Integrator and RPC services)
  • Machine 2 running Apache (Web UI service) and Core (Spreadsheet Server)

Before starting, you should prepare a location, such as a network drive, where stateful information can be saved (such as storage, reports, databases, and logs). Keep in mind that using a network drive requires the services to run under a user with network access.

To make a simple, recognizable example, we’ll use these IP addresses in the configuration to symbolize the correct server:

  • 10.0.0.1 for Machine 1 running OLAP and Tomcat
  • 10.0.0.2 for Machine 2 running Apache and Core

Setting up multiple machines involves making changes to the Jedox configuration files palo.ini, server.xml, rpc.properties, etl-mngr.properties, httpd.conf, config.php, and palo_config.xml. These files can be found in the following locations:

File name Component Linux path Windows path
palo.ini OLAP <Jedox Path>/ps/Data/palo.ini <Jedox Path>\palo\data\palo.ini
server.xml TOMCAT Integrator <Jedox Path>/ps/tomcat-etl/conf/server.xml <Jedox Path>\tomcat\conf\server.xml
server.xml TOMCAT RPC <Jedox Path>/ps/tomcat-rpc/conf/server.xml NA
rpc.properties TOMCAT RPC <Jedox Path>/tomcat-rpc/webapps/rpc/WEB-INF/classes/rpc.properties <Jedox Path>\tomcat\webapps\rpc\WEB-INF\classes\rpc.properties
rpc.properties TOMCAT RPC <Jedox Path>/tomcat-rpc/webapps/hlbrowser/WEB-INF/classes/rpc.properties <Jedox Path>\tomcat\webapps\hlbrowser\WEB-INF\classes\rpc.properties
etl-mngr.properties TOMCAT RPC <Jedox Path>/tomcat-rpc/webapps/hlbrowser/WEB-INF/classes/etl-mngr.properties <Jedox Path>\tomcat\webapps\rpc\WEB-INF\classes\etl-mngr.properties
httpd.conf APACHE <Jedox Path>/ps/etc/httpd/conf/httpd.conf <Jedox Path>\httpd\conf\httpd.conf
config.php APACHE <Jedox Path>/ps/httpd/app/etc/config.php <Jedox Path>\httpd\app\etc\config.php
config.xml
CORE <Jedox Path>/ps/core-Linux-x86_64/etc/config.xml <Jedox Path>\core\config.xml
palo_config.xml CORE <Jedox Path>/ps/core-Linux-x86_64/etc/palo_config.xml <Jedox Path>\core\palo_config.xml
ui_backend_config.xml CORE <Jedox Path>/ps/core-Linux-x86_64/etc/ui_backend_config.xml <Jedox Path>\core\ui_backend_config.xml
Installing Jedox software

First, install the complete Jedox Suite on both of the machines. This step is necessary, because several components (including Tomcat) will need files from other Jedox services.

Ensure that communication is not blocked through a firewall.

Standard ports are 7777, 7778, 80, 443, 8193, 7775, 7776, 8010, 8443

OLAP: 7777, 7778
Apache: 80, 443
Core: 8193
Tomcat: 7775, 7776,8010, 8443

Important!

Make a note of the following definitions from the config.php file on Machine 1. You will need them to set up the other machine, as noted in red in the steps that follow.

Note that CFG_SECRET and CFG_PALO_PASS are randomly generated during the setup process. You need to copy the strings generated for Machine 1 to the other machine in the cluster.

The parameters below are just examples and will differ from your instance.

define('CFG_SECRET', '1234567890123456');
define('CFG_PALO_HOST', '10.0.0.1');
define('CFG_PALO_PORT', '7777');
define('CFG_PALO_PASS', ' a 123456789012345678901234567890123456789012==');

Important: do not make any further changes to the settings on the OLAP machine! Just copy them to the config.php of the other machine.

Configure Machine 1 (OLAP & Tomcat)

Configuring OLAP on Machine 1
  1. In palo.ini, change the http interface, e.g. 127.0.0.1, to all interfaces. This step allows OLAP to listen on the external interface and to be accessible to the Web Host.
    For our example, you would change
    http "127.0.0.1" 7777
    to:
    http "" 7777

    Note: the Supervision Server is running as a subprocess of OLAP; therefore it’s not necessary to change the port address for that.

Configuring Tomcat on Machine 1 (Windows & Linux)
  1. In server.xml, change the address for HTTP to 0.0.0.0. This allows Tomcat to be visible from the outside and to listen to all interfaces.
    For our example, you would change
    <Connector port="7775" address="127.0.0.1" connectionTimeout="20000" protocol="HTTP/1.1" redirectPort="8443" />
    to:
    <Connector port="7775" address="0.0.0.0" connectionTimeout="20000" protocol="HTTP/1.1" redirectPort="8443" />
Configuring Tomcat RPC on Machine 1
  1. In server.xml, change the address for HTTP and AJP to 0.0.0.0. This allows Tomcat to be visible from the outside and to listen to all interfaces.
    For our example, you would change
    <Connector port="7776" address="127.0.0.1" connectionTimeout="20000" protocol="HTTP/1.1" redirectPort="8443" />
    <Connector port="8010" protocol="AJP/1.3" address="127.0.0.1" />
    to:
    <Connector port="7776" address="0.0.0.0" connectionTimeout="20000" protocol="HTTP/1.1" redirectPort="8443" />
    <Connector port="8010" protocol="AJP/1.3" address="0.0.0.0" />
  2. In rpc.properties.xml, change the address for web.url and sss.url to the Machine 2 (Apache) host. Note: this change is optional with a 2-machine cluster.
    For our example, you would change
    web.url=http://127.0.0.1:80
    web.url_from_hdr=false
    to
    web.url=http://10.0.0.2
    web.url_from_hdr=true

    and change

    sss.url=http://127.0.0.1:80/ub
    sss.url_from_hdr=false
    to
    sss.url=http://10.0.0.2/ub

    sss.url_from_hdr=true

Check Administration Connections

In Jedox Web, open Administration→Connections and make sure the connections point to the IP/DNS of Machine 1 (OLAP) host, not localhost. In the example below, the host machine is specified as machine1, not 127.0.0.1 (localhost IP).

Configure Machine 2 (Apache & Core)

Configuring Apache Components on Machine 2
  1. In httpd.conf, set Apache to communicate with the other machine instead of localhost.
    For example, if the Tomcat RPC host is at 10.0.0.1, you would change
    Define JDX_HOST_TC_AJP "127.0.0.1"
    to:
    Define JDX_HOST_TC_AJP "10.0.0.1"

    Then change JDX_SERVER_IP to Apache
    Define JDX_SERVER_IP 10.0.0.2

    Activate the header handling so it can send header information to the other server.
    Change the following lines from
    #Define JDX_HEADER
    to:
    Define JDX_HEADER

    Adjust the address of these lines from:
    RequestHeader set X-JDX-Web-URL "http://127.0.0.1:80"
    RequestHeader set X-JDX-SSS-URL "http://127.0.0.1:80/ub"
    to the IP/DNS of the Apache host:
    RequestHeader set X-JDX-Web-URL "http://10.0.0.2:80"
    RequestHeader set X-JDX-SSS-URL "http://10.0.0.2:80/ub"

    Adjust the address in the proxy for AJP calls, which will forward communication to the RPC servlet.
    ProxyPass /tc/ws/ ws://10.0.0.1:${JDX_PORT_TC}/
    ProxyPassReverse /tc/ws/ ws://10.0.0.1:${JDX_PORT_TC}/

    This will forward communication to the CORE servlet.

    BalancerMember ajp://10.0.0.2:${JDX_PORT_SSS} retry=0 loadfactor=50 route=node1
    ProxySet stickysession=JDX_WSS_BSID
  2. In config.php, set Apache to communicate with Machine 1 (OLAP host) instead of localhost.
    For example:
    define('CFG_PALO_HOST', '10.0.0.1');
  3. Adjust config.php to match settings of Machine 1 (OLAP host), as described in the text box above.
Configuring Core components on Machine 2:
  1. In palo_config.xml, adjust the host address, port, and secret to match the settings of Machine 1 (OLAP host), as described in the text box above.
    For example, change
    <host>127.0.0.1</host>
    to
    <host>10.0.0.1</host>
  2. Then change the secret you’ve made from Machine 1 (Olap)
    <secret>70b4e3dd9f1ffe18</secret>
    to
    <secret>123456789012345</secret>
  3. In ui_backend_config, change
    <tcp address="127.0.0.1" port="8193" />
    to
    <tcp address="10.0.0.2" port="8193" />
  4. Adjust config.php to match settings of Machine 1 (OLAP host), as described in the text box above.

Preparing the Management of Stateful Information:

Important: You need to synchronize storage and pr from Machine 1 to Machine 2 (Apache and Core), so that all web servers use the same information.

The directory paths for storage and pr are

  • Linux: <Jedox Path>/ps/storage and <Jedox Path>/ps/htdocs/app/docroot/pr
  • Windows: <Jedox Path>\storage and <Jedox Path>\httpd\app\docroot\pr

One way of doing this is by mounting these directories. Below is an example for a mount command in Linux, executed on Machine 2 (Apache & Core):

sudo mount -t cifs -o user=Administrator%Adminpass //10.0.0.1/<Jedox Path>/ps/storage /<Jedox Path>/ps/storage

In Windows, you can mount a network drive or use mklink. (follow the link for more informations)

Starting and Stopping the Service/Processes on Machines 1 & 2

After you have verified that the system is properly configured, you can start the required processes on the machines.

Linux: enter the command sudo <Jedox Path>/ps/jedox-suite.sh start service_name (e.g. apache, olap, core, tomcat-rpc, tomcat-etl).

Windows: stop all services and start only the configured service (e.g. JedoxSuiteCoreService or JedoxSuiteHttpdService).

image_pdfimage_print