Service not available on ColdFusion host after Java update

We are running a bunch of ColdFusion based servers on Windows. As you probably know, ColdFusion is in fact written in Java. It requires Java to work properly.

Background

In the typical installation of version 2016 and below (we have no 2018 in our portfolio), the whole Java engine is stored in the ColdFusion home directory, in the “jre” subdirectory. Unfortunately, this is an old Java version. For example, in ColdFusion 10, the default Java is version 7 (version 6 in older installation). This means that it has a problem handling TLS 1.1 and 1.2 connections and offers a lot of security-related issues out of the box. Also, the updates provided by Adobe requires to update the Java version. For example, with ColdFusion 10, if you want to install update 14 or newer, you have to switch to Java 8. For ColdFusion 11, you have to switch to Java 8 with the update 3 or newer.

The issue

On our servers, we are trying to keep the Java 8 in the most current version. It is typically installed in the dedicated directory and the automatic updates are turned off. Why? Because from time to time, if the updates are performed automatically we are surprised with the message:

Service not available

The ColdFusion service is stopped and it fails during the startup process. You can take a look at the Event Viewer, in the Application section you can find such an error message related to the ColdFusion server:

The description for Event ID 259 from source ColdFusion 10 Application Server cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

ColdFusion 10 Application Server

This one is not very descriptive, isn’t it?

The solution

This message appears typically after the server restart. This is caused by the fact that the Java engine was updated in the meantime, but the old files were still in use by the server. Once the server is restarted, they are no longer available and it leads to the problems with ColdFusion.

If you have your ColdFusion running, you can change your Java location and parameters in the ColdFusion administrator interface. Of course, if the server is not working, the administration interface is not working too. Fortunately, the configuration can also be changed in the configuration file.

In order to provide the new Java location, edit the file named:

{ColdFusionHome}\cfusion\bin\jvm.config

In this file, you will find “java.home” variable. Set it to the proper Java location:

java.home=C:\\Program Files\\Java\\jre1.8.0_191

Please note that you should use a double backslash. Once this file is updated, you can save it and start ColdFusion service again. This time it should work properly – till the next Java update. This is why we are turning this off and performing Java updates manually.

2 Replies to “Service not available on ColdFusion host after Java update”

  1. I’m having similar issue. I have virtual machine running for all my local CF development. I updated the Java on the virtual machine and Coldfusion stopped working. Same error “Service not available”. I did the steps you suggested and it still doesn’t work. So I went to the Windows event log and then system, and the actual error received is: “The Coldfusion 11 Application Server service terminated with the following service specific error: The system cannot find the file specified.”

    So what should I try next?

    1. Most likely when you were pointing to the JRE you mixed the directory path (you selected wrong path, too shallow or too deep path).

      You can now go to the directory of [ColdFusion installation path]/cfusion/bin – here you should find two files:
      jvm.config and jvm.bak

      In the jvm.bak file there is an old version of java.home variable. Copy it to the jvm.config and try to start ColdFusion. It will execute on the OLD version of java.

      Now, once it is running, check what went wrong. The Java path should point to the place where JRE is installed, but not to the bin folder. So, if your Java is installed in C:\Java\jre_1.8.282\ point ColdFusion to this directory, not to the C:\Java\jre_1.8.282\bin\ I know that the Java executable is in the “bin” folder, but you should point ColdFusion to directory one level up.

      Please let me know if this worked for you.

Leave a Reply

Your email address will not be published.