December 2013

Gavin Pickin

Techie Gotcha - All Hell Breaks Loose, at the End of the Line

FusionReactor, Techie Gotchas

The blog posts halted for a couple of days there, I apologize. The good news, my slackness will pay off… because its been a few days where I have been banging my head on the desk, and although I didn't make time to get the blog posts out, I've learned a few things, and that means I'll share them with you.

First thing on the list, all hell breaks loose, at the end of the line. This is a interesting story, with lots of Christmas Characters. Well, maybe not Christmas Characters, but big CFML community characters all the same. We visited the world of Twitter, Google Groups, and then finally, the light went on, and I felt like a complete idiot, because, it was not the first time, this caught me.

Ok, so one foggy almost Christmas morning, Gavin decided to install Fusion Reactor trial on one of his servers, to see if it was cool enough to put on his Santa list this year. Thanks to valuable information from Charlie  Arehart, the ColdFusion Consulting and Training Fairy informed Gavin that Fusion Reactor didn't exist, its FusionReactor, without a space, like ColdFusion. 

Now gleaming with Christmas-y CFML knowledge, Gavin went to download FusionReactor (so space age is has no space), and realized, that with sad and sorry Centos box was unable to do so, because there are no direct links from (which has no space, but has a dasher, I mean dash). So, quicker than Santa on Christmas Eve, Gavin pops open a browser or two, the first one to open without crashing won, and Gavin clicked the magical link, popping a modal window, that gave me a Trial License key, and downloaded the file to my Sad Old mid 2010 Mac Book Pro… Santa, 16gb ram with 1tb Flash Drive Retina wouldn't go a miss.

Before the Reindeer are finished FTP-ing on the lawn… the file is on the server, and Basher, I mean bash, bash'ed it into an executable, and proceed to follow the very solid installation instructions, found here. 

So I run the puppy, with the -c console setting, and start my sleigh ride to a Merry Christmas… but, before I go anywhere, the console plops out a pile of Christmas Coal, all over my parade. 

$ sh ./ -c
: command not line 2: 
: command not line 7: 
: command not line 8: 
: command not line 11: 
./ line 12: syntax error near unexpected token '{
'/ line 12: `read_db_entry() {


I try without the sh in front, incase I'm not as versed with Linux as I thought, I am probably at the I don't know I don't know stage, honestly.

So I google, this, google that, and look at the first few lines, I tried to do my due diligence, before heading out to Twitter-town… and asking the cool cats.

I grab my pile of Coal, and head to Twitter-town, and throw it out there. Brad Wood 'be online all day long" was quick to answer, and gave me some solid advice, or friendly jab, and summoned the ColdFusion Consulting and Training Fairy, Charlie Arehart into it, and we started to discuss stupid questions versus stupid people. Link at the bottom of this stocking, I mean story.

After both the good fairy (I mean that in a good way Charlie), and the Online Zombie (not sure if that can be taken in a good way Brad) both say that their helpfulness ended with the jabs, and recommend heading to the FusionReactor Google Group.

Then Charlie and Brad jump on the Google Group, to jab me a little more, and recommend the manual install. Of course, I deny that option, because it should install, and if it doesn't, there has to be a reason, and I hate not knowing the reason for stuff… I guess thats the reason why I'm on here doing this, again.

David Stockton, a mean of the Fusion Team, which lost its Reactor in a fatal RainDear incident some time ago I imagine (sleep deprivation makes you imagine a lot of stuff), suggested it might be a corrupt file, or drop the SH at the start.

I think to myself, I did do that, and it didn't work, BUT it did give me another error message. So I google that, and dumb ditty dumb dumb… I found the solution.

./ -c
bash: ./ /bin/sh^M: bad interpreter: No such file or directory

So the mighty Google said "This is a sign of a Dos / Windows line ending apparently"

Actually, Google lead me to Stack Overflow, which as much as everyone hates it, has great SEO, and usually, between the antics and closed questions, you will find some great information.

Here is the Stack Overflow Link:

Long weird story, short of it is.

When you download files to other systems, sometimes, the files are adjusted for the system you are using. CR-LF was used so teletype machines would move the print head and move to the next line. Apparently *nix guys decided it didn't need to be in the document, but in the device drivers, for stuff that actually needed it.

There is an issue with this though… I downloaded it, to Max OSX, which uses LF, FTPed it to Centos which uses LF… so where did all the CR-LFs come from?
That puzzled me for a bit, then I remembered… I have had this issue before. 

When I have downloaded zip files, from windows machines, over ftp, sometimes they get corrupted… why, because the transfer mode wasn't set to Binary… it defaulted to ascii for some reason.

So this is what happened, when I uploaded the file, from my mac… the FTP client saw the file extension, and Auto decided it should be ascii, not binary… so FTP's protocol is very strict on what it should and shouldn't do… and on text files, it basically messes with your file… and then the other side is supposed to de-mess it, depending where you are going. 

A lot of people complain about PHP files being converted to single lines, which messes up their file, because of single line comments commenting out the remainder of the file, not the line. ( I would reference it, but I forgot the source now, I apologize Stack Overflow source). 

The lesson? If you upload something, and it screwed up, check your FTP client, to see if the file type is one of the file types determined to use ascii when the mode is Auto.

Or, if you want to stop it from happening, change it to binary for that session, or if you really just don't want to think about it ever again… set it to BINARY always… but you'll lose some of the benefits of ascii for files that really should have it.

Uploaded the file again, followed the beautiful, but almost irrelevant instructions, since the install is pretty smooth, and intuitive, and now I am a happy geek, watching loads of cool graphs, and checking out some interesting stats.

I'm cleaning up my slow requests, and optimizing some ugly queries ( baby did it, i mean, Santa Baby did it - I would never write queries that bad - lol, I'm getting query coal for Christmas). 

Its fun… I'm really digging the spaceless FusionReactor tool, so Santa, add it to my Christmas List.

Speaking of Queries and optimization… I got into an interesting discussion, argument, mild war about cfqueryparams, so I'm going to look into that more… so keep an eye out for that. Add it to the million things on my todo list.

Thanks again to Charlie, Brad and David, sorry I wasted your time, with something that should have been obvious, and in the end was… hopefully, someone will learn something from my own stupidity.

Thanks for reading, hopefully you learned something, even if you had to wade through all the Christmas Crap / Coal above it. 

Here are the links, for those who care.

Twitter Feed

FusionReactor Google Group!forum/fusionreactor

My FusionReactor Google Group Question!topic/fusionreactor/tcXEEDokSug

Have a good one,


Blog Search