Troubleshooting

How to Fix ColdFusion Service Not Restarting on Windows

Contents show

Overview of the Problem

When the Adobe ColdFusion Application Server service on Windows refuses to start or restart, your applications become inaccessible, Scheduled tasks stop running, and administrators lose access to the ColdFusion Administrator. The condition typically appears after Configuration changes, Java/JDK updates, system patches, or resource constraints. On Windows, ColdFusion runs as a service using a Windows service wrapper (Apache Commons Daemon/prunsrv). If the JVM fails to initialize or Tomcat (bundled with ColdFusion) encounters a fatal error, the wrapper stops the service silently or with a generic “service-specific error” message.

Understanding where the startup fails—Windows service wrapper, JVM bootstrap, or Tomcat initialization—helps you quickly pinpoint the cause and apply the right fix.


Possible Causes

Common reasons ColdFusion won’t restart on Windows include:

  • Misconfigured or incompatible Java path/version in jvm.config
  • Invalid or extreme JVM options (e.g., heap too large, unsupported GC flags)
  • Port conflicts (e.g., 8500/8501 HTTP(S), 8005 shutdown, 8009/8012 AJP)
  • Permissions issues for the service account or file/folder ACLs
  • Corrupted OSGi/Tomcat caches or temp files
  • Damaged or mismatched service wrapper Configuration
  • Stale java.exe/javaw.exe processes holding resources
  • Incomplete/failed hotfix updates or corrupted libraries
  • 32-bit vs 64-bit mismatch (JDK vs ColdFusion)
  • Antivirus/EDR locking jars or preventing JVM load
  • Broken server.xml or other configuration files

Quick Cause/Solution Reference

  • Cause: Wrong java.home or unsupported Java version
    • Solution: Correct java.home in jvm.config; install a supported JDK/JRE for your ColdFusion version
  • Cause: Invalid JVM args or memory too high
    • Solution: Revert jvm.config to backup; reduce -Xmx; remove unsupported flags
  • Cause: Port in use (8500/8005/8009)
    • Solution: Free the port or change it in server.xml
  • Cause: Permission errors for service account
    • Solution: Grant Log on as a service and Modify permissions to ColdFusion directories
  • Cause: Cache/temp corruption
    • Solution: Stop service and clear cfusion\runtime\temp and cfusion\runtime\work (and OSGi cache)
  • Cause: Service wrapper corruption
    • Solution: Remove and reinstall the ColdFusion Windows service via service.bat
  • Cause: Stale Java process
    • Solution: Kill lingering java.exe/javaw.exe, then start service
  • Cause: Failed update or bad jar
    • Solution: Temporarily move latest hf-*.jar from cfusion\lib\updates and retry
See also  How to Resolve ColdFusion Startup Timeout Issues

Step-by-Step Troubleshooting Guide

Step 1: Confirm Status and Gather Initial Clues

  • Open Services (services.msc) and try to start the ColdFusion service. Note any error codes.
  • Check Windows Event Viewer > Windows Logs > Application for related entries.
  • Record the service name (e.g., “Adobe ColdFusion 2023 Application Server”).

Helpful commands (Run as Administrator):

sc query “Adobe ColdFusion 2021 Application Server”
sc qc “Adobe ColdFusion 2021 Application Server”

Look for StartType, Binary Path, and account identity.


Step 2: Inspect ColdFusion and Tomcat Logs

Check these folders (paths vary by version/installation directory):

  • C:\ColdFusion2021\cfusion\logs\
  • C:\ColdFusion2021\cfusion\runtime\logs\

Key files:

  • coldfusion-error.log
  • exception.log
  • application.log
  • runtime logs (catalina..log, localhost..log)

Look for “OutOfMemoryError,” “Address already in use,” “Unsupported class file major version,” or “Could not find jvm.dll.”

Example error snippets:

SEVERE [main] org.apache.catalina.core.StandardService.startInternal
Failed to start connector [Connector[AJP/1.3-8009]]
java.net.BindException: Address already in use: bind

java.lang.OutOfMemoryError: Metaspace

Unsupported class file major version 61

Wrapper log example:

[error] The Java Virtual Machine has exited with a code of 1, the service cannot be started.


Step 3: Try Console Mode to See Live Errors

Sometimes the service dies too quickly to capture the cause. Run ColdFusion or Tomcat in console:

Option A (ColdFusion script, if present):

C:\ColdFusion2021\cfusion\bin\cfstart.bat

Option B (Tomcat direct):

cd C:\ColdFusion2021\cfusion\runtime\bin
catalina.bat run

Watch the console output for instant error details.


Step 4: Validate Java Configuration

ColdFusion uses the JVM pointed to by jvm.config.

  • File: C:\ColdFusion2021\cfusion\bin\jvm.config
  • Check the java.home entry. Ensure jre/bin/server/jvm.dll exists under that path.

Example minimal, sane jvm.config excerpt:

java.home=C:/ColdFusion2021/jre
java.args=-server -Xms512m -Xmx2048m -XX:MaxMetaspaceSize=512m -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true

Best practices:

  • Ensure Java version is supported by your ColdFusion release (e.g., CF2018 doesn’t support Java 17 or 21).
  • If you recently “upgraded Java,” revert to the bundled JRE or install a supported JDK and update java.home accordingly.
  • Remove experimental or deprecated flags (e.g., CMS GC in newer Java, PermSize flags in Java 8+).

If in doubt, restore a known-good backup of jvm.config.


Step 5: Resolve Port Conflicts

Common ports used by ColdFusion/Tomcat:

  • 8500 (HTTP), 8501 (HTTPS)
  • 8005 (shutdown)
  • 8009/8012 (AJP)

Find conflicts:

netstat -ano | findstr “:8500”
netstat -ano | findstr “:8005”

If a PID is shown, identify it:

tasklist /fi “PID eq

Fixes:

  • Stop the conflicting process.
  • Or edit server.xml (C:\ColdFusion2021\cfusion\runtime\conf\server.xml) to use different ports, then restart.

Example server.xml connector (change port attribute cautiously):

Remember to back up server.xml before editing.


Step 6: Clear Work/Temp/OSGi Caches

Stop the service. Then delete the contents (not the folders themselves):

  • C:\ColdFusion2021\cfusion\runtime\temp*
  • C:\ColdFusion2021\cfusion\runtime\work*
  • If present, OSGi cache: C:\ColdFusion2021\cfusion\osgi\configuration\org.eclipse.osgi*

Restart the service. Cache corruption can prevent the server from bootstrapping.


Step 7: Check Permissions and Service Account

  • In Services, open the ColdFusion service > Log On tab.
  • If using a domain or custom account, verify:
    • “Log on as a service” right
    • Read/Execute on installation dirs, Modify on logs, temp, and work folders
  • On NTFS, grant Modify to:
    • C:\ColdFusion2021\ (install root)
    • C:\ColdFusion2021\cfusion\logs\
    • C:\ColdFusion2021\cfusion\runtime{temp,work,logs}

If testing, try Local System to rule out permission issues (then revert to least privilege).

See also  How to Fix ColdFusion Service Not Responding After Patch

Step 8: Kill Stale Java Processes

A previous stop may have left java.exe running, holding ports or files.

tasklist | findstr /i java
taskkill /f /pid

After killing stale processes, start the service again.


Step 9: Recreate the Windows Service

If the wrapper configuration is broken, remove and reinstall the service.

Run as Administrator:

cd C:\ColdFusion2021\cfusion\bin
service.bat -remove
service.bat -install

Check again in Services and start it. If your environment uses a custom service name, reconfigure accordingly after installation.


Step 10: Roll Back a Problematic Update (If Needed)

If the problem started immediately after a ColdFusion update:

  • Stop the service.
  • Navigate to C:\ColdFusion2021\cfusion\lib\updates\
  • Temporarily move the most recent hf-*.jar (hotfix) outside the folder.
  • Start ColdFusion.

If it starts, you can reapply the update properly later. Always snapshot/backup before updates.


Step 11: Validate 64-bit/32-bit Consistency

Ensure the ColdFusion install (64-bit) uses a 64-bit JDK/JRE. Mixing 32-bit java with 64-bit ColdFusion (or vice versa) prevents the JVM from loading. The wrapper logs may mention “jvm.dll” load failure.


Step 12: Antivirus/EDR and Locked Files

Temporarily exclude the ColdFusion installation directories from antivirus scanning, especially:

  • C:\ColdFusion2021\
  • Logs and temp/work directories

Some EDR tools lock jar files during scanning and can block startup.


Step 13: Last Resorts

  • Restore from a known-good backup (installation directory and configuration files).
  • Run an in-place repair or reinstall ColdFusion, then reapply supported updates.
  • If running behind IIS/Apache via connectors, ensure connector changes didn’t break Tomcat’s server.xml. Rebuild connector only after ColdFusion successfully starts.

Detailed Diagnosis by Symptom

Symptom: Service starts then stops immediately

  • Likely JVM bootstrap failure, bad jvm.config, or incompatible Java.
  • Fix: Correct java.home and java.args; check wrapper logs for jvm.dll load errors.

Symptom: “Service did not respond in a timely fashion”

  • Tomcat initialization taking too long or failing silently.
  • Fix: Run catalina.bat run to see errors; verify ports and Memory settings.

Symptom: Ports already in use in logs

  • Another process bound to 8500/8005/8009.
  • Fix: netstat > kill or reconfigure ports in server.xml.

Symptom: OutOfMemoryError or Metaspace

  • Heap/metaspace too small or leak at boot.
  • Fix: Increase -Xmx/-XX:MaxMetaspaceSize; clear caches; investigate startup code.

Symptom: Unsupported class file major version

  • Java too new for this ColdFusion build or update level.
  • Fix: Use supported JDK; consult Adobe support matrix for your CF version.

Common mistakes and How to Avoid Them

  • Editing jvm.config or server.xml without a backup
    • Avoidance: Always copy to .bak before changes.
  • Setting -Xmx larger than system capacity
    • Avoidance: Keep headroom for OS/other services; test increments.
  • Applying a Java update without verifying ColdFusion compatibility
    • Avoidance: Check Adobe’s supported JDK versions per CF release.
  • Forgetting to run administrative shells
    • Avoidance: Open CMD/PowerShell as Administrator for service scripts.
  • Not checking catalina logs
    • Avoidance: Always review cfusion\runtime\logs when services fail.
  • Leaving antivirus to scan the CF installation in real-time
    • Avoidance: Configure AV exclusions for CF directories.
  • Overediting server.xml (e.g., malformed XML)
    • Avoidance: Use a proper editor; validate XML; change one thing at a time.

Best practices for Stability and Prevention

  • Maintain environment parity
    • Mirror staging and production for Java/CF updates and configuration.
  • Version control for configuration
    • Track jvm.config, server.xml, web.xml, and connector configs.
  • Keep supported Java versions
    • Align with Adobe’s compatibility guides; schedule JVM updates along with CF updates.
  • Right-size memory
    • Start with -Xms512m -Xmx2g (adjust per load) and -XX:MaxMetaspaceSize=512m or higher as needed.
  • Automate service recovery
    • In Services > Recovery, set First/Second/Subsequent failures to “Restart the Service.”
  • Monitor and alert
    • Use Windows Performance Monitor and log analytics to catch memory/port/CPU anomalies early.
  • Regular cache cleanups during Maintenance windows
    • Clear temp/work when applying patches or major config changes.
  • Document and test connector changes
    • Change IIS/Apache connectors only after confirming CF starts cleanly.
  • Secure and least-privilege
    • Use a dedicated service account with only necessary permissions; Audit regularly.
  • Backups and rollback plans
    • Snapshot the server or back up CF install dir and configs before any update.
See also  How to Fix ColdFusion on Docker Container Startup Failures

Configuration and Command Examples

Example: Checking and Editing jvm.config

notepad C:\ColdFusion2021\cfusion\bin\jvm.config

Ensure:

java.home=C:/ColdFusion2021/jre
java.args=-server -Xms512m -Xmx2048m -XX:MaxMetaspaceSize=512m -Djava.net.preferIPv4Stack=true


Example: Freeing a Conflicting Port

netstat -ano | findstr “:8005”
tasklist /fi “PID eq
taskkill /f /pid

Or change 8005 in server.xml, then restart.


Example: Reinstalling the Service

cd C:\ColdFusion2021\cfusion\bin
service.bat -remove
service.bat -install


Example: Running Tomcat in Console Mode

cd C:\ColdFusion2021\cfusion\runtime\bin
catalina.bat run


Key Takeaways

  • Most startup failures trace back to Java configuration, port conflicts, or corrupted caches.
  • Logs are your best friend: check Windows Event Viewer and cfusion\runtime\logs first.
  • Validate java.home and JVM args; use only supported Java versions for your ColdFusion release.
  • When in doubt, run Tomcat in console mode to see the live exception.
  • Keep backups of jvm.config and server.xml; use service.bat to repair a broken Windows service wrapper.

FAQ

Why does ColdFusion start from the command line but not as a Windows service?

This usually indicates a difference in environment variables, permissions, or the account used to run the service. The service may run under a restricted account lacking folder permissions or using a different JAVA_HOME/Path. Align the service account permissions, verify java.home in jvm.config, and reinstall the service if the wrapper configuration is corrupt.

How can I safely change the built-in web server port (8500)?

Back up server.xml at C:\ColdFusion\cfusion\runtime\conf. Change the HTTP connector’s port attribute from 8500 to an available port. Validate that the shutdown (8005) and AJP (8009/8012) ports don’t conflict. Restart ColdFusion and test connectivity to the new port.

After a Windows or Java update, ColdFusion won’t start. What should I do first?

Check the ColdFusion logs and confirm the Java version/support matrix. If you updated Java to an unsupported release for your ColdFusion version, revert to the bundled JRE or install a supported JDK and update java.home. Clear temp/work caches and retry. If the failure followed a ColdFusion hotfix, try temporarily removing the latest hf-*.jar from cfusion\lib\updates.

The service shows “started” but I can’t access the ColdFusion Administrator. Why?

Tomcat may be up, but the connector/HTTP port may be misconfigured or blocked by a firewall. Confirm the port in server.xml, run netstat to ensure it’s listening, and review the catalina and coldfusion-error logs for Deployment errors. If using IIS, verify the connector is healthy and that requests are routing correctly.

Is reinstalling ColdFusion the only fix if none of the above works?

No. Reinstallation is a last resort. Before that, validate Java compatibility, restore jvm.config/server.xml from backups, clear caches, cleanly reinstall the Windows service, and run Tomcat in console to capture stack traces. If persistent, compare against a staging server or restore from a known-good system snapshot.

About the author

Aaron Longnion

Aaron Longnion

Hey there! I'm Aaron Longnion — an Internet technologist, web software engineer, and ColdFusion expert with more than 24 years of experience. Over the years, I've had the privilege of working with some of the most exciting and fast-growing companies out there, including lynda.com, HomeAway, landsofamerica.com (CoStar Group), and Adobe.com.

I'm a full-stack developer at heart, but what really drives me is designing and building internet architectures that are highly scalable, cost-effective, and fault-tolerant — solutions built to handle rapid growth and stay ahead of the curve.