ColdFusion 11 Update 3 early access is avaiable now!

ColdFusion 11 Update 3 early access build is available for testing and feedback.

The list of bugs fixed and what’s new in this update can be found below.

Issues_Fixed

ReleaseNotes

We always appreciate your valuable feedback.

NOTE: For those users who have already applied update 3, they have to un-install it and re-download the latest build to install it again. The latest build number should be 11,0,03,292024(PreRelease)

 

Introducing IIS application pool ‘Idle Timeout Action’

In this post, we will discuss about the new setting ‘Idle Timeout Action’ introduced with IIS 8.5 web server. Before I start discussing usage of ‘Idle Timeout Action’. I would like to tell what the Idle Timeout is.

IIS provides the administrator with an option of timing out a worker process that is idle for a specified period of time. This is a good option for sites that are not accessed very often because it frees up system resources when the site is idle. The disadvantage is that the next time the site is accessed, the user will need to wait for the worker process to start again.

With IIS 8.5, it provides an option of suspending an idle worker process than terminating it. A suspended worker process remains alive but is paged-out to disk, reducing the system resources it consumes. When a user accesses the site again, the worker process wakes up from suspension and is quickly available. When an idle worker process is terminated, the worker process is shut down and the startup period will be longer when the site is subsequently accessed. The default behavior is to terminate the idle worker process, and the same behavior is used in the previous versions of IIS.

This setting can be changed at the application pool level. But how to check which application pool is being used by the website.

Follow these steps to check application pool name:

1. Open IIS manager.

2. Select website from Connections pane.

3. Click ‘Basic Settings’ from the Actions pane.

4. Check the name of application pool from ‘Edit site’ dialog box.

After checking the application pool name, follow below mentioned steps to change the value of ‘Idle Timeout Action’ property:

1. Navigate to Connections pane > Application Pools.

2. Select <Application Pool Name> and then click Advanced settings from the Actions pane.

3. In Advanced settings dialog box, under Process model, change the value of Idle Time-out Action property to Suspend.

4. Click OK.

 

Reference: http://www.youtube.com/watch?v=hkizFsHDexA

 

 

 

 

 

 

 

How to enable verbose logging at connector level in ColdFusion

Increasing logging verbosity at the connector level can be helpful in quick problem identification and resolution as it can pinpoint where the problem is, when an external web server is being used with  Adobe ColdFusion.

ColdFusion 10 and 11 supports IIS and Apache web server. I will show how to enable verbose logging on both web servers.

When we configure connector with an external web server. ColdFusion creates configuration file and store them at <cf_install_root>/config/wsconfig/<Magic Number>.

IIS

To enable verbose logging at IIS level,

  • Set log_level property value from info to debug, in the isapi_redirect.properties file located at <cf_install_root>/config/wsconfig/<Magic Number>.
  • Restart web server for changes to take effect.

Now, It should start logging verbose information about each and every request served over connector in log file named isapi_redirect.log available in the same configuration directory.

If you have more than one website configured with ColdFusion, each website has its own numbered directory available at <cf_install_root>/config/wsconfig/. You should make the changes only in the intended website.

To ensure the configuration directory for specific website, navigate to IIS Manager > Sites > {Site Name} > Jakarta virtual directory. Right click on jakarta virtual directory and click on explore, it will open connector configuration directory for that specific website.

Apache

To enable verbose logging at Apache level,

  • Set JkLogLevel property value from info to debug, in the mod_jk.conf file located at <cf_install_root>/config/wsconfig/<Magic Number>.
  • Restart web server for changes to take effect.

For Apache, it logs verbose information into a log file named mod_jk.log available in the same configuration directory.

 

 Important Notes:

  • In production environment, verbose logging should not be enable for long span of time as it logs very detailed information which may lead to high memory consumption and it also impacts performance.
  • Before making any changes, you need to ensure you are making changes to the intended connector configuration file.

 

 

ColdFusion 11 Update 1 is available now.

Adobe releases ColdFusion 11 update 1 today.

This update includes important bug fixes for databases listed below.

Bug #3217374

It includes support for Geography, Geometry and HierarchyID data types in SQL Server.

Bug #3785178

When a cfstoredproc executes an SQL statement in an Oracle PLSQL statement that returns many empty values for a varchar2 data type  column it becomes extremely slow. This issue was observed in ColdFusion 11.  After applying this update, I have noticed significant improvement in the performance .

Bug #3759846

In ColdFusion 11, there was issue while creating ODBC Socket data source on windows platform. It does not allow you to create the ODBC Socket data source.

For more details refer tech note article.

How to change/upgrade JDK version of ColdFusion server

In this blog, we will discuss how to upgrade the latest minor version of JDK(Java Development Kit) of the ColdFusion server. ColdFusion can run only on top of JDK or JRE with Server VM. Oracle also started providing separate download links for JRE and Server JRE. ColdFusion only works with JDK or Server JRE and not with Client JRE [For more details refer article].
 
ColdFusion 10 and 11 can be installed in two modes:
  • Standalone installation
  • Deployment on JEE servers (IBM Websphere, Oracle Weblogic, JBoss etc.)
If ColdFusion server is deployed on any JEE application server, then documentation for respective application server should be followed in order to change the JDK of the underlying application server.
In standalone installation, there are two ways to change the JDK or Server JRE of ColdFusion server:
 
  1. Using ColdFusion administrator console.
  2. By changing the JDK or Server JRE path from the jvm.config file.
 
1. Using ColdFusion administrator console.
 
  • Download the latest minor version of the supported JDK or Server JRE.
  • Install the JDK or Server JRE.
  • Navigate to ColdFusion Administrator > Server Settings > Java and JVM section.
  • Browse the path to the JDK or Server JRE from the “Java Virtual Machine Path” textbox which you intended to use with ColdFusion.
  • Click “Submit Changes”.
  • Restart the ColdFusion Application service.
 
 
2. By changing the JDK or Server JRE path from the jvm.config file
  • Download the latest minor version of the supported JDK or Server JRE.
  • Install the JDK or Server JRE.
  • Open jvm.config file located at <cf_install_root>\cfusion\bin.
  • Change the value of java.home to the JDK or Server JRE path. [For example: C:\\Program Files\\Java\\jdk1.7.0_25\\jre or C:/Program Files/Java/jdk1.7.0_25/jre]
  • Save the changes to the jvm.config file.
  • Restart the ColdFusion Application service.

 

Important Note:
  • It is not recommended to change the JDK version on the production servers without any prior testing in the staging environment.
  • Any SSL certificates added to the previous JDK will also need to be re-added to the new JDK(cacerts) file.
  • JDK or Server JRE location used, should be correct, otherwise ColdFusion server will not start.
    • If JDK is being used, then path should point till JRE directory available inside JDK home directory. For example, JDK installed directory is C:\Program Files\Java\jdk1.7.0_25, then the path which should be used used in ColdFusion would be C:\\Program Files\\Java\\jdk1.7.0_25\\jre or C:/Program Files/Java/jdk1.7.0_25/jre.
 
 
 
 
Please leave your comments and queries about this post in the comment sections in order for me to improvise my skills.

How to configure ColdFusion WebSocket service over SSL

In this blog, I will discuss how to configure ColdFusion WebSocket service over SSL using self-signed certificate created using keytool. If you are using self-signed certificate to configure WebSocket over SSL, then ColdFusion server should also be running over SSL. I will be explaining it with the help of simple example.

NOTE: This feature is introduced in ColdFusion 11. 

To configure ColdFusion server over SSL follow below mentioned steps:

1. Create Keystore:
keytool -genkey -keyalg RSA -keystore C:\websocket.crt -storepass changeit -alias wss -keypass changeit -validity 365

Keystore contains the private key and certificate. The supported certificate type are JKS(Java Keystore) and pkcs12.
2. Configure ColdFusion to run over SSL:

a. Uncomment “<Connector port=”8443″ protocol=”HTTP/1.1″ SSLEnabled=”true”  maxThreads=”150″ scheme=”https” secure=”true”   clientAuth=”false” sslProtocol=”TLS” />” this section in server.xml file available at <cf_install_root>/cfusion/runtime/conf.
b. Change value of “Protocol” attribute from “HTTP/1.1” to “org.apache.coyote.http11.Http11NioProtocol” in the Connector tag.
c. Add these attributes to above mentioned tag:
i. keystoreFile
ii. keystorePass
d. After adding these attributes, it should look like: “<Connector port=”8443″ protocol=”org.apache.coyote.http11.Http11NioProtocol” SSLEnabled=”true”  maxThreads=”150″ scheme=”https” secure=”true”   clientAuth=”false” sslProtocol=”TLS” keystoreFile=”C:\websocket.crt” keystorePass=”changeit”/>
e. Save Changes.
f. Restart ColdFusion service.
g. Access ColdFusion administrator console using the following URL: https://127.0.0.1:8443/CFIDE/administrator/index.cfm

3. Configure Websocket to run over SSL:
a. Access ColdFusion administrator console.
b. Navigate to ColdFusion Administrator > Server Settings > WebSocket.
c. Check “SSL Port” checkbox.
d. Enter keystore location and password [which we created in step #1 Create Keystore ].
e. Submit Changes.
f. Restart ColdFusion service.

4. Create a sample CFML template to verify the configuration.

Application.cfc

component
{
this.name = “sample”;
this.wschannels = [{name=”demo”}];
}

Index.cfm

<html>
<head>
<title>Websocket Example</title>
<script>
//messagehandler recieves all the messages from websocket
function mycbHandler( messageobj)
{
var message = ColdFusion.JSON.encode(messageobj);
var txt=document.getElementById(“myDiv”);
txt.innerHTML +=message  +”<br>”;
}//openhandler is invoked when socket connection is
function openHandler()
{
var txt=document.getElementById(“myDiv”);
txt.innerHTML +=”open Handler invoked <br>”;
}
</script>
</head>
<cfwebsocket name=”mywsobj” onMessage=”mycbHandler” subscribeTo=”demo” onOpen=”openHandler” secure=”true”/>
<div id=”myDiv”></div>
</html>


5
. Try to access this CFML template using ColdFusion over SSL port using Chrome web browser or any other browser with debugging capability.

6
. In my case, it is Google chrome.  Press F12 and navigate to the Network section to check whether websocket request is being served over SSL or not.





Please leave your comments and queries about this post in the comment sections in order for me to improvise my skills.