The wsconfig utility that installs the webserver connector for ColdFusion MX tries to establish TCP connections to the JRun server on two ports for the installation process, the JNDI port and the RMI port. Here's how to control both. I recently learned that this RMI port can be controlled and not left to default to a high random port. This is the primary point I'm trying to convey in this post, since much is written about the JNDI port already. You can edit the RMI property in the jndi.properties file to change the value
First it will scan the port range 2900 - 3000 to find out whats listening, then it will begin to connect to each active port discovered in that range starting at 2900. The target port is referred to as the JNDI port that the JRun server listens on. A server's JNDI port is defined in jndi.properties such as with the following setting
java.naming.provider.url=localhost:2920
Second, upon successful communication with the JRun server on the JNDI port, the JRun server will instruct wsconfig to complete the second half of the communication on the RMI port. By default, this is a high *random* port. So this is where most Linux folks running a firewall go wrong. They allow for the JNDI port but don't know about the high random port for RMI.
This two part process is described in more detail in my blog post Tracing wsconfig with Ethereal Network Analyzer.
jrun.naming.rmi.port=0 to
jrun.naming.rmi.port=[YOUR_PORT_HERE]
The jndi.properties file which has settings for both the JNDI and RMI ports can be found in this location for ColdFusion Server Configuration:
cf_root/runtime/servers/coldfusion/SERVER-INF/jndi.properties
Then restart ColdFusion and open the JNDI and RMI ports in the firewall.
The wsconfig utility will communicate with the JRun server over the JNDI port and the RMI port only during the webserver configuration process. Knowing about how to control the RMI port used for wsconfig should help overcome most problems encountered with this on Linux. Once the webserver is configured for ColdFusion or JRun, the webserver connector stub will communicate with the CF/JR server over the JRun Proxy Port, which is usually in the range of 51010-51020. More about how the webserver connector works after its installed can be found in my blog entry How ColdFusion Receives and Processes Requests.
A technote by David Stanten of Macromedia is pending that will elaborate more on the use of RMI ports in ColdFusion or JRun.
Some related technotes on wsconfig ports that may also be of interest are:
#1 by Dave Carabetta on 11/23/05 - 4:26 PM
Setup of session replication failed.
[1]java.rmi.RemoteException: The web application `cfusion` could not be found to accept sessions for replication.
Tons and tons of those entries. I`m certainly not asking for tech support through your blog (much as it might come off that way), but this post lit a bulb and I`m wondering if there`s some port issue (whether it be the aforementioned slash in the url or otherwise).
Regards,
Dave.
#2 by Steven Erat on 11/23/05 - 4:50 PM
#3 by Dave Carabetta on 11/23/05 - 4:59 PM
#4 by Jorge Tejada on 11/26/05 - 9:06 AM
Everything went well, But since I test flash remoting, it didn`t work.
What am I doing wrong?
#5 by Steven Erat on 11/26/05 - 2:10 PM
Flash Remoting uses the port that you specify in the connection gateway, but no other ports when connecting to a data source like a ColdFusion server CFC. Usually this is just port 80 or 443 if you use SSL. The ports involved in wsconfig configuration don`t affect flash remoting.
I recommend that you use the Flash Remoting Net Connection Debugger to see how the connection looks to the Flash side, and also monitor the JRun logs (ColdFusionMX7/runtime/logs) at the same time while looking for errors or messages.
If you are using CFMX on the full version of JRun, you might want to check this entry:
[a href="http://www.talkingtree.com/blog/index.cfm/2004/9/1...5/flashgateway" target="_blank"]http://www.talkingtree.com/blog/index.cfm/2004/9/1......[/a]
Otherwise, here are a few links that might help:
[a href="http://www.evolt.org/article/Flash_Remoting_Demyst...ified/17/48594/" target="_blank"]http://www.evolt.org/article/Flash_Remoting_Demyst......[/a]
[a href="http://www.macromedia.com/software/flashremoting/" target="_blank"]http://www.macromedia.com/software/flashremoting/[/a]
[a href="http://www.flashgoddess.com/forum/viewtopic.php?t=836&postdays=0&postorder=asc&start=0&sid=2d0c4f27f75790141b7ab5aec495fd78" target="_blank">http://www.flashgoddess.com/forum/viewtopic.php?t=..." target="_blank"]http://www.flashgoddess.com/forum/viewtopic.php?t=...[/a]
#6 by Jorge Tejada on 11/27/05 - 8:52 AM
Our boss want us to demo him that we can access to this application from Internet, but the problem was that our Web Server is on a FC2 64-bits version, so we installed CFMX on the internal network Windows server and did NAT to it from the Linux server. We want it working `cause we want our boss buy a cfmx standard license.
Thanks for the links.
#7 by Steven Erat on 11/27/05 - 7:42 PM
#8 by Steven Erat on 4/22/06 - 12:40 PM
[a href="http://www.macromedia.com/cfusion/knowledgebase/in...dex.cfm?id=8a0aaf29" target="_blank"]http://www.macromedia.com/cfusion/knowledgebase/in......[/a]