Answered
Multiple Apache Servers tied to CF8/JRUN?
I've got CF6 experience over J2EE, but now I'm trying to
deploy CF8 over embedded JRUN 4.0 on an OS X Tiger Server (10.4.10)
and running into some headaches. From what I can see in the JRUN 4
documentation I need to enable Proxy Service so that I can have
multiple web hosts tied into the same CF8 server, but I can't
figure out how to do this. The CF8 documentation doesn't talk about
embedded JRUN very much. Is there an administrator interface for
embedded JRUN or should I attempt to edit jrun.xml by hand? Or am I
totally on the wrong track?
Any help would be appreciated.
What follows are the nitty-gritty details.
The JRun / CF8 server is running at 192.168.1.100 and jrun.xml contains the following snippet (the default);
<service class="jrun.servlet.jrpp.JRunProxyService" name="ProxyService">
<attribute name="activeHandlerThreads">50</attribute>
<attribute name="minHandlerThreads">1</attribute>
<attribute name="maxHandlerThreads">1000</attribute>
<attribute name="mapCheck">0</attribute>
<attribute name="threadWaitTimeout">300</attribute>
<attribute name="backlog">500</attribute>
<attribute name="deactivated">false</attribute>
<attribute name="interface">*</attribute>
<attribute name="port">51800</attribute>
<attribute name="timeout">300</attribute>
<!-- set this to false for multi-hosted sites -->
<attribute name="cacheRealPath">false</attribute>
<!--
<attribute name="keyStore">{jrun.rootdir}/lib/keystore</attribute>
<attribute name="keyStorePassword">changeit</attribute>
<attribute name="trustStore">{jrun.rootdir}/lib/trustStore</attribute>
<attribute name="socketFactoryName">jrun.servlet.jrpp.JRunProxySSLServerSocketFactory</attribute>
-->
</service>
The Apache server running on the same machine (192.168.1.100) contains the following connection info in its httpd.conf file. This works beautifully.
# JRun Settings
LoadModule jrun_module /Applications/ColdFusion8/runtime/lib/wsconfig/1/mod_jrun.so
<IfModule mod_jrun.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ssl false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore /Applications/ColdFusion8/runtime/lib/wsconfig/1/jrunserver.store
JRunConfig Bootstrap 127.0.0.1:51800
#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
</IfModule>
Where I run into trouble is when I enable the following configuration on a second Apache server (at 192.168.1.102). If I enable the following code I get errors. [Yes, /Applications/Coldfusion8 is populated properly, as far as I can tell, but I don't want to launch JRUN / CF8 on this machine.]
# JRun Settings
LoadModule jrun_module /Applications/ColdFusion8/runtime/lib/wsconfig/1/mod_jrun.so
<IfModule mod_jrun.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ignoresuffixmap false
JRunConfig Ssl false
JRunConfig Serverstore /Applications/ColdFusion8/runtime/lib/wsconfig/1/jrunserver.store
JRunConfig Bootstrap 192.168.1.100:51800
#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
</IfModule>
Here are the connection errors that I receive when the Apache server at 192.168.1.102 fires up:
[Thu Aug 9 16:36:40 2007] [notice] jrApache[25761:61918] 255.255.255.255:0 connect failed[54]: 49 49 Can't assign requested address
[Thu Aug 9 16:36:40 2007] [notice] jrApache[25761:61918] could not initialize proxy for fe80:0:0:0:203:93ff:feab:9662%4:51800
[Thu Aug 9 16:36:40 2007] [notice] jrApache[25761:61918] 255.255.255.255:0 connect failed[54]: 49 49 Can't assign requested address
[Thu Aug 9 16:36:40 2007] [notice] jrApache[25761:61918] could not initialize proxy for fe80:0:0:0:203:93ff:fec0:7676%5:51800
---END---
Any help would be appreciated.
What follows are the nitty-gritty details.
The JRun / CF8 server is running at 192.168.1.100 and jrun.xml contains the following snippet (the default);
<service class="jrun.servlet.jrpp.JRunProxyService" name="ProxyService">
<attribute name="activeHandlerThreads">50</attribute>
<attribute name="minHandlerThreads">1</attribute>
<attribute name="maxHandlerThreads">1000</attribute>
<attribute name="mapCheck">0</attribute>
<attribute name="threadWaitTimeout">300</attribute>
<attribute name="backlog">500</attribute>
<attribute name="deactivated">false</attribute>
<attribute name="interface">*</attribute>
<attribute name="port">51800</attribute>
<attribute name="timeout">300</attribute>
<!-- set this to false for multi-hosted sites -->
<attribute name="cacheRealPath">false</attribute>
<!--
<attribute name="keyStore">{jrun.rootdir}/lib/keystore</attribute>
<attribute name="keyStorePassword">changeit</attribute>
<attribute name="trustStore">{jrun.rootdir}/lib/trustStore</attribute>
<attribute name="socketFactoryName">jrun.servlet.jrpp.JRunProxySSLServerSocketFactory</attribute>
-->
</service>
The Apache server running on the same machine (192.168.1.100) contains the following connection info in its httpd.conf file. This works beautifully.
# JRun Settings
LoadModule jrun_module /Applications/ColdFusion8/runtime/lib/wsconfig/1/mod_jrun.so
<IfModule mod_jrun.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ssl false
JRunConfig Ignoresuffixmap false
JRunConfig Serverstore /Applications/ColdFusion8/runtime/lib/wsconfig/1/jrunserver.store
JRunConfig Bootstrap 127.0.0.1:51800
#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
</IfModule>
Where I run into trouble is when I enable the following configuration on a second Apache server (at 192.168.1.102). If I enable the following code I get errors. [Yes, /Applications/Coldfusion8 is populated properly, as far as I can tell, but I don't want to launch JRUN / CF8 on this machine.]
# JRun Settings
LoadModule jrun_module /Applications/ColdFusion8/runtime/lib/wsconfig/1/mod_jrun.so
<IfModule mod_jrun.c>
JRunConfig Verbose false
JRunConfig Apialloc false
JRunConfig Ignoresuffixmap false
JRunConfig Ssl false
JRunConfig Serverstore /Applications/ColdFusion8/runtime/lib/wsconfig/1/jrunserver.store
JRunConfig Bootstrap 192.168.1.100:51800
#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
</IfModule>
Here are the connection errors that I receive when the Apache server at 192.168.1.102 fires up:
[Thu Aug 9 16:36:40 2007] [notice] jrApache[25761:61918] 255.255.255.255:0 connect failed[54]: 49 49 Can't assign requested address
[Thu Aug 9 16:36:40 2007] [notice] jrApache[25761:61918] could not initialize proxy for fe80:0:0:0:203:93ff:feab:9662%4:51800
[Thu Aug 9 16:36:40 2007] [notice] jrApache[25761:61918] 255.255.255.255:0 connect failed[54]: 49 49 Can't assign requested address
[Thu Aug 9 16:36:40 2007] [notice] jrApache[25761:61918] could not initialize proxy for fe80:0:0:0:203:93ff:fec0:7676%5:51800
---END---