Applicare Standalone Agent cluster configuration

Needs internet access

This article links to 2 files hosted online. To install on a host without internet access, download them beforehand on a connected machine.

Community post

Shared by the Applicare community. It has not been re-checked against Applicare 10.0, so confirm the steps in your environment or contact Support.

Configuration in Apache

For Windows

Use the below link to Download Apache. After download extract it to a new directory.

https://www.apachelounge.com/download/

[Screenshot 1 is not available on this page.]

For Linux

Use the below link to Download Apache

http://httpd.apache.org/docs/2.4/install.html

[Screenshot 2 is not available on this page.]

Follow the below steps after installing the Apache

1. Create the “workers.properties” file inside the "conf" folder in Apache and add the below configuration.

[Screenshot 3 is not available on this page.]

Syntax:

worker.list=balancer

worker.<workername>.type=ajp13 <This is the apache Jserv Protocol type> worker.<workername>.host=<agent_ipaddress> worker.<workername>.port=<agent_ajp_port>

worker.balancer.type=lb worker.balancer.balance_workers=<workername>

worker.list=jkstatus worker.jkstatus.type=status

Specify the <workername>, <agent_ipaddress> and <agent_ajp_port> correctly.

Example configuration for two agents

worker.list=balancer

worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=9809

worker.worker2.type=ajp13 worker.worker2.host=localhost worker.worker2.port=9810

worker.balancer.type=lb worker.balancer.balance_workers=worker1,worker2

worker.list=jkstatus worker.jkstatus.type=status

[Screenshot 4 is not available on this page.]

2. Download the "mod_jk.so".

For Windows

Use the below link to download the files based on the Apache version and place it inside the modules folder.

Apache 2.4.x 32 bit

https://arc-temp.s3.amazonaws.com/mod_jk/httpd-2.4.x_32_bit/mod_jk.so

Apache 2.4.x 64 bit

https://arc-temp.s3.amazonaws.com/mod_jk/httpd-2.4.x_64_bit/mod_jk.so

[Screenshot 5 is not available on this page.]

For Linux:

Use the below link to download the latest tomcat connectors http://tomcat.apache.org/download-connectors.cgi

[Screenshot 6 is not available on this page.]

To install mod_jk

[Screenshot 7 is not available on this page.]

3. Edit the “httpd.conf” file in Apache and add the below configuration at the end of the file.

[Screenshot 8 is not available on this page.]

Configuration

LoadModule jk_module modules/mod_jk.so <IfModule jk_module> JkWorkersFile conf/workers.properties JkLogFile logs/mod_jk.log JkLogLevel info JkShmFile logs/jk-runtime-status JkMount /jk-status jkstatus JkMount /applicare_agent/* balancer </IfModule>

[Screenshot 9 is not available on this page.]

4. Open command prompt and go to the “bin” directory and execute the "httpd -t" command. If the added configurations are correct it will display "Syntax OK" message.

Command: httpd -t

[Screenshot 10 is not available on this page.]

This warning message will be displayed only if the serverName is not available in the "httpd.conf" file. It is not related with load balancing configuration. So you can ignore that.

If you would like to fix the warning message follow the below steps

  • Edit the "httpd.conf" file and search for "ServerName".

[Screenshot 11 is not available on this page.]

  • Add the ServerName. In the ServerName field you can either specify the domain name or machine ip or localhost.

[Screenshot 12 is not available on this page.]

5. Start Apache as a service.

Open the command prompt in Administrator mode and go to the Apache bin directory and execute the below commands.

For Windows

Command: httpd.exe -k install

Go to windows services and start the Apache service.

[Screenshot 13 is not available on this page.]

[Screenshot 14 is not available on this page.]

For Linux:

Command: service httpd start

6. Use the below URL to check the worker status.

Syntax:

http://<apacheIp>:<apacheport>/jk-status

Example:

http://localhost:81/jk-status

[Screenshot 15 is not available on this page.]

Configuration in Tomcat

Non Sticky

  • It will redirect the request to all the servers randomly in the Round Robin mode.
  • No changes needed in the agent server.xml files.

Sticky

  • All the requests from the same client are sent to the same server.
  • For this add the “jvmRoute” name inside the Engine tag in the "server.xml" file.

Configuration in 1st agent (server.xml)

1. Open the server.xml file in the server folder and Search for “Engine name” inside the server.xml file.

[Screenshot 16 is not available on this page.]

2. Add the “jvmRoute” name inside the Engine tag. So, the above line will be

<Engine name="Catalina" defaultHost="localhost**" jvmRoute="worker1"**>

[Screenshot 17 is not available on this page.]

3. Start the Agent.

Configuration in 2nd agent (server.xml)

Note:

  1. If the agents are running in the same machine then server shutdown, connector Http and connector AJP and redirect ports need to be changed. While changing the ports assign the open ports.
  2. If the agents are running in different machines no need to change any port.

For Agents running in same machine.

1. Change the ports of server shutdown, connector Http and connector AJP and redirect ports. Assign the open ports.

Example:

<Server port="**9806**" shutdown="SHUTDOWN">

[Screenshot 18 is not available on this page.]

<Connector port="**9881**" protocol="HTTP/1.1"
           connectionTimeout="20000"

           redirectPort="**8845**" />

[Screenshot 19 is not available on this page.]

<Connector port="**9810**" protocol="AJP/1.3" redirectPort="**8845**" />

[Screenshot 20 is not available on this page.]

2. Open the server.xml file in the server folder and Search for “Engine name” inside the server.xml file.

[Screenshot 21 is not available on this page.]

3. Add the “jvmRoute” name inside the Engine tag. So, the above line will be

<Engine name="Catalina" defaultHost="localhost**" jvmRoute="worker2"**>

[Screenshot 22 is not available on this page.]

4. Start the Agent.

For Agents running in different machine:

1. Open the server.xml file in the server folder and Search for “Engine name” inside the server.xml file.

[Screenshot 23 is not available on this page.]

2. Add the “jvmRoute” name inside the Engine tag. So, the above line will be

<Engine name="Catalina" defaultHost="localhost**" jvmRoute="worker2"**>

[Screenshot 24 is not available on this page.]

3. Start the Agent.

Configuration in Applicare Console

1. Go to Applicare Advanced Options menu.

[Screenshot 25 is not available on this page.]

2. Enable "Push" option in the Txn data persistence and add the Apache server url in the Txn data persistence url. Now the agent will post the data to the specified url.

Syntax:

http://<apacheIp>:<apacheport>/applicare_agent

Example:

http://localhost:81/applicare\_agent

[Screenshot 26 is not available on this page.]

3. These Changes take affect on Restart of Agent.

Join the discussion

Comments, voting and following are kept by Zendesk and need a Help Center account. This button opens the original discussion there.

Opens Zendesk · needs internet and sign-in

Still stuck? Contact support