Accessibility

TechNote (Archived)

Webserver connector hangs while trying to configure remote ColdFusion MX/JRun server

Issue


The web server configuration tool, wsconfig, may appear to hang while trying to configure a remote ColdFusion MX or JRun server. If wsconfig is run with the optional -Dtrace.ci=1 switch, you may see output such as the following:

 bash-2.03# /opt/j2sdk1.4.1_02/bin/java -DWSConfig.PortScanStartPort=2920 -DWSConfig.PortScanCount=1 -Dtrace.ci=1 -jar ./wsconfig.jar -ws iPlanet -server coldfusion  -dir /opt/iplanet4sp13/server4/https-ps-dark-remote/config  -coldfusion -host dstanten03.macromedia.com  Macromedia JRun 4.0 (Build 91015) os.name: SunOS os.version: 5.8 os.arch: sparc platform: sparc-solaris Found port 2920 on host dstanten03.macromedia.com 

At this point, the output will stop instead of continuing on with:

 findServers(): found server coldfusion at 10.60.112.95:2920 this host is ps-dark.macromedia.com:10.60.204.11 etc... 

Reason


This may occur if a firewall is between the web server machine and the ColdFusion MX or JRun machine. When wsconfig is run, it first uses a JNDI port to communicate with the remote machine and discover which servers are running. By default, this port is in the range of 2900-3000 and is set as thejava.naming.provider.url property in the SERVER-INF/jndi.properties file.

Even when communication over this JNDI port is allowed by the firewall, and you have limited the PortScanCount accordingly, wsconfig may still fail to discover the ColdFusion MX or JRun servers that are running on the remote machine. This is because, after the first connection is made to the remote machine using the JNDI port, the remote servers negotiate a new RMI port on which to communicate. By default this RMI port is chosen at random.

Solution


To change this to a fixed port, you need to edit two files.

  1. Edit the SERVER-INF/jndi.properties file on the remote machine and set the RMI port to a fixed value. For example:

    jrun.naming.rmi.port=4321

    (by default, this is set to 0).

    In a default ColdFusion MX 7 standalone server configuration, this file would be located in C:\CFusionMX7\runtime\servers\coldfusion\SERVER-INF\jndi.propertes.

    In a default ColdFusion MX 7 J2EE configuration on JRun, this file would be located in C:\JRun4\servers\cfusion\SERVER-INF\jndi.properties.
  2. Edit the SERVER-INF/jrun.xml file on the remote machine and set the RMI port to the same fixed value in the RMI Broker section. Note this is set to zero and commented out by default. For example:
     <!-- ================================================================ --><!-- This Service creats a common RMI Broker for use by all JRun RMI. --><!-- It is a Clusterable Service.                                     --><!-- ================================================================ --><service outputclass="jrunx.rmi.RMIBroker" name="JRunRMIBroker"><attribute name="bindToJNDI">true</attribute><attribute name="clusterAlgorithm" type="jrunx.cluster.RoundRobinAlgorithm" /><attribute name="port">4321</attribute><!--<attribute name="serverSocketFactoryClass"></attribute><attribute name="clientSocketFactoryClass"></attribute>     --></service> 

You can then open this RMI port, as well as the JNDI port, in your firewall and wsconfig should be able to configure your web server connector.

Also note that on UNIX systems, depending on what build of wsconfig.jar you are using, you may have to open the JNDI port, as well as one greater than the JNDI port you specify with the-DWSConfig.PortScanStartPort and-DWSConfig.PortScanCount switches. In the above example, with -DWSConfig.PortScanStartPort=2920 -DWSConfig.PortScanCount=1, one would have to open ports 2920 and 2921. This is a bug that was fixed in JRun 4 Updater 6.

Note that if the two machines are on different subnets, you will also need to modify the jrun.trusted.hosts and/or jrun.subnet.restriction property in the security.properties file, as detailed in the following:

Additional Information


AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support

Document Details

ID:8a0aaf29

Products Affected:

coldfusion
jrun