With a little side of applesauce...

Sunday, January 28, 2007

Coldfusion Clustering FAQ

1. Coldfusion clusters must use J2EE sessions to replicate sessions between instances.

This is taken from the modify cluster page in the CF Administrator “Note: Use of J2EE Sessions is required for session replication or sticky sessions. All instances participating in the cluster must use J2EE sessions. Therefore, you will need to go to:

Server Settings —> Memory Variables and check “Use J2EE session variables” for each cluster member.”

2. Coldfusion must have the webroot mounted locally if it is running on a separate machine from the web server(s).

We have always used NFS to mount the web root locally to the Coldfusion instance. There have also been some mention of mirroring the web root to the Coldfusion machine, but that would only work if there was little development on a site, as there would be latency between files on the live site, and those on the coldfusion server.

3. Here is an example Apache2/Jrun configuration which sets some variables specific to clustering.

# JRun Settings

JRunConfig Verbose false

JRunConfig Apialloc false
JRunConfig Ssl false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore /remotestorage/jrun4/lib/wsconfig/1/jrunserver.store
JRunConfig Bootstrap 192.168.1.40:51020;192.168.1.41:51020
JRunConfig ProxyRetryInterval 45
JRunConfig ConnectTimeout 45
JRunConfig RecvTimeout 45
JRunConfig SendTimeout 45
#JRunConfig Errorurl
AddHandler jrun-handler .cfm .cfml .cfc .jsp .jws

AddType application/x-httpd-cfm .cfm .cfml .cfc

These are somewhat documented here:

http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00001756.htm

4. Where can I view the value of the Proxy Port?

The Proxy Port, which is not the “Remote Port” mentioned in the Coldfusion Administrator, can only be viewed in the Jrun Administrator, which should running on your “master” Jrun4 server on port 8000. (ie http://my.master.node:8000)

5. My browser won’t show the Jrun4 administrator… :(

Check that you don’t have a firewall blocking the port. Also, make sure that the admin instance is running on the server.

6. I have forgotten my Jrun4 administrator password!

You can view your password in the:
/path/to/jrun4/servers/admin/SERVER-INF/jrun-users.xml

file. Look for a user with the jmcadmin element.

7. I have forgotten my Coldfusion Administrator password!

You can get around this in two ways:

a. Manually edit the password.properties file
http://kb.mediatemple.net/article.php?id=077
b. Set to “false” in the neo-security.xml file, restart coldfusion and visit the coldfusion administrator to reset your admin password. (Don’t forget to reset the admin.security.enabled value to “true” and restart coldfusion, or else anybody would be able to access the administrator!!).

8. How are the JrunConfig Bootstrap and proxyserver array (in jrunserver.store) related?

As apache starts up, the jrun4 connector splits the array of proxy servers, and attempts to contact the coldfusion server instance on each ipaddress:port. (Remember the port is the Proxy Port). If the Coldfusion server instance does not respond, it is not added to the proxyserver array in the jrunserver.store.

9. I have setup my Bootstrap with all of the correct ipaddresses and ports, but I still only have one member in the proxyserver array in the jrunserver.store file…

Lower your firewall, and make sure that the firewall on either the client or server is not blocking communication. Also, try restarting your server instances to see if something has gone awry with them.

10. Will my coldfusion instances automatically detect modifications to shared configuration files?

Any modified to the neo-* files will be automatically found by the coldfusion instances and they will reload the appropriate service with a log entry like:

12/19 08:28:52 Information [scheduler-1] - neo-query.xml has been modified . Reloading the service coldfusion.sql.Executive@13b3b7e

11. How are changes made to the neo-* and password.properties files?

The neo-* and password.properties files are modified through the coldfusion administrator. (They may be hand-edited as well, but not for the faint-at-heart).

No comments: