This info is probably somewhere else, but I want to put it here for others and myself because I seem to always forget when I'm setting up a ColdFusion Multi-server cluster on Linux (RedHat or CentOS 5.x):
Remember that you're trying to connect your Web Server (Apache) to the cluster, and not an individual instance of CF. So, you must do things in the correct order:
- When installing ColdFusion, of course choose the Multi-server installation.
- Then, do not connect to the Web Server during installation
- From the cfusion instance (port 8300), create new CF instances that you want to put in your cluster
- Next, create the cluster and put those instances into that cluster
- Go to your command line and make sure the httpd-devel is installed on the server: yum install httpd-devel
- Stop Apache: service httpd stop
- Make the connection from Apache to that new cluster: /opt/jrun4/bin/wsconfig -cluster cluster_name_here -coldfusion -ws Apache -dir /etc/httpd/conf -v
- Verify it's all running with: /opt/jrun4/bin/wsconfig -list -host localhost -v
- To watch requests hit different instances:
- stop all instances: /opt/jrun4/bin/jrun -stop
- start each instance in the cluster in separate terminal (or putty) windows: /opt/jrun4/bin/jrun -nohup -start -childVM instance1
- when each one starts up, you should see a bunch of startup text about the ClusterManager starting up
- hit the web server from a browser. If sticky sessions are turned off for your cluster, you should see the requests hit each server after each browser refresh.
Hope it helps :)
