BackPrevious Page Next PageNext

Setting Up and Configuring a JReport Server Cluster

Creating a JReport Server Cluster during installation

Creating a JReport Server Cluster after installation

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.

  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.

    Installation - Service tab

  5. Click 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 at the bottom.

    Installation - Cluster tab

  7. From the Load Balancer Type drop-down list, select the built-in algorithm for load balancing clustered servers: Min-load, Round Robin, Weighted Min-load, or Random.
  8. Check the Cluster Scheduler Lease option to enable lease for the cluster, then set the active count, valid time and check interval in the following text fields for the cluster scheduler lease.

    Lease is a semaphore that enables a scheduler to be an active scheduler. If a scheduler is enabled with lease, it becomes an active scheduler and will compete to trigger the schedule. Each active scheduler can hold a lease for a period of time, which depends on the value you set in the Cluster Scheduler Lease Valid Time text field, and then transfers it to another scheduler in the cluster. If you don't enable Cluster Scheduler Lease, all clustered servers in the cluster will compete for a chance to trigger scheduled tasks which could lower overall system throughput. See main features for additional information.

  9. In the Cluster Storage History Number of Copies, Cluster Storage Realm Number of Copies and Cluster Storage CRD Result Number of Copies text fields, specify how many copies will be made in the cluster when a new file or folder is added to the history, realm and cached report data (CRD) result folders respectively. 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. In the Cluster Memory Storage Number of Copies text field, specify how many memory copies will be shared in the cluster. The property value should be a positive integer and the default value is 2. If there are quite a few clustered servers in a JReport cluster, sharing memory in all cluster nodes would increase the network load exceedingly which may lead to poor server performance and scalability.
  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. In the following text fields, specify the corresponding directories if necessary. If they are not set, the default directories will be used.
  13. In the Server's RMI Host text field, type the RMI IP address or host name of the clustered server which can be accessed by other servers that will join the cluster.
  14. In the Server's RMI Port text field, type the RMI port number of the clustered server.
  15. Go on with the installation steps to complete the installation.
  16. Install other servers you want to join the cluster and repeat the above steps to configure the cluster settings. When some servers are installed on the same machine, you need to make sure they use different port numbers. For options that take effect on the cluster level such as Load Balancer Type, Cluster Scheduler Lease, cluster storage copies, e-mail notification setting, you do not need to set them repeatedly.

    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:8886/.

Creating a JReport Server Cluster after installation

After the servers have been installed using the appropriate license key for cluster, you can configure them either via the JReport Administration > Cluster page or using files to set up a cluster.

To configure a cluster via the JReport Administration > Cluster page:

  1. Start up the server that hasn't been enabled for cluster.
  2. Log onto the JReport Administration page.
  3. Click Cluster on the system toolbar and select Configuration from the drop-down menu.
  4. 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.
  5. Check the Enable Cluster option.
  6. Click Save to enable the cluster.

    A cluster member ID will be generated automatically for the server. If you need to modify it, you need to go to server.properties located in <install_root>\bin and set the property cluster.member.id. However it is strongly recommended that you do not change the auto generated cluster member ID in a JReport cluster, because distributed storage uses the member ID to recognize on which clustered server the physical files are stored.

  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.
  9. Click Cluster > Configuration on the system toolbar to open the Cluster - Configuration page.

    Cluster - Configuration page

  10. Configure the server as described from step 7 to 14 in the above procedure.
  11. Shut down the server.
  12. Start up another server you want to join the cluster and repeat the above steps to configure its cluster settings. If the servers are on the same machine you need to make sure they use different port numbers. For options that take effect on the cluster level such as Load Balancer Type, Cluster Scheduler Lease, cluster storage copies, e-mail notification setting, you do not need to set them repeatedly.

To set up a cluster using files:

  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 server modify the two properties:
  4. Modify dbconfig.xml saved in <install_root>\bin for each server. Make sure that the system database and realm database all servers in the cluster use point to the same DBMS.

Notes:

BackPrevious Page Next PageNext