Entries Tagged as 'ColdFusion'

ColdFusion 9 CentOS 6 Connector Issues

Just had an experience installing ColdFusion 9 on to a CentOS 6 system and ran into an issue installing the web connector. I'll step through the process I went through and maybe it will help others installing Adobe ColdFusion on to CentOS 6.

Right after the installation, I got the following error message:

Running apache connector wizard...
=======================================
There was an error while running the connector wizard
Connector installation was not successful
=======================================

This is the output of the cf-connectors.sh script, located here:

/opt/coldfusion9/bin/cf-connectors.sh

You can manually run that script and get the same error message. Looking at the script, I saw I kept a log of it's issues in the following file:

/opt/coldfusion9/ConnectorInstall0.txt
SELinux Penguin Logo

So I naturally checked it out. The first error I got had to do with Apache APXS not being installed. Again, my CentOS 6 install was a "minimal" install, so I was used to installing additional packages to get things to work properly. To address this issue, I just ran the following:

yum -y install httpd-devel

Then ran the cf-connectors.sh file again, and ran into a different issue this time. This one was more peculiar:

Starting httpd: httpd: Syntax error on line 892 of /etc/httpd/conf/httpd.conf: Cannot load /opt/coldfusion9/runtime/lib/wsconfig/1/mod_jrun22.so into server: /opt/coldfusion9/runtime/lib/wsconfig/1/mod_jrun22.so: failed to map segment from shared object: Permission denied

That's odd... I'm running as "root", I shouldn't be getting permission issues. As it turns out, this error is due to SELinux being enabled. However, I an not at liberty to disable SELinux for this particular project, so I had to find a different way. Turns out, the fix just ended up being a simple one-liner to adjust the SELinux config:

chcon --reference=/usr/sbin/httpd /opt/coldfusion9/runtime/lib/wsconfig/1/mod_jrun22.so

After that, Apache started right up and my SELinux rules are still happily in place!

Hope this helps.

A Look Inside a Vivio VPS Platform Server

In my recent post, "What 256GB of RAM Looks Like", I showed some pictures of some RAM that Vivio had bought to put in to a couple of new platform machines. After that post I got a couple of requests to see it inside the servers that it was going to be in, so I took some pictures of one of the two new Platforms we built this month for those of you who might be interested in seeing the platform machines we use.

vivio vps inside

There are two Opteron 8-Core CPU's here, for a total of 16 CPU cores. The RAM is the same RAM that I showed in the pictures earlier. Each RAM module is 8GB, making for a total of 128GB in each of the two servers we put together this month. The CPU's and RAM are cooled using passive cooling and a fan "funnel" (at least I think that's what it's called) in which 4 separate fans drive air through the funnel.

vivio vps HDD array sas

This platform will be named "Arcticwolf" - which indicates this particular server will be used for Windows VPS Accounts. It will contain 16 Seagate Constallation SAS drives (14 usable and 2 spare). The amount of drive space we will be providing by default in new VPS Accounts will increase (a great deal) in the not too distant future as the price of exceptional drive arrays like this one goes down.

vivio vps psu

The system comes complete with redundant PSU's, so if one of them fails, we can replace it without needing to shut the machine down. 

Personally, I think these servers are just plain awesome in carnate, but that's probably just my predjudice talking. ;)

Testing For Headless Mode in ColdFusion (CFML)

Just recently I found myself needing to verify if a server I was working on - which required image manipulation - was actually running in headless mode. On Linux servers, graphical user interfaces (GUI's) aren't usually running because they take up additional resources (like memory) and server administrators usually want to give all the resources they can to actual server processes rather then a GUI which they only use occasionally. However, the JRE that ColdFusion engines run on needs the window processing engines in order to perform graphic manipulation - image resizing, rotating, etc - all require image processing libraries.

Java Thumbs Up LogoThe following code bit allows you to see if your CFML engine (Railo, OpenBD, or ACF) is actually running in headless mode. This is useful if you're debugging a pesky image processing problem and you want to make sure your JRE's access to the XORG libraries aren't the problem.

 

<cfobject  
    action=create  
    name=geObj
    type="JAVA"  
    class="java.awt.GraphicsEnvironment">
<cfset geResponse = geObj.isHeadless()>
<cfdump var="#geResponse#">

 

The code calls java directly and returns a true or false response if you're running in headless mode or not.

Hope this helps!

Making CFIDE Available to all Apache VirtualHosts

When working with ColdFusion on Linux, you may encounter a situation where you want to make the contents of the CFIDE folder available to all sites that are hosted on that server. The reason you might want to do this is for things like CFFORM to work properly on a host that doesn't physically have the CFIDE directory located in that site.

The solution for this is an Apache Alias. Add an alias to the Apache httpd.conf file similar to this:

Alias /CFIDE /var/apache/htdocs/CFIDE/
Alias /cfide /var/apache/htdocs/CFIDE/

Adjust the second path to actually point to where your primary CFIDE folder is located. It's usually your default site, but it can be changed during the install.

Further, for best security practices, take a look at Pete Freitag's guide to locking down the CFIDE directory. The PDF file he provides offers cusotm apache configs for locking down unused CFIDE services and thus lowering the attack surface that bad guys might use to access your box:

http://www.petefreitag.com/item/758.cfm

daylight