JRun wsconfig error- Security alert: attempt to connect to JRun server from host

I was experimenting with the Railo 3.3 installer, which includes an IIS connector to Tomcat, which works really well.   Too well in fact!  When I ran it, it actually unmapped all my existing IIS ISAPI mappings to JRun and was sending all requests to Tomcat.

I decided the quickest fix to this would be to simply open up /JRun4/bin/wsconfig.exe and remap the sites that were no longer connected.  However, when I did this, I received the following error:

Could not connect to JRun/ColdFusion servers on host localhost.

Knowing perfectly well that I had an instance of JRun running, I went to the terminal to look at the standard out and saw this:

Security alert: attempt to connect to JRun server from a 10.252.11.207 host

In case that is too hard to read, it says: “Security alert: attempt to connect to JRun server from a 10.252.11.207 host”.   I suspect that because I am attached to a WIFI connection with an IP Address on 192.168.*, and then VPN’d into my company with a second address of 10.252.*, JRun assumes that the connection attempt is coming from outside the subnet.

I went digging through files in JRun4/lib and came across security.properties.  In this file, there is a default setting:

jrun.subnet.restriction=255.255.255.0
jrun.trusted.hosts=
jrun.subnet.restriction.ipv6=[ffff:ffff:ffff:ffff:0:0:0:0]

I altered that restriction  setting from “255.255.255.0″ to “*” like this:

jrun.subnet.restriction=*
jrun.trusted.hosts=
jrun.subnet.restriction.ipv6=[ffff:ffff:ffff:ffff:0:0:0:0]

Once I did this and restarted the server, I was able to use wsconfig without issue.  And my ACF sites are pointed to JRun, my Railo sites are pointed to Tomcat, and all is right in the world again.

NOTE: DO NOT DO THIS ON A PRODUCTION MACHINE!   If you do, I strongly recommend that it is a very temporary change.

Creating the equivalent of IIS Virtual Directories in Apache

I have to admit that I used to be guilty of laziness on one aspect when I began using Linux/Apache a couple of years ago as a convert from Windows. I didn’t immediately understand how to create the equivalent of virtual directories in Apache that are available in IIS. I soon found that I could just do symbolic links at the file level that would effectively give me the same effect at the broswer request level. However, one big negative is that there is a linked directory sitting there in the parent directory, which is a pain in the tail when it things like source control such as subversion comes into play. When I browse to a directory in a terminal or my IDE, I don’t necessarily want to see it either. The answer is to use the “Alias” directive in Apache.

Example:

As a ColdFusion developer, I like to have a CFIDE directory available in my webroot as I develop so that I can access the ColdFusion administrator. I keep my CFIDE directory in /usr/local/apache2/htdocs/CFIDE.

To make that available as a virtual directoy, I need to add the following to my Apache virtual host definition:

Alias /CFIDE /usr/local/apache2/htdocs/CFIDE
<Directory /usr/local/apache2/htdocs/CFIDE>
Order allow,deny
Allow from all
</Directory>

Just remember to remove that one before you put it in production!

Strange issue with suspected latency… anyone???

I have several applications on a server that is exhibiting a long string of oddball behavior that is often unreproducible on other machines.   I have exhausted all that I know to search for on the current issue and thought I would post it here in case anyone happened to have some thoughts about it.

This server (Windows 2003/IIS/CFMX6.1) has been running somewhat normally for a year or so with the code that is on it.  Lately however, when many pages load, they behave as though they are missing some of the HTML or Javascript.  Javascript-dependent menus fail, or sometimes no text at all will be displayed on the screen.  If you view the source, all the code is there.  If you copy that source into a new template and run it, it works fine.  It is almost like the browser is just receiving instructions in the wrong order or something and doesn’t know what to do.  This problem is completely reproducible on the pages that it happens on, but only on that server.  This problem also only happens with Internet Explorer.

My thoughts are that it can’t have anything to do with ColdFusion.  I base this on the fact that the HTML is clearly being written.  It seems to me that it has to be something going on with IIS and how it is delivering the content to the browser.

If anyone has any experience with similar problems, I would love to hear some opinions.

EDIT:
After taking this server offline and bringing it back to the office from the colocation facility, we found that the problem lied with IIS.  We backed up the sites, removed IIS and reinstalled it and it magically worked again.   I will refrain from using the opportunity to express how this has never happened to me using Apache… oh ummm… well, I guess I just did.