Like what you see? Have a play with our trial version.

Error rendering macro 'rw-search'

null

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleModifications to web.xml for LEGACY mode

 

The following servlet definition needs to be added to the web.xml on each node:

 

<!-- Cluster Management -->

<servlet>
      <servlet-name>ClusterManagement</servlet-name>
      <servlet-class>com.hof.mi.servlet.ClusterManagement</servlet-class>
      <init-param>
            <param-name>ServiceUser</param-name>
            <param-value>admin@yellowfin.com.au</param-value>
      </init-param>
      <init-param>
            <param-name>ServicePassword</param-name>
            <param-value>test</param-value>
      </init-param>
      <init-param>
            <param-name>ServiceAddress</param-name>
            <param-value>/services/AdministrationService</param-value>
      </init-param>
      <init-param>
            <param-name>ServicePort</param-name>
            <param-value>80</param-value>
      </init-param>
      <init-param>
            <param-name>ClusterHosts</param-name>
            <param-value>
                  192.168.4.184
            </param-value>
      </init-param>
      <init-param>
            <param-name>SerialiseWebserviceSessions</param-name>
            <param-value>true</param-value>
      </init-param>
      <init-param>
            <param-name>CheckSumRows</param-name>
            <param-value>true</param-value>
      </init-param>
      <init-param>
            <param-name>EncryptSessionId</param-name>
            <param-value>true</param-value>
      </init-param>
      <init-param>
            <param-name>EncryptSessionData</param-name>
            <param-value>true</param-value>
      </init-param>
      <load-on-startup>11</load-on-startup>
</servlet>

 

 

 

Web.xml File Parameters

The following properties outline the options in the ClusterManagement servlet definition.

 

Property

Value

ClusterType

Either DYNAMIC or LEGACY. DYNAMIC will use multicast messaging and automatically find other nodes in the cluster. LEGACY is the default, and will use web services to communicate with a defined list of cluster nodes.

BroadcastConfiguration

A JGroups configuration file. This allows for a custom Jgroups configuration to be used in environments where multicast networking is not available. This is for DYNAMIC mode only and is optional. By default, JGroups will use the configuration defined in udp.xml.

ServiceUser

User that will validate the web service connection to other nodes. For LEGACY mode only.

ServicePassword

Password for the ServiceUser. For LEGACY mode only.

ServicePasswordEncrypted

True/False.
Is the contents of the ServicePassword encrypted.

ServiceAddress

Address of the Yellowfin web service. For LEGACY mode only.

ServicePort

Port on which Yellowfin is running. For LEGACY mode only.

ClusterHosts

This is a comma-separated list of all nodes in the Cluster. These can include IP addresses or hostnames. For LEGACY mode only.

SerialiseWebserviceSessions

True/False.

This is required if using Single Sign-On on the Cluster. It can serialise tokens to the database so that the token can be accessed from any node.

CheckSumRows

True/False.

Security option to check sum the serialised web service session records in the database. This helps prevent modification to the table which could lead to the creation of unauthorised sessions in Yellowfin.

EncryptSessionId

True/False.

Security option to encrypt the serialised web service session id in the database. This helps prevent modification to the table which could lead to the creation of unauthorised sessions in Yellowfin.

EncryptSessionData

True/False.

Security option to encrypt the serialised web service session records in the database. This helps prevent modification to the table which could lead to the creation of unauthorised sessions in Yellowfin.

AutoTaskDelegation

True/False.
This is for DYNAMIC mode only and is optional.

When enabled, the Cluster will automatically assign a node to perform background tasks. When this is turned on, you do not need to manually configure a node to run background tasks. Yellowfin will turn off System Tasks on a node at start-up if another node is already delegated to perform this task.

 

SessionReplication

True/False.

Set this to true if container level Session Replication is enabled. This will modify the logic used for destroying sessions in a cluster.

RepositoryDiscovery

True/False

This option is for DYNAMIC mode only. This enables RepositoryDiscovery on builds prior to the REPOSITORY mode being supported. REPOSITORY mode is an alias for DYNAMIC mode with RepositoryDiscovery enabled.

 

Additional Parameters

Under some circumstances DYNAMIC mode may not work in some environments. This will usually be due to the networking configuration on the server. By default, JGroups will use IPv6 if it is available. IPv4 can be forced, which may allow for it to work correctly. Add the following to catalina.sh/catalina.bat file:

 

Catalina.sh

JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true"

  

Catalina.bat

set JAVA_OPTS=%JAVA_OPTS% -Djava.net.preferIPv4Stack=true

  

When using the default Jgroups configuration (udp.xml), the multicast address and port can also be configured.  This may help in environments where cluster nodes are not discovering each other.

 

Catalina.sh

JAVA_OPTS="$JAVA_OPTS -Djgroups.udp.mcast_addr=228.0.0.5 -Djgroups.udp.mcast_port=47885"

  

Catalina.bat

set JAVA_OPTS=%JAVA_OPTS% -Djgroups.udp.mcast_addr=228.0.0.5 -Djgroups.udp.mcast_port=47885

 

 

Background Tasks

Each Yellowfin node will be configured by default to run background tasks, which includes the broadcasting of reports. This potentially could send reports multiple times to end users. Because of this it is recommended that background tasks be enabled on one node only.

 

1.     System Tasks

Disable the background system tasks by removing (or commenting-out) the following XML block from the web.xml. This will disable system tasks, like Group Flattening, LDAP synchronization, Event Archiving, Document Cleanup and Average Run time calculations.

 

<servlet>
      <servlet-name>SystemTaskManager</servlet-name>
      <servlet-class>com.hof.servlet.SystemTaskManager</servlet-class>
      <load-on-startup>8</load-on-startup>
</servlet>

 

2.     Task Scheduler

Disable the task scheduler by adding the following to the web.xml file, inside the MIStartup Servlet block.

This will disable all tasks visible in the Task Schedule menu within the Yellowfin interface. This includes broadcasting, populating cached filters, scheduled reports and populating cached views.

 

<init-param>
        <param-name>DisableTaskScheduler</param-name>
        <param-value>TRUE</param-value>
</init-param>

 

3.     Dynamic Delegation

In DYNAMIC and REPOSITORY modes, delegation of background tasks can be done dynamically. If a node running background tasks fails, tasks will be delegated to another node.

 

<init-param>
        <param-name>AutoTaskDelegation</param-name>
        <param-value>TRUE</param-value>
</init-param>

 

 

Container Level Session Replication

Container Level Session Replication allows Yellowfin to be deployed in a fail-safe environment where in the event of a node in the cluster failing, a currently connected Yellowfin user can continue their session on another node. This is achieved with Session Replication at the Application Server level, and is not a function of Yellowfin itself, and hence is not a supported component of Yellowfin. This configuration also requires a load-balancer to evenly distribute incoming requests to different cluster nodes, which will not be addressed in this guide.

 

Different Application Servers may have different ways of implementing this functionality. This example is shown using Tomcat, which is shipped with Yellowfin.

Setting up session replication consists of the following steps:

  1. Modifications to web.xml
  2. Modifications to server.xml
  3. Modifications to ROOT.xml

 

More information regarding Tomcat Session Replication can be found at http://tomcat.apache.org

 

Caveats

There are several caveats to using Session Replication with Yellowfin (or any Java web application). The two main downsides of Session Replication are processing overhead, and memory usage.

There is additional processing overhead in replicating each session to all nodes in the cluster. This happens after each HTTP request, and by default, only the changed session elements are copied to other nodes. This means all nodes will be doing additional work each time a user does something on any connected node.

The function of Session Replication is to replicate a user's memory footprint on the server, to all nodes in the cluster. This means the sessions for all users in the cluster will be stored on each node, taking up additional memory. Expanding the cluster with additional nodes is then restricted by the amount of memory that each node has.

It should be considered if this overhead is worth the added fail-safe functionality that it brings. If Session Replication is not used, and a node fails, a user’s session will be destroyed, but they'll be able to log in to another node to continue their work. 

 

Modifications to web.xml

The text “<distributable/>” needs to be added to the web.xml file on each node underneath the “<webapp>” line.

<web-app>

      <distributable/>

      <!-- System Event and Debug classes -->

      <listener>
            <listener-class>com.hof.servlet.SysSessionListener</listener-class>
      </listener>
                        

 

Modifications to server.xml

Changes need to be made to the server.xml file in the Yellowfin/appserver/conf directory.

Add the additional XML entry within the “<host>” XML block.

 

Add:

 <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>

 

The IP address “228.0.0.4” is a multicast address that session replication messages will be received on. This does not need to be modified, but a linux/unix server may need to register a valid multicast route to receive broadcasts on this address. This can be done by running the following command on the console:

sudo route add -net 224.0.0.0 netmask 224.0.0.0 dev eth0

 

This syntax may be different for different flavours of linux / unix. This example uses “eth0” as the network device that will be used for this route.

 

Modifications to ROOT.xml

Remove the lines from the ROOT.xml in the Yellowfin/appserver/conf/Catalina/localhost directory:

 

<Manager className="org.apache.catalina.session.PersistentManager" debug="0" distributable="false" saveOnRestart="false">
      <Store className="org.apache.catalina.session.FileStore" />
</Manager>

 

These lines were previously added to suppress session serialisation to disk in Yellowfin.

 

Additional Information

The Session Replication functionality in Tomcat may change in different versions or subversions. If the process outlined here is not working, check the Tomcat website for updated documentation for the version of Tomcat that Yellowfin is running on.