Setting up and configuring a JReport Server Cluster

Before setting up a JReport Server Cluster, first you need to make the time difference between the target computers that will join the cluster as small as possible (the time difference between the target computers should be within one minute), and make sure all servers in the cluster will be set up on the same architecture and operating system.

A JReport Server Cluster can be set up either during the JReport Server installation or after the servers have been installed using the appropriate license key for cluster.

Creating a JReport Server Cluster during installation

It is recommended that you create a JReport Server Cluster during the installation of servers. This is the easiest way for you to set up a cluster.

To create a JReport Server Cluster during installation:

  1. Run the JReport Server installation file to install JReport Server with the Installation Wizard.
  2. Specifies your User ID. In the License Key text field, use the cluster enabled license key.
  3. When choosing the installation type, choose Custom Installation for Standalone Server. Then specify the installation directory for JReport Server.
  4. In the Service tab of the Configure System Environment screen, check the Network Address At option and type in the IP address of the server.
  5. In the Cluster tab, specify a cluster name in the Cluster Name text field. You can either make the server join an existing cluster or specify a new cluster name to build another cluster.
  6. Uncheck the Disable Cluster option.
  7. From the Load Balancer Type drop-down list, select the algorithm for load balancing clustered servers.
  8. Check the Cluster Scheduler Lease option to enable lease for the cluster, then set the active count, valid time and check interval for the cluster scheduler lease. If you don't enable the lease option, all clustered servers in the cluster will compete for a chance to trigger scheduled tasks which could lower overall system throughput. Read main features for additional information.
  9. Specify values for Cluster Storage History Number of Copies, Cluster Storage Realm Number of Copies and Cluster Storage CRD Result Number of Copies. If you are using shared disk resources for any of these directories you should set the value to 1. The default value is 2 which means make one copy plus the original. This allows any one node to go down and the system will still be able to find all resources. If you want to allow 2 simultaneous failures, set the number of copies to 3.
  10. Specify the value for Cluster Memory Storage Number of Copies to set how many memory copies will be shared in the cluster.
  11. Check Notify via E-mail When a Server Is Down if you need to notify somebody via e-mail when a server in the cluster is down, then in the E-mail Address text field, input the e-mail addresses of the people to whom you want to send a notification e-mail.
  12. Set the Properties, Realm, Resource, History, and Temporary Directories if necessary. If they are not specified, default directories will be used.
  13. Type the IP address or host name of the server in the Server's RMI Host text field, and type the port number in the Server's RMI Port text field.
  14. Go on with the installation steps to complete the installation.
  15. Install another server you want to join the cluster and repeat the above steps to configure its cluster settings.

    Since JReport Cluster uses the same server DBMS, you need to make the system database in the JDBC URL text field point to the same DBMS as the previous server. This requires that you replace localhost with the IP address of the first cluster node that you installed, for example, jdbc:derby://IP:1527/.

Creating a JReport Server Cluster after installation

After the servers have been installed using the appropriate license key for cluster, you can configure the clustered servers either by using the JReport Administration page or the server.properties and dbconfig.xml files.

Using the JReport Administration page
  1. Start up the server that hasn't been enabled for cluster.
  2. Log onto the JReport Administration page, and click Cluster > Configuration on the system toolbar to show the panel.
  3. In the Cluster Name text field, specify a name for the cluster. You can either make the server join an existing cluster or specify a new cluster name to build another cluster.
  4. Check the Enable Cluster option.
  5. Click Save to enable the cluster.
  6. A cluster member ID will be generated automatically for the server. But if you need to modify it, go to server.properties file located in <install_root>\bin and set the property cluster.member.id.
  7. Go to the JReport Administration > Data page, configure the databases to make sure they point to the database that the server will use. For details, see Configuring the server database.
  8. Restart the server you have enabled with cluster, then log onto the JReport Administration page, go to the Cluster > Configuration panel. See the panel.

  9. From the Load Balancer Type drop-down list, select the algorithm for load balancing clustered servers.
  10. To enable lease for the cluster, check the Cluster Scheduler Lease option and set the active count, valid time and check interval of the cluster scheduler lease respectively.
  11. Specify values for Cluster Storage History Number of Copies, Cluster Storage Realm Number of Copies, Cluster Storage CRD Result Number of Copies and Cluster Memory Storage Number of Copies.
  12. Check Notify via E-mail When a Server Is Down if you need to notify somebody via e-mail when a server in the cluster is down, then in the E-mail Address text field, input the e-mail addresses of the people to whom you want to send a notification e-mail.
  13. Set the Properties, Realm, Resource, History, and Temporary Directories if necessary. If they are not specified, default directories will be used.
  14. In the Server's RMI Host text field, type the RMI IP address or host name of the clustered server.
  15. In the Server's RMI Port text field, type the RMI port number of the clustered server.
  16. Shut down the server.
  17. Start up another server you want to join the cluster and repeat the above steps to configure its cluster settings.

See also Cluster dialog for details about the cluster configuration options.

Using the server.properties and dbconfig.xml files

To set up a JReport Server Cluster using the server.properties and dbconfig.xml files, you need to modify the server.properties file on each JReport Server. The process uses the following procedures:

  1. In the server.properties file located in <install_root>\bin of each server, set the property cluster.enabled=true.
  2. Modify cluster.name in any server's server.properties file to specify the cluster name. If not specified, it will take jreport-cluster as the default name.
  3. In the server.properties file of each clustered server, modify the properties file as follows:
  4. Specify the paths of the directories on the physical disk, such as properties directory, realm directory, resource root, history directory, and temporary files directory. The directories on each clustered server should point to a different physical disk.

    Add the following properties to the server.properties file:

  5. Modify dbconfig.xml in each server's <install_root>\bin, and make sure that the system database and realm database all server nodes use point to the same DBMS. For details, see Configuring the server database.

Notes: