Skip to main content
Participant
April 15, 2010
Question

Multi CF 8/Apache install on Cent OS 5.4 64bit

  • April 15, 2010
  • 1 reply
  • 1196 views

First, let me explain that I know nothing about coldfusion, I am the systems guy and we have outside contractors doing the actual configuration of the coldfusion pieces. They are windows guys so asking them really hasnt been much help at all. Anyways, I am responsible for the server os and getting the apps installed into a default cfg status.

I am having issues getting the wsconfig and its options running. Of course, I'm not sure Im even using the connector tool correctly.

I was able to run the wsconfig the first time, using

./wsconfig -ws apache -dir /etc/httpd/conf/ -server cfusion -coldfusion -bin /usr/sbin/httpd -script /usr/sbin/apachectl -v

it added the jrun properties to the apache conf, once it was up I sent the developers to it, they are setting up 6 instances each jailed from the other. The developers started with creating instances CFLive-1, CFLive-2 and CFLive-3 for now.

My understanding is that I need to run wsconfig for each instance, using the -server CFLive-? variable and it will update the apache conf file for each instance, I've tried

./wsconfig -ws apache -dir /etc/httpd/conf/ -server CFLive-1 -coldfusion -bin /usr/sbin/httpd -script /usr/sbin/apachectl -v

and every time I run it It tells me it is already configured, here is the output:

Found JRun server cfusion at 127.0.0.1:2902

Found JRun server CFLive-1 at 127.0.0.1:2908

Found JRun server CFLive-2 at 127.0.0.1:2909

Found JRun server admin at 127.0.0.1:2910

Found JRun server CFLive-3 at 127.0.0.1:2911

This web server is already configured for JRun.

Am I using the tool incorrectly, or even have the correct usage of it?

Also, I'm pretty sure I have to wrap virtual host entry's around the mod_jrun22 call created for each instance. Anyone got an example httpd.conf for multiple instances on apache I can look at?

I've tried to find help on the web, everyone seems to have Windows IIS and Windows Apache and loves using the gui, no such luck here with a gui. These are centos 5.4 servers minimally built for the cf8 service and apache server.

However, I have found some people configuring multiple instances on windows/apache, and I got to where I was looking in the /opt/jre4/servers/<instance>/SERVER-INFO/jrun.xml for the port numbers assigned to the instances. The documentation talked about building a apache config with each instance, and then talked about how there should be directories created for each instance with a seperate jrunserver.store located in /opt/jrun4/lib/wsconfig/X/jrunserver.store, where X = the instance number, and that this is created when the instance is created via the cf admin tool, I dont have anything other then the /1/ directory that the first jrun settings entry in the httpd.conf file has in it.

Anyone care to assist me or point me to documentation that can acutually help, or tell me what I am doing wrong?

Thanks in advance

-John

This topic has been closed for replies.

1 reply

ilssac
Inspiring
April 15, 2010

Must be your happy day.

I am currently writing the documenation from installing ColdFusion 9 upgrade on our development box.  I am right now detailing how to handle the web server configurations manually.  For us, on our Solaris 10, 64 bit machines, the wsconfig tool does not work gui or command line so we have to do every thing manually.

I presume from your description that the wsconfig is working enough for you to create one connection between your default web server and the cfusion ColdFusion server.  Under this assumption you should something like this in your httpd.conf file:  Some numbers and strings my vary.

<IfModule mod_jrun20.c>
    JRunConfig Apialloc false
    JRunConfig Ignoresuffixmap false
    #JRunConfig Errorurl url <optionally redirect to this URL on errors>
    #JRunConfig ProxyRetryInterval 600 <number of seconds to wait before trying to reconnect to unreachable clustered server>
    #JRunConfig ConnectTimeout 15 <number of seconds to wait on a socket connect to a jrun server>
    #JRunConfig RecvTimeout 300 <number of seconds to wait on a socket receive to a jrun server>
    #JRunConfig SendTimeout 15 <number of seconds to wait on a socket send to a jrun server>
    AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf

   JRunConfig Verbose true
   JRunConfig Serverstore /opt/jrun4/lib/wsconfig/calpip/jrunserver.store
   JRunConfig Bootstrap 127.0.0.1:51002
</IfModule>

It is the last few matter to connect a specific virtual host to a specifc coldfusion server.  Each time a new instance is created you will get a new ColdFusion server in your /yourPath/JRun4/servers/ directory.  If you dig into these directory you can will find a jrun.xml file.  For example one of ours is /opt/jrun4/servers/calpip/SERVER-INF/jrun.xml.  Inside this file is a ProxyService block:

<service class="jrun.servlet.jrpp.JRunProxyService" name="ProxyService">
<attribute name="activeHandlerThreads">25</attribute>
<attribute name="backlog">500</attribute>
<attribute name="deactivated">false</attribute>
<attribute name="interface">*</attribute>
<attribute name="maxHandlerThreads">1000</attribute>
<attribute name="minHandlerThreads">1</attribute>
<attribute name="port">51002</attribute>
<attribute name="threadWaitTimeout">300</attribute>
<attribute name="timeout">300</attribute>

What you need to do is:

1)  Create a subdirectory in the /yourPath/jrun4/lib/wsconfig/ drictory for each instance of ColdFusion you have created.  These directories can be blank I believe, but if this does not work comeback and I can give you another option.

2)  Edit the /yourPaty/jrun4/lib/servers/aCFserver/SERVER-INF/jrun.xml file.  Find the ProxyService block above and change the 'deactivated' attribute to false and make note of the 'port' attribute.

3)  In your apache http.conf file.  Copy these three lines into each virtual host that you want to connect to a specific ColdFusion instance:

   JRunConfig Verbose true
   JRunConfig Serverstore /opt/jrun4/lib/wsconfig/calpip/jrunserver.store
   JRunConfig Bootstrap 127.0.0.1:51002

Set the Bootstrap port to the port noted in from the jrun.xml file and set the /wsconfig/..../jrunserver.store to the wsconfig directory you created for the CF server.

All the rest of the jrun config lines in the http.conf file can be placed in the common part of the file that applies to all virtural hosts.

Let me know if any of that is unclear.