Over a million developers have joined DZone.

ColdFusion Startup Issue with Homepage

· Java Zone

Microservices! They are everywhere, or at least, the term is. When should you use a microservice architecture? What factors should be considered when making that decision? Do the benefits outweigh the costs? Why is everyone so excited about them, anyway?  Brought to you in partnership with IBM.

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?


Discover how the Watson team is further developing SDKs in Java, Node.js, Python, iOS, and Android to access these services and make programming easy. Brought to you in partnership with IBM.

Topics:

Published at DZone with permission of Raymond Camden, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}