Configuring and using the ColdFusion Application Manager, Server Monitor Agent
The ColdFusion Application Manager (CFAM) Server Monitoring Agent (SMA) in ColdFusion 5 Enterprise offers the server level functionality of ClusterCATS (CC) without the overhead of a cluster, more specifically, SMA offers probes, alarms and reports, but does not enable the servers to tie into one another as they would in a cluster. This capability enables the use of CC tools in server farms behind hardware load balancing devices and also on stand-alone web servers. SMA also provides an improved dynamic feedback protocol (dfp) agent for integration of Ciscos Local Director (CLD). This article describes the uses and limitations of the SMA; in two sections, it describes how to probe or monitor your web servers and application servers and it describes when and how to delegate probing tasks to various selected non-dfp enabled hardware load-balancing devices.
Frank DeRienzo
Principal Engineer
Macromedia, Inc.
The SMA is installed along with ColdFusion 5; during the installation of ColdFusion be sure to select the correct components. Under the Application Management heading, select Monitoring, Alarms, and Hardware Load Balancing. Do not select ClusterCATS load balancing or it will override the monitoring agent and you will only have a clustering option.
Note: If you are upgrading from a ColdFusion 4.5.x clustered environment, prior to upgrading you should close all ClusterCATS explorers and reset each Web server using the ClusterCATS Server Administrator prior to upgrading to ColdFusion 5 and switching to the monitoring agent.
Start > Programs > ClusterCATS Server Admin > Advanced> Reset
Note also: Upon upgrade, make sure that the virtual directory called btauxdir is created in IIS under the IIS virtual server you are monitoring and that instead of pointing to the legacy local path c:\cfusion\brighttiger\btauxdir, it points to c:\Cfusion\cfam\btauxdir or the path to which you installed CF 5 CFAM components.
After completing the installation/upgrade and rebooting your servers, launch the CF 5 Administrator on all four Web servers. You may need to replace the local host address of 127.0.0.1 with the server name in order to launch the administrator.
Start > Programs > ColdFusion 5 Administrator
Setting up Web Server and Application Server Probes:
In order to restart a stalled web server and/or a stalled application server, you must set up SMA probes. At the top of the left hand panel of the CF administration page, choose Tools. This will display the heading System Monitoring. Under System Monitoring, choose Web Servers and check the Enable box. This is the web server probe; it will restart stalled IIS, NES or Apache web servers as appropriate. The GUI for the Server Monitor Agent can be deceiving. You will see that the server is initially grayed out even after you check the enabled box, in order to correct this, you also must choose a server to monitor in the next step. Next choose System Probes and create a default probe by clicking the button New in the center screen. This will display probe properties; under the heading Failed Probe Response Settings, use the down arrow to choose the server you are managing: if you leave this set to none, then no server will be affected; both the web server probe and the application server probe will be superfluous; the former will stay grayed out and the latter will not restart any server. Check the blocks Restart the ColdFusion Server & Log that the ColdFusion Server has been Restarted. If you have a script that you would like to run upon server failure, check the box Execute Script and browse to the script you want executed. If you are using the dfp agent with a Local Director, check the box to Restrict Web traffic to the selected server. Server restriction with non-dfp enabled devices hardware load balancing devices such as BIG-IP, ACE Director, CSS, ServerIron, etc., can not be configured here; it is configured by creating a monitor or probe on the actual load balancing device.
The restriction block in the CF 5 monitoring agent probe is a dfp feature that will set the server weight on CLD to 0 if the application server becomes unavailable. Click Submit Changes and the status of both of the probes should come up green or enabled; click back on the Web Servers link and confirm the probe status as active or enabled. If it is not green, then double check the system or application probe to make certain that you chose the appropriate web server using the drop-down tab in the Failed Probe Response Settings box. If you are running multiple virtual servers, you may wish to bind the appropriate IP addresses to their corresponding virtual server in IIS rather than relying upon the all-unassigned option. As mentioned earlier, this interface can be deceiving; since the agent was built for compatibility with dfp, when it is run without a dfp enabled device the load information it provides does not drive any form of load leveling; in this case, the busy state is merely an administrative notification. In fact, when the"enabled" box is not selected/checked, the web server's status always shows up as "BUSY even though it is in a grayed out state.
Note: You may also set up custom probes to stop and restart various services. This is a rather broad topic; it is a capability without walls deserving of many articles and case studies manifesting various configurations. You may use your imagination with this feature and feel free to share your ideas on the forums.
Next, configure alarm notification. Click on Alarms and enter the SMTP address of your mail server. Under the heading Notification Recipients, enter your e-mail address and the address of anyone who should receive alarms from the server farm. If the SMA does not send out e-mail notifications, most likely there is a configuration problem with the mail server. One way to troubleshoot this is simply to set up a mail client on the web server and try to send regular e-mail from the server. If you cannot send e-mail (perhaps through your firewall) then neither is the SMA going to be able to send e-mail; it uses no special magic that is unknown to your e-mail client. Look for the following SMTP error in C:\Inetpub\Mailroot\Drop:
webmaster@yourcompany.com
501 ClusterCATS@webmaster.yourcompany.com. Sender domain must exist
If the problem is that it cannot resolve webmaster@yourcompany.com, you may be able to work around the issue by going into Internet Service Manager > Properties > Delivery and setting the Masquerade Domain toyourcompany.com
For more information on troubleshooting event notification and alarms, click here to see a pertinent Macromedia TechNote.
Under the Hardware Integration tab, there is currently only an interface for the ColdFusion dynamic feedback protocol (dfp) agent to integrate with CLD. If you are using CLD in the dfp mode, then you must enter the fully qualified name of the CLD beside the heading Internal DNS Name, for example: cld.yourcompany.com. You would also enter the IP address corresponding to cld.yourcompany.com beside the heading Internal IP Address, for example: 192.168.0.1. For standalone servers without hardware load balancing devices, or with non-dfp enabled devices such as BIG-IP, etc. you would leave this all blank. Look for additional options here as we further integrate with non-dfp enabled hardware load balancing devices. Note that you must enter the administrative host name and address of the CLD, not the virtual server name and address.
Enabling Server Restriction behind Non-dfp Enabled Hardware Load Balancing Devices:
F-5 BIG-IP 4.X:
To create a BIG-IP monitor that will probe the health of your ColdFusion application engine (in earlier BIG-IP releases, this was called Extended Content Verification or ECV). In the left side of the BIG-IP configuration utility screen, click on the icon for monitors. Then find the add button in the top left hand corner of the right window and add a monitor. Name the monitor cfprobe. It inherits from http. Accept the default timeouts 5 and 16. For the send string and receive rule use:
GET /btauxdir/cfprobe.cfm
Hello
Apply your changes
For more information on setting up BIG-IP version 4.X with CF 5 SMA, click here to see the TechNote: ColdFusion 5 Server Monitoring& Hardware Load Balancing Devices
For more information about setting up probes or Extended Content Verification (ECV) on earlier versions of BIG-IP software, click here to see the TechNote: Clustering ColdFusion or JRun Servers Running in Distributed Mode Behind Hardware Load-Balancing Devices. Refer to the ECV section of option one of the article.
Alteon AceDirector:
Configure the AD3 for CF content and application awareness health checking. This will enable the AD3 to properly recognize and react to any disruption of service in the real server farm. This is a critical step especially if you are running your server farm in the distributed mode with the Web servers set up on separate platforms from your application servers. It is not hard to picture your AD3 pouring sessions onto a Web server that has a stalled backend application server. What would tell the AD3 that the application server behind the Web server was down?
Health checking is the answer. Health check scripts are probably the most complex part of any hardware load balancing procedure (if not the most complex thing to set up on the AD3). I will set up the health script to look at the cfprobe.cfm and look for the return string of "Hello" (generated by the application server rather than simply plain text). If an application server is down, the AD3 will not get back the "Hello" message and will mark the appropriate server(s) down while redirecting request to the server(s) that remain(s) alive.
Note: These strings are case sensitive.
Main# /cfg/slb/adv
Layer 4 Advanced# script
Enter health script number: (1-8) 1
Health Script 1# open 80
Health Script 1# send "GET /btauxdir/cfprobe.cfm HTTP/1.1\\r\\nHOST:10.64.20.93\\r\\n\\r\\n"
Health Script 1# expect "Hello"
Health Script 1# close
Health Script 1# apply
Main# /cfg/slb/group 1
Real server group 1# health script1
Current health check type: tcp
Enter health check type: script1
New pending health check type: script1
Real server group 1# apply
Real server group 1# save
Confirm saving to FLASH [y/n]: y
The most complicated piece of the health check script is the send line. Depending on how you view this article, it may appear that the send line is broken into two commands but it is not. Be careful when printing this article, some printers will cut off the end of the send line:
For CF use:
send "GET /btauxdir/cfprobe.cfm HTTP/1.1\\r\\nHOST:10.64.20.93\\r\\n\\r\\n"
Health-check scripts on the AD3 are as complex as they are important. In order for the script to work against CF code, you must make sure that the hosts file on each real server in the farm is complete to include the AD3 virtual server. In layer-three mode, the default gateway on the private side of the AD3 must also be configured on each real server in the farm.
Another tricky AD3 entry is the health check type script1, you will notice that when you change the health check type of the group from tcp to the script there is not a space between the word script and the number 1. This is inconsistent with the rest of the AD3 commands, but the script check will not supercede the default tcp check if you put in a space.
For more information about configuring the ACEDirector to run with your CF 5 server farm, see the following Macromedia TechNote, but ignore the sections about clustering in favor of the CF 5 SMA portions of this current article. Clustering with hardware load balancing devices is no longer necessary with the advent of the CF 5 SMA.
Click here to view, Clustering Macromedia's Enterprise Application Servers with Alteon's ACEdirector Switch
Ciscos Content Services Switch (Formerly Arrowpoint) running CSS 4.X or later:
For information about configuring CSS to run with your CF 5 server farm, see the following Macromedia TechNote, but ignore the sections about clustering in favor of the CF 5 SMA portions of this current article. Clustering with hardware load balancing devices is no longer necessary with the advent of the CF 5 SMA:
Clustering Macromedia Application Servers Behind Ciscos Content Services Switch
Also see the following article on Ciscos web site:
Making Cisco CSS 11000 HTTP Keepalives and ColdFusion Servers Work Together
www.cisco.com/warp/public/117/css_cfmkeepalives.html
Foundry Networks ServerIron:
Configure health-check monitors to determine the status of both the web server and the application server. Both the CFAM Server Monitor Agent and ClusterCATS set up a virtual directory on each real server call /btauxdir; btauxdir contains management content in that that we will use as a target for the ServerIronXL health-check monitor. CF and JRun will each provide a different target file; if you are running CF use cfprobe.cfm, if JRun use jrunprobe.jsp. This example uses the real server names: pascal and brunner.
serveriron# config t
serveriron(config)# http match-list macromedia
serveriron(config)# default down
serveriron(config)# up simple Hello
serveriron(config)# write mem
serveriron(config)# server real pascal
serveriron(config-rs-pascal)# port http
serveriron(config-rs-pascal)# port http url œGET /btauxdir/cfprobe.cfm
serveriron(config-rs-pascal)# port http keepalive
serveriron(config-rs-pascal)# port http content-match macromedia
serveriron(config-rs-pascal)#exit
serveriron(config)# server real brunner
serveriron(config-rs-brunner)#port http
serveriron(config-rs-brunner)#port http url œGET /btauxdir/cfprobe.cfm
serveriron(config-rs-brunner)#port http keepalive
serveriron(config-rs-brunner)# port http content-match macromedia
serveriron(config-rs-pascal)# exit
serveriron# write mem
Note: before setting this up, make sure you can browse to btauxdir/cfprobe.cfm and see the word Hello on each individual Web server. If you cannot get to it from your local browser, then neither will ServerIronXL be able to reach it. If you cannot hit cfprobe.cfm (or jrunprobe.jsp), make sure that the virtual directory called btauxdir is created in IIS under the IIS virtual server you are monitoring.
For more information about running a CF 5 server farm behind a ServerIron, click here to view Integrating ColdFusion or JRun Servers with Foundry Networks ServerIronXL.
Conclusion:
The SMA provides a low overhead means of providing the server-level features offered by CC. It is preferable to CC when you are running a server farm behind a high-end hardware load balancing device or when you are running a standalone production web server. When you are running behind a non-dfp enabled load-balancing device, you should delegate the restriction task as well as the load balancing and failover tasks to the hardware device while letting CFAM reactively monitor your web and application servers.
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
