ColdFusion MX 6.1 Cluster Installation Guide Version 1 - 28 ...

ballscauliflowerΛογισμικό & κατασκευή λογ/κού

30 Ιουν 2012 (πριν από 4 χρόνια και 9 μήνες)

372 εμφανίσεις

Herrlich & Ramuschkat GmbH
Vahrenwalder Strasse 156 30165 Hannover
Phone +49 (0)511 - 59 0 95 - 0 Fax – 590

ColdFusion MX 6.1
Cluster I nstallati on Gui de

Version 1 - 28. Juni 2004
Di pl.-Ök. Sven Ramuschkat




Foreword 3


Conecpts 3


Step 1: ColdFusion MX 6.1 Installation on Server C1/C2 5


Step 2: Create new ColdFusion MX Instances on C1/C2 6


Step 3: Define your Cluster in the JMC 8


Step 4: IIS-WebServer Configuration 10


Step 5: Test the Cluster 11


What you also should know … 11


How to administer the ColdFusion Instances via CF-Admin 11


Changes Java Heap Size via JRun-Admin 11

ColdFusion MX Cluster Installation

1. Foreword
This documentation is based on several articles by Brandon Purcell and Steven Erat.

In addition to that I have added some notes and a specific scenario. In this specific scenario I do not
use ColdFusion Session Variables because in a Cluster Environment I think it is better to put that
kind of information in the database and write your own kind of session management …
2. Conecpts
In this documentation we will install and configure the following scenario :

• Server C1 / C2 are Windows 2000 / 2003 Servers with
o no IIS, because we are using the build in WebServer of JRun / CFMX on these
o with one JRun-Admin Server
o with two Coldfusion Instances named cfusion1 and cfusion2 / cfusion3 and
• We will define a Cluster named “CFMXJRunCluster” which includes the Instances cfusion1
to cfusion4.
ColdFusion MX Cluster Installation

• Server W is a Windows 2000 or 2003 Server with Microsoft IIS. There is no ColdFusion or
Jrun on this Server. The IIS is connected to the “CFMXJRunCluster” by using the JRun
Webserver Connector which is bound to the Cluster “CFMXJRunCluster”

• The reason for installing 2 CF-MX instances on one physical server is, that Java scales not
very well. That means if you have a dual Xeon-Processor Server with 4 GB RAM the
application performace can be better by using two instances on one machine. In addition
to that one CF-MX Instance can not use 4 GB RAM. The maximum size is technically 1.8 GB
RAM but you should not use more than 1 GB RAM per instance.

ColdFusion MX Cluster Installation

3. Step 1: ColdFusion MX 6.1 Installation on Server C1/C2
Abstract: Install JRun and automatically deploy one ColdFusion MX Default-Instance to that JRun.

Install ColdFusion MX 6.1 with the J2EE Configuration (ColdFusion MX with JRun 4).

During the install process, select the Built-in web server.

ColdFusion MX Cluster Installation

Follow the Installation Wizard prompts.
Wen the Installation Wizard finishes, launch the Configuration Wizard and enter your ColdFusion
Administrator password; follow the prompts to complete the install.

Sometimes it can happen, that the installation wizard gets a hanger when installing the odbc-
services. Don’t worry, you do not need the odbc-services. But to skip that install step you need to
change an xml-file. Open the cf_root\lib\adminconfig.xml file for editing and change the
“runsetupwizard” attribute to false.

On Windows, the wizards installs five different services:
a) ColdFusion MX ODBC Agent (from the Configuration Wizard)
b) ColdFusion MX ODBC Server (from the Configuration Wizard)
c) Macromedia JRun Admin Server - JRun Management Console (JMC) at (from the Configuration Wizard)
d) Macromedia JRun CFusion Server - ColdFusion Server (from the Installation Wizard)
e) Macromedia JRun Default Server - Default JRun Server (from the Installation Wizard)
 You really should not use any ODBC in a real world scenario … so stop service a) and b) in the
windows service panel and disable these services completely.
 in our scenario you do no need server e), so stop that service and disable it completely
4. Step 2: Create new ColdFusion MX Instances on C1/C2
Abstract: After Step 1 you have one ColdFusion MX Instance namend “cfusion” on Server C1 and C2.
Because in a ColdFusion-Cluster each CFMX-Instance has to have a unique instance name we can
not use the CFMX-Instance “cfusion”. So we will use the Instance “cfusion” as a template to create
the new instances cfusion1 to cfusion4

In this section, you will configure new instances (cfusion1 to cfusion4) by creating new instances of
JRun and deploying ColdFusion to each new instance.
• Stop the JRun Instance “cfusion” from the command prompt or in the Windows Services
control panel and disable this service completely.
• Copy the cfusion-ear directory from the cfusion server in
C:\JRun4\servers\cfusion\cfusion-ear\ to a location of your choosing. In this example I
chose C:\working\cfusion-template. You will use these files when you create new
instances of ColdFusion MX. As you create new instances, you will copy the entire folder to
the server root of the new instance.
• Create a new JRun server or instance of JRun and deploy ColdFusion MX to it. To create the
new JRun server, you must have JRun admin server running.
• Open a web browser and type the following URL to access the JMC: http://<host>:8000/
• After logging into the JMC with the username and password that you specified in the
ColdFusion MX installation, click “Create New Server”, at the top of the JMC.
• Type in the name “cfusion1” for the JRun server; click the “Create Server” button.

ColdFusion MX Cluster Installation

(Important: In this screenshot it should be cfusion1 and not cfusion2!)

• Choose the ports for the server (Figure 6). Specify a JNDI port in the range of 2900-3000; you
can specify any port for the Web Server Port Number or Proxy Port Number. In this example,
I chose the default values:

• Now that you have created a new JRun server, you can add it as a service on Windows. To
add the server as a service, use the jrunsvc command. For information on the jrunsvc
command type:
c:\jrun4\bin\jrunsvc ?
To add the server as a service type the following command:
C:\JRun4\bin>jrunsvc -install cfusion1 "Macromedia JRun
Cfusion1 Server" "Macromedia JRun Cfusion1 Server"
The following message appears if the command succeeds:
Service "Macromedia JRun Cfusion1 Server" installed with
display name "Macromedia JRun Cfusion1 Server"
• Copy the cfusion-ear directory from the temporary location you copied them to earlier to
the server root for the new server you just created. In this example, I copy the files from
C:\working\cfusion-template\cfusion-ear to C:\JRun4\servers\cfusion1\cfusion-ear.
• Start cfusion1 (or your new server name) server through the Services control panel.
• Delete the default-ear from the newly created JRun server. Since both cfusion-ear and
default-ear have a context root of /, they will conflict; therefore, you must delete the
default-ear in the filesystem. I deleted mine from C:\JRun4\serves\cfusion1\default-ear.
• You must also undeploy the flashgateway.ear included with JRun so that it does not conflict
with the gateway that is packaged with ColdFusion. To undeploy the flashgateway.ear, click
the server name in the left frame of the JMC. Click J2EE components, then click "X" next to
the Flash Remoting EAR.
ColdFusion MX Cluster Installation

• You have now successfully created a new instance of ColdFusion named “cfusion1”. Do the
same for the instance “cfusion2” on Server C1 and for the instance “cfusion3” and
“cfusion4” on Server C2.
5. Step 3: Define your Cluster in the JMC
Abstract: In order to define the Cluster you should use the JRun-Admin-Server on Server C1 as the
Interface for creating and administrating the Cluster. Before creating the cluster you must register
the instances “cfusion3” and “cfusion4” from Server C2 in the JRun-Admin-Server on Server C1.

To register the remote servers “cfusion3” and “cfusion4” you only need the remote servers Host
Name, JRun Server Name, and JNDI Port
After registering a remote server, you can create new instances on the remote server and
administer the settings for all servers from one JMC.

Start all JRun instances that will be part of the cluster.
In some installations it can happen, that you can not start and stop a remote server. In this case just
do the following: Register the JRun-Admin Server of the remote server also. After that you can start
and stop the remote servers.

To create the cluster, go into the JMC and click Create New Cluster. Add the appropriate servers to
the cluster. Enter a name for the cluster, and choose the servers that will be a part of the cluster.

ColdFusion MX Cluster Installation

(Important: In this screenshot you should see cfusion1 to cfusion4, just select these servers)

ColdFusion MX Cluster Installation

6. Step 4: IIS-WebServer Configuration
• Install the Java Virtual Machine 1.4.x on this machine. You can download that JVM from
the Website
• Create a Directory namend c:\jConnector
• Copy the file c:\jrun4\bin\wsconfig.jar from one of the ColdFusion-Servers to your
• Start the wsconfig GUI by typing the following command:

• Click “Add” once. The wsconfig GUI starts.
• For the JRun Host, type in the IP-Adress of the JRun-Admin-Server on Server C1 of your
Cluster, when leaving the field it will take 5 sec. to get the information from that JRun-
Admin-Server, so be patient
• For the JRun Server, select the name of your Cluster (the cluster name must be listed in
that combobox, otherwise you did something wrong!)
• Select Internet Information Server (IIS) as the Web Server
• Select the Default Web Site or your website name; do not use "All" for multiple instances
with IIS.
• Select the check box for: Configure the web server for ColdFusion MX applications. (this is
important to tell the webserver that all .cfm-Pages should be redirected to the cluster!)
• Click OK. You have configured your web server.

ColdFusion MX Cluster Installation

7. Step 5: Test the Cluster
Create the File “ClusterTest.cfm” with the following content:
<cfobject action="create" type="java" class="jrunx.kernel.JRun" name="jr">
<cfset servername = jr.getServerName()>
<cfoutput>JRun Server Name: #servername#</cfoutput>

Put the file into the IIS-Root in C:\inetpub\wwwroot on Server W. After that put that file also in the
Web-Root of the Cluster-Instances “cfusion1” to “cfusion4”. (c:\jrun4\servers\cfusion1\cfusion-ear).
Because the IIS routes all requests to a .cfm-File automatically to the CFMXJRunCluster, the
ClusterTest.cfm File must not be existent on the Server W, but you should think about putting all
.cfm-Files on Server W and write a Batch-File to deploy the .cfm-Files to the Cluster …

After deploying the File to the Cluster just call the File in the Browser by calling the URL of you IIS
Press F5 several times in the Internet Explorer and you should see the names of your 4 Cluster-
8. What you also should know …
8.1. How to administer the ColdFusion I nstances via CF-Admin
Each CFMXJRunCluster Instance “cfusion1” to “cfusion4” has still enabled the internal webserver. If
you want to configure the ColdFusion Instances via the ColdFuion-Administrator, just type in the IP-
Adress and the Port-Number of the Instance:
e.g.: http://w.x.y.z:8101/cfide/Administrator/index.cfm

8.2. Changes Java Heap Size via JRun-Admin
After modifying the Max Heap Size setting or adding or modifying any arguments in the VM
Arguments field under the JVM Settings using the JRun Management Console, it will no longer be
possible to start Macromedia ColdFusion MX instances on the JRun server.
For a solution look at this Macromedia Technote: