ColdFusion Startup Issue with Homepage
Join the DZone community and get the full member experience.Join For Free
So - this is kind of crazy. Yesterday I fired up ColdFusion 11 to test
something and discovered that every request for a CFM returned an error.
The error was a Null Pointer Exception so not terribly helpful. (Or so I
thought.) I checked the logs and saw this:
Could not determine local hostname. java.lang.NullPointerException at coldfusion.runtime.RuntimeServiceImpl.getQueueLimit(RuntimeServiceImpl.java:2145) at coldfusion.runtime.RuntimeServiceImpl.load(RuntimeServiceImpl.java:487)
So I googled some more and came across this post on the forums: ColdFusion 10 install on RHEL 6.1. I looked closely at the exception reported by the user there and noticed it matched what I was seeing on my server, specifically this part: org.apache.catalina.authenticator.AuthenticatorBase.invoke.
If you read that post, you will see that Rupesh (part of the ColdFusion team) says this:
The license service makes use of InetAddress.getLocalHost() API and therefore your /etc/hosts file should have an entry for both localhost as well as for your host name.
Well, my hosts file definitely had an entry for localhost, but on a whim, I added my hostname. In terminal I typed
hostname (total guess, I had no idea that was a valid function) and it reported
Raymonds-MBP-8. I added that to my hosts file, restarted ColdFusion, and everything was gravy.
I have absolutely no idea why this happened yesterday, but hopefully it will help others if they run into the same problem. I am having issues with my router where DNS lookups and other things will fail from time to time. So maybe something on my machine got hosed network-wise enough to confuse ColdFusion. Of course, I don't even have a license for my local ColdFusion 11 server so why in the heck did it need to check a license server?
Published at DZone with permission of Raymond Camden, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Building a Flask Web Application With Docker: A Step-by-Step Guide
Decoding eBPF Observability: How eBPF Transforms Observability as We Know It
How AI Will Change Agile Project Management
Java Concurrency: Condition