...
Download and install the MySQL Server.
Download the MySQL JDBC driver.
Download and unzip the WSO2 EI binary distribution.
Tip Throughout this guide,
<EI_HOME>
refers to the extracted directory of the WSO2 EI product distribution.- Unzip the downloaded MySQL driver, and copy the MySQL JDBC driver JAR (
mysql-connector-java-x.x.xx-bin.jar
) to the<EI_HOME>/lib/
directory of both the WSO2 EI nodes. Add the following line to the
/etc/hosts
file to define the hostname for configuring permissions for the new database:<MYSQL-DB-SERVER-IP> carbondb.mysql-wso2.com
Note Do this step only if your database is not on your local machine and on a separate server.
- Execute the following command in a terminal/command window, where username is the username you want to use to access the databases:
mysql -u username -p
When prompted, specify the password to access the databases.
Create the databases using the following commands:
Code Block language sql mysql> create database WSO2_USER_DB; mysql> use WSO2_USER_DB; mysql> source <EI_HOME>/dbscripts/mysql.sql; mysql> grant all on WSO2_USER_DB.* TO regadmin@"carbondb.mysql-wso2.com" identified by "regadmin"; mysql> create database REGISTRY_DB; mysql> use REGISTRY_DB; mysql> source <EI_HOME>/dbscripts/mysql.sql; mysql> grant all on REGISTRY_DB.* TO regadmin@"carbondb.mysql-wso2.com" identified by "regadmin"; mysql> create database REGISTRY_LOCAL1; mysql> use REGISTRY_LOCAL1; mysql> source <EI_HOME>/dbscripts/mysql.sql; mysql> grant all on REGISTRY_LOCAL1.* TO regadmin@"carbondb.mysql-wso2.com" identified by "regadmin"; mysql> create database REGISTRY_LOCAL2; mysql> use REGISTRY_LOCAL2; mysql> source <EI_HOME>/dbscripts/mysql.sql; mysql> grant all on REGISTRY_LOCAL2.* TO regadmin@"carbondb.mysql-wso2.com" identified by "regadmin";
Info title About using MySQL in different operating systems For users of Microsoft Windows, when creating the database in MySQL, it is important to specify the character set as latin1. Failure to do this may result in an error (error code: 1709) when starting your cluster. This error occurs in certain versions of MySQL (5.6.x) and is related to the UTF-8 encoding. MySQL originally used the latin1 character set by default, which stored characters in a 2-byte sequence. However, in recent versions, MySQL defaults to UTF-8 to be friendlier to international users. Hence, you must use latin1 as the character set as indicated below in the database creation commands to avoid this problem. Note that this may result in issues with non-latin characters (like Hebrew, Japanese, etc.). The following is how your database creation command should look.
mysql> create database <DATABASE_NAME> character set latin1;
For users of other operating systems, the standard database creation commands will suffice. For these operating systems, the following is how your database creation command should look.
mysql> create database <DATABASE_NAME>;
Create and configure the
MB_DB
database, which is specific to the message broker profile using the following commands:Tip Note that
<EI_HOME>
, username, username and password are and password are the same as those you specified in the previous steps.Code Block language sql mysql> create database wso2_mb; mysql> use wso2_mb; mysql> source <EI_HOME>/wso2/broker/dbscripts/mb-store/mysql-mb.sql; mysql> grant all on wso2_mb.* TO regadmin@"carbondb.mysql-wso2.com" identified by "regadmin";
...
Follow the steps below to test the cluster.
Navigate to to
<EI_HOME>/bin/
via the terminal and start the Message broker profile:Panel borderColor #542989 bgColor #ffffff borderWidth 1 Localtabgroup Localtab active true title On MacOS/Linux/CentOS Open a terminal and execute the following command:
Code Block wso2ei-6.4.0-broker
Localtab title On Windows Go to Start Menu -> Programs -> WSO2 -> Enterprise Integrator 6.4.0 Broker. This will open a terminal and start the Message Broker profile. Check for ‘
member joined
’ log messages in all consoles.Info title Additional information on logs and new nodes When you terminate one node, all nodes identify that the node has left the cluster. The same applies when a new node joins the cluster. If you want to add another new node, copy existing node without any changes if you are running it on a new server (such as xxx.xxx.xxx.184). If you intend to use the new node on a server where another WSO2 product is running, use a copy of node and change the port offset accordingly in the
<EI_HOME>/wso2/broker/conf/carbon.xml
file. You also have to changelocalMemberPort
in the<EI_HOME>/wso2/broker/conf/axis2/axis2.
xml file if that product has clustering enabled. Also, map all hostnames to the relevant IP addresses when creating a new node. The log messages indicate if the new node joins the cluster.- Access the Management Console through the LB using the following URL:
https://xxx.xxx.xxx.xx2:443/carbon
- Sign into the management console using
admin
as the username and password. - Click Node List.
You see that the 2 nodes are up and running successfully. The message store health needs to be Healthy and only one node can be the Coordinator Node.
...