Adobe ColdFusion 11 AWS AMI Converts to Developer Edition

We have a ColdFusion 11 server hosted on Amazon’s Web Service (AWS) Elastic Compute Cloud (EC2). We subscribe to the Adobe ColdFusion 11 license on a monthly basis using the Amazon Machine Image (AMI) Store.

We are still migrating sites to the EC2 instance and it is still in its infancy. What we noticed was that the log files were getting large quite fast with these entries:

License Error.You tried to access the Developer Edition from IP address (0.0.0.0). Already two IP addresses are accessing ColdFusion concurrently. The Developer Edition supports access by any IP address, but only two at a time, apart from the localhost. The additional IP addresses accessing ColdFusion are: 0.0.0.0,0.0.0.0 The specific sequence of files included or processed is: C:\ColdFusion11\Main\wwwroot\CFIDE\administrator\templates\secure_profile_error.cfm”

This meant that only two distinct visitors would be able to view our production sites at any given time. The license is supposed to be a Enterprise level license which can support very large traffic. But instead the license reverted to developer edition without warning.

The way I was able to resolve this issue was to send an email to CFsup@adobe.com. I included my AWS Account number. I also ran this issue by the “Adobe” CFML Slack Channel. Here was the timeline (Central Time):

8:12 PM: Posted issue on CFML Adobe Slack channel
8:21 PM: Emailed CFsup@adobe.com
11:15 PM: Anit Kumar responds to Slack from home
12:10 AM: Anit Kumar responds via email with new .jar file
12:38 AM: Server now on Enterprise license correctly

Here were the steps taken to apply patch:

  1. Navigate to the \ColdFusion11\cfusion\lib and search for “cfusion-req.jar”.
  2. Stop the ColdFusion Service.
  3. Take a backup of this original jar file and delete it. Renaming the jar file, will not help.
  4. Rename the enclosed cfusion-req.jar.123 to cfusion-req.jar and save it on the location mentioned in Step 1.
  5. Start the ColdFusion Service.
  6. Check the Edition by clicking on the System Information (“I” icon on right hand side top).

Anit said we could just apply the patch to the cfusion instance, however we ended up applying it to it and another CF instance while waiting for a response.

When we asked Anit what the issue was, this was his reply:

This was an issue with Amazon side and is very sporadic in nature. We have fixed and merged this in CF2016 AMIs on Amazon.

Native Apps vs. Responsive Website

I see more and more ads out there that say “Your business needs a mobile app” usually indicating your company will die without one.

But lets think about this for a second. Look at the apps installed on your smartphone’s home screens right now. The list may look something like this:

  • Email
  • Social Media
  • Chat
  • Security (MFA, passwords, etc)
  • Health tracking
  • Music
  • Calendar Widget
  • Weather
  • Game
  • Map / Navigation

All of these you likely use on an hourly and daily basis. Many provide functionality that a browser is not suited for, though not all. And many provide alerts and access sensors constantly.

But, let’s say for example, yesterday you wanted to see how late your favorite restaurant was open. You may have said “Okay Google, how late is Smoking Jay’s open?” or opened a browser and searched for “Smoking Jay’s”. Where did both land you? Google’s search results that happened to be smart enough to know that answer.

Or another example, today you wanted to know where to find a DeWalt Cordless drill. So you either asked Google or Apple via voice or opened a browser to search.

In neither case did you open the app store or Google Play and search for an app that searched for power tools or restaurant times.

So if you’re running a Law Firm, do you really think anyone is going to look for your app and install it? Lets say I ran that law firm and think I want a mobile app. Now I need someone to write 3 apps for Microsoft, Android and Apple and maybe more. I would need to make it useful enough to warrant such expense. And I would need it to make sense enough for many of my clients to install.

Lets say that I make the law firm app present agendas, a calendar and and confirm receipt of documents. How would spending time developing 3 platform specific apps benefit me rather than working on just a single, responsive, secure web site? I can’t think of any reasons in this example.

So before you go app crazy, consider that it may be best to just improve your likely existing web site to be mobile and user friendly. For one thing, I guarantee you it’ll cost less, be more efficient and likely used more.

Cortana and Headphone Noise

I recently bought a pair of Bose SoundLink around-ear wireless headphones II. After a number of hours troubleshooting what I call “monitor effect”. Basically I could hear my headset mic through the headphone speakers when no other sounds were playing on the computer. I would also hear the “dead air static” that you hear when you increase the gain on a microphone.

When I’m at my desk I have my headphones on much of the day. I use them for phone calls, Skype, Internet sound and some music. That monitor sound just wouldn’t do.

What we ended up finding, just by a slim recollection that the tech remembered was that the Windows 10 “Hey Cortana” feature may be causing this. Sure enough, I turned that feature off and the issue was gone. Continue reading

#cortana, #headphones, #sound, #static

AWS Windows AMI’s Showing As Other Linux Platform

If you create a snapshot of a Windows volume in AWS (Amazon Web Services) EC2 and create an AMI from that you’ll notice that the platform column says it’s “Other Linux”. You then can’t launch that AMI.

Instead of creating an AMI from a snapshot, you will need to create an image from the instances screen. Right-click instance, click “Image” then “Create Image”. This will work fine.

Flying UAV’s in Omaha, NE

Haven’t flown a drone in awhile. Since then FAA rules have changed and you have to notify the airport control tower if flying within 5 miles of an airport for hobby or recreational purposes.

I tracked down the control tower’s number: 402-271-7505

They ask that you call the day you are going to fly, give them your maximum flying height and your phone number.

I mentioned I’d probably fly 50-60 feet, and they said that wouldn’t be an issue.

Note: DJI hasn’t added OMA’s and MLE’s (Millard) into their No FLY ZonesList yet as of 4/26/2016.

Avoiding Collision Damage Waiver Fees

A month or so ago I put my truck into the shop for about 5 days to get painted. I thought about getting a rental car for the week and stopped by Enterprise. I knew that getting the collision damage waiver was a smart idea and I even asked how often damaged is charged to the customer. The agent told me that about 50% of all cars brought back are have damaged charged to the customer, mostly from rock chips. Seems like an extremely high percentage to me and likely abused. If I were to get the waiver on a mid-sized car it’d cost about $15 per day or more. With that in mind I decided to just car pool and use Uber.

Today I just received an email from my bank. I have a credit card through them, being US Bank. The card has a very high percentage rate but I keep it to avoid the $10/mo “maintenance fee”. Their email states that if I pay the full amount of the car rental via the card then I’ll be covered with their auto rental collision damage waiver – for free! Continue reading

SpamAssassin Automatically Restarts

At CF Webtools we run SpamAssassin on our Windows email server via means of “SpamAssassin in a Box” by JAM Software. (We also use their TreeSize software which I love to use to track down disk space issues in Windows.) SpamAssassin is a local service that our SmarterMail server talks to, filtering out SPAM based on a scoring system.

SA-eventThis morning I was alerted to the service not responding via our alerting software Nagios. When I checked on the service I saw it was stopped. From there I went down the freak’n rabbit hole.

I opened the even log and saw “SpamAssassin daemon (spamd.exe) restart successful. Looking through the list I see it restarts every hour. I hate when this happens because that means that some other process is likely running on a scheduled basis and causing it to crash. I did note in the “Recovery” tab of the services window that the service is set to restart upon failure. So my thought is it’s crashing and then automatically restarting.

On to further investigation. I found a “SpamD.log” file in “C:\ProgramData\JAM Software\spamdService\sa-logs\”. Upon inspection around the time of the alleged crash I found this entry:

[4980] info: spamd: server killed by SIGINT, shutting down

Okay, so what is “SIGINT” and what is it doing to my service? Googling really didn’t help. Any suggestions were Linux based and didn’t seem to be relevant.

I then turn to “Service.config” under  “C:\ProgramData\JAM Software\spamdService\”. Here I find “<SpamdRestartIntervalInMinutes>”. Wait what?! Looking at the manual I find this bit “Specifies the interval for restarting ‘SpamD’ (in minutes).”. Well this is interesting. I do some further Googling and find a changelog note for version 1.0 back from 2010. It reads:

To consider possible changes in SpamAssassin configuration and to prevent potential memory leaks,SpamAssassin in a Box periodically restarts the daemon.

Okay, now this sounds like some hacks I’ve done in my younger years.

But at least I found my answer. It’s supposed to do that!

Why didn’t the service automatically restart? Just a one-off issue I suppose. I found this in the log:

SpamAssassin daemon (spamd.exe) was started, but didn’t respond to any signals from localhost.
Please restart the service. Should the problem persist, please contact support

ColdFusion Framework Note

I tend to monitor the “ColdFusion Programmers” Facebook group. Today a poster asked:

Hi guys, What do you prefer: CFWheels or Coldbox? I used before CFWheels and is good but I recently starts playing with Coldbox and so far is pretty cool – Jorge Alexandro Martinez Dominguez

My response was:

I use FW/1 for about everything because it’s simple and what I know. However ColdBox will give you a ton more functionality via modules and they aggressively keep that framework up-to-date. They are very involved in the community and even have a “Into The Box” event once a year for pre-conference. I would use either, but if you’re new to both I’d probably look at ColdBox. Both base frameworks are similar.

ColdBoxLogo2015_300Brad Wood, from Ortus Solutions, also chimed in a with a blog post from 2015 about how ColdBox 4 changed pretty drastically. It’s always a good read when asking yourself the Framework question: It’s Time You Looked At ColdBox 4

Simple jQuery AJAX w/ ColdFusion

I had a request to supply a sample HTML page that would send a subscriber’s email address to ColdFusion without reloading the page. So I figured I’d post it here for any others looking for a simple example. This method uses jQuery, AJAX and a ColdFusion component.

index.html or index.cfm

<!DOCTYPE html>
<html>
	<head>
	</head>
	<body>
		<div id="subscribeContainer">
			<input type="email"><button type="button">Subscribe</button>
		</div>
		<script src="//ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>

		<script>
			(function($) {
				// bind the button with an event handler
				$('#subscribeContainer button').click( function(e) {
					// when button is pushed, POST data to remote ColdFusion component method
					$.post(
						'subscription.cfc',
						{
							method: 'subscribe',
							email: $('#subscribeContainer input').val()
						}
						)
						.done( function() {
							// everything worked
							$('#subscribeContainer').text('You have been subscribed.');
						})
						.fail( function() {
							// something failed
							$('
<span>There was an error subscribing.</span>').appendTo('#subscribeContainer');
						}
					);
				});
			})(jQuery);
		</script>
	</body>
</html>

subscription.cfc

component {

	remote void function subscribe( required string email ) {
		// call database insert method here
	}

}

Flushing Google Chrome DNS

Google’s Chrome browser keeps its own DNS cache for whatever reason. Clearing your local OS DNS cache isn’t good enough to resolve a new IP that it likes.

Rarely do I ever run into this issue on my Windows 7/8/10 machines but for Mac users it’s a more common issue.

But here’s what I found worked for a sticky DNS issue I just ran into on Windows 10:

  1. Clear OS DNS cache using “ipconfig /flushdns” in the command prompt.
  2. Go to “chrome://net-internals/#dns” in Google Chrome
  3. Click the “Clear Host Cache” button on the page that is now displayed.
  4. Clear OS DNS cache using “ipconfig /flushdns” in the command prompt.
google-dns-cache

Chrome’s DNS cache screen

#cache, #chrome, #dns, #google