Skip to main content
Participant
August 21, 2013
Answered

Cluster creation help!

  • August 21, 2013
  • 1 reply
  • 4181 views

Hi there

Does any one have a fool-proof document for creating and proving a 2 server ColdFusion 10 cluster? Most of the documents I have found are missing something. 

More specifically, what is the difference between HTTP Port and Admin Component Port in the remote instance manager?

Should the Cluster Manager show anything on the remote node?

Is there a cluster monitor that show's its state? Is the there a simple test to prove it works.

If this is in the remote node server.xml

<Engine jvmRoute="cfusion" name="Catalina" defaultHost="localhost">

should the jvmRoute value in the Instance Manager should be set to cfusion?

Thanks for your help

Richard

This topic has been closed for replies.
Correct answer vishu_13

Hi Richard

Two important points for ColdFusion 10 Session Replication

1> ColdFusion 10 servers must be Enterprise Edition

2> All the Servers(Machines) should be under same Network (same subnet)

Below is the example of two IP Addresses in the same Subnet

10.40.166.xx (say 34)

10.40.166.xx (say 121)

Test Application.cfc and Test.cfm (At the bottom)

Steps to perform:

Enable the J2EE session variables for both the ColdFusion servers under Memory Variables in ColdFusion Administrator

Create a local instance (say test1) and create a remote instance (say test 2) on the remote machine.

Go ahead and Register the remote instance (test2) in the ColdFusion Administrator . Create a cluster and add both the instances (test1 and test2).

Now add the cluster tag information  in the server.xml (between </host> and </engine>) of the remote instance using the help  document of ColdFusion 10 mentioned below

http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSc3ff6d0ea77859461172e0811cbf363c31-7ffa.html

NOTE : Make sure you change the multicast port in the server.xml of the remote instance with the Multicast port number when you create cluster in ColdFusion Admin console.

Open the context.xml of the remote instance (test2) and make sure that the “Manager pathname” is comment out.

Also, make sure that in the context.xml of local machine instance (test1),  “Manager pathname” is comment out.

Stop and Start remote instance first (test2) using command prompt and then stop and start instance (test1) using command prompt.

Place the App folder in the wwwroot of both the instances. Create a cluster using the Web Server Configuration tool using the cluster and then test the Session replication behavior.

Also, place the .cfc and .cfm in  Web root folder  (wwwroot) and then try to access the Test.cfm from there. Then note down the session ID and instance name, refresh the page and observe that the Session ID is same for other instance or not. You can stop any one instance and refresh the same page then check the same instance is getting the same session ID or not.

Application.cfc

<cfcomponent>

    <cfset this.name = "SessionApp" />

    <cfset this.sessionmanagement = "true" />

    <cfset this.sessiontimeout = createTimeSpan(0,5,0,0) />

</cfcomponent>

Test.cfm

<cfset Session.svar="Test">

<cfdump var="#Session#" />

<cfscript>

hostaddress = createObject("java", "java.net.InetAddress").localhost.getHostAddress();

</cfscript>

IP Address: <cfdump var="#hostaddress#"><br />

Hope it helps

VJ

1 reply

vishu_13
vishu_13Correct answer
Inspiring
August 21, 2013

Hi Richard

Two important points for ColdFusion 10 Session Replication

1> ColdFusion 10 servers must be Enterprise Edition

2> All the Servers(Machines) should be under same Network (same subnet)

Below is the example of two IP Addresses in the same Subnet

10.40.166.xx (say 34)

10.40.166.xx (say 121)

Test Application.cfc and Test.cfm (At the bottom)

Steps to perform:

Enable the J2EE session variables for both the ColdFusion servers under Memory Variables in ColdFusion Administrator

Create a local instance (say test1) and create a remote instance (say test 2) on the remote machine.

Go ahead and Register the remote instance (test2) in the ColdFusion Administrator . Create a cluster and add both the instances (test1 and test2).

Now add the cluster tag information  in the server.xml (between </host> and </engine>) of the remote instance using the help  document of ColdFusion 10 mentioned below

http://help.adobe.com/en_US/ColdFusion/10.0/Admin/WSc3ff6d0ea77859461172e0811cbf363c31-7ffa.html

NOTE : Make sure you change the multicast port in the server.xml of the remote instance with the Multicast port number when you create cluster in ColdFusion Admin console.

Open the context.xml of the remote instance (test2) and make sure that the “Manager pathname” is comment out.

Also, make sure that in the context.xml of local machine instance (test1),  “Manager pathname” is comment out.

Stop and Start remote instance first (test2) using command prompt and then stop and start instance (test1) using command prompt.

Place the App folder in the wwwroot of both the instances. Create a cluster using the Web Server Configuration tool using the cluster and then test the Session replication behavior.

Also, place the .cfc and .cfm in  Web root folder  (wwwroot) and then try to access the Test.cfm from there. Then note down the session ID and instance name, refresh the page and observe that the Session ID is same for other instance or not. You can stop any one instance and refresh the same page then check the same instance is getting the same session ID or not.

Application.cfc

<cfcomponent>

    <cfset this.name = "SessionApp" />

    <cfset this.sessionmanagement = "true" />

    <cfset this.sessiontimeout = createTimeSpan(0,5,0,0) />

</cfcomponent>

Test.cfm

<cfset Session.svar="Test">

<cfdump var="#Session#" />

<cfscript>

hostaddress = createObject("java", "java.net.InetAddress").localhost.getHostAddress();

</cfscript>

IP Address: <cfdump var="#hostaddress#"><br />

Hope it helps

VJ

August 21, 2013

I'm having a similar problem.  I have two separate cold fusion servers on the same subnet.  Each server has one CF instance of the same application.  I want to cluster these two instances.

I've created a cluster on server1.  In that cluster I added the one instance that resides on that server.  I then edited the server xml for the second instance on the other cf server and added the cluster tag information from from your response above (making sure that the multicast port is correct).  I then recycled both servers.

The problem I have is how do I add the instance on the remote server to the cluster?  If I go into the cf admin on server1, I don't see the remote instance to be able to add it to the cluster.   If I go to the cfadmin on the remote server, it has no cluster configuration at all.

I'm a little lost.  Any suggestions?

vishu_13
Inspiring
August 21, 2013

Hi rdjanna

Once you go to the main instance say cfusion in the server one then under Enterprise manager , click on Instance Manager and click on Register Remote Instance.

NOTE : This is an Enterprise feature and this option will be available on the default/main instance (say cfusion) which gets created at the time of CF install

Thanks

VJ