Tuesday, March 05, 2019

My ColdFusion 2016 to ColdFusion 2018 Upgrade

Well yesterday I finally decided to upgrade my production server from ColdFusion 2016 to ColdFusion 2018. I know I am a bit behind on this and those who know me, know I would have done this sooner, but honestly it has been hard to make the time. Anyways, I finally did it last night and this post is more about my experience and to give kudos for making this upgrade so pleasant.

MY SETUP

I know that not everyone's experience might be the same due to their setup / environment so to give some insight, this is how my production server was setup with ColdFusion 2016.
  • Windows Server 2016 - IIS 10
  • ColdFusion 2016 Enterprise w/ 2 instances
  • WebSockets via Proxy ( OF COURSE !!!! )
  • 2016 Auto Lock Down ( The Manual Process ... more on this later )
  • Fusion Reactor

UPGRADE STEPS

Now before I began, I did advise all my clients about the upgrade downtime and the possible bugs we might encounter after the update. Now on to my steps of how I executed this upgrade.
  1. Placed all sites on maintenance
  2. Removed all Connectors ( IIS and WebSockets )
  3. Stopped ColdFusion 2016 instances
  4. Removed instances from Fusion Reactor
  5. Installed ColdFusion 2018 and allowed it import the main instance settings.
    • Started 2018 and confirmed all settings
    • Downloaded and installed the latest update
    • After update shut down ColdFusion 2018
      The reason for this is that I wanted to use the same admin ports as 2016 was using, which is why I never had both on at the same time.
  6. Added 1st instance to Fusion Reactor
  7. Started both ColdFusion 2016 instances
    • Logged into 2nd instance and created an archive of the settings to import to new 2018 instance. I also went ahead and created an archive of the 1st instance's settings ( just in case )
    • Logged into 1st instance and removed 2nd instance ( handles windows service removal )
    • Shut down ColdFusion 2016
  8. Uninstalled ColdFusion 2016 ( bye bye old version )
  9. Started ColdFusion 2018
    • Created 2nd instance and started it
      * 1st hiccup here noted later
    • Imported settings archive to 2nd instance
    • Reviewed both instances and made sure datasources connections and mail settings worked
    • Added 2nd instance to Fusion Reactor
  10. Added all connectors ( IIS and WebSockets )
    * 2nd hiccup here noted later
  11. Ran Adobe's Server Auto Lockdown on both instances.
    OMG, talk about time saver!!!!!
  12. Removed sites from maintenance mode
  13. Tested all sites
  14. Upgrade Complete!!!!
I know that seems like a lot of steps but each one executed flawlessly and the only 2 problems I ran into where simple to fix. One of them was purely my fault due to my steps.

ISSUES ENCOUNTERED

  1. Second instance of ColdFusion 2018 would not start.
    To troubleshoot this I attempted to start the instance via the command prompt using the console output command and saw that it would not start due to the Fusion Reactor Instance settings in the jvm.config file which was copied over from the first instance. I removed the settings and the instance started up without an issue. This of course would have not happened if I would have added the instances to Fusion Reactor after installing the second instances.
  2. cfws Virtual Application created by the wsconfigproxy tool set the Application Pool to Default instead of the Application Pool of the site.
    This is one of those gotcha's that I have mentioned in my WebSockets presentation and although I had stated that in 2018 it no longer happens it appears it did, so always good to check.

ERRORS ENCOUNTERED

In regard to errors, the only one I ran into is actually embarrassing and a reminder of sometimes looking at old code hurts but it humbles us. A reminder that we all started the same and that we can all make simple mistakes.

It appears that in some places, yours truly did not add a proper space between a date and a time entry when executing createODBCDate and / or createODBCDateTime. Yup, sounds silly and some might complain that it should not error out because it worked before but hey when it is your fault own it and accept a stricter and better language.

In case you are wondering how I track errors....

I use to always send myself an email containing a dump of the error so I can debug. Then Google did this little thing where the CSS for the dump was stripped and it looked like crap ( yes it affected me ). I always wanted a better way of having a record of errors outside of my email box, and Google's change inspired me to think about creating my own solution but then I learned about Sentry. Sentry is great and they have a free version of their service which is very generous ( it is what I use ). If you do not have anything in place I recommend using it or giving a try. I have a CFC to integrate with on my GitHub which you can see and download @ https://github.com/GiancarloGomez/sentry-cfml.

SERVER LOCK DOWN AND PERFORMANCE MONITOR TOOLSET

I have to say that running the Server Auto Lock Down was the best experience overall. I had to run it twice due to having 2 instances and they each took a few minutes to run but it saved me HOURS!!!! Can I say that again ... "HOURS!!!!" They both executed without any errors!!!!

I also installed the Performance Monitor Toolset so I can play with and hopefully work with the Adobe team to see if we can get it to view and debug WebSockets connections and communications. If this does occur, you can expect it in my next WebSockets presentation.

CLOSING NOTES

Like stated before, this post was to outline my process and give kudos. Most of my steps where pretty straight forward to any upgrade I have done before but the Auto Lockdown Tool takes the cake!!!!

With that being said, I would like to give ...
KUDOS and a big THANK YOU to
Adobe's ColdFusion Team and Pete Freitag!!!!
We all know Pete is the main reason we have a Lock Down Guide and now this wonderful tool plus all the other things he already provides for the community.

Friday, October 12, 2018

ColdFusion Summit 2018

This year's the ColdFusion Summit was held at the Hard Rock Hotel in Las Vegas. At first I had my thoughts about it being off the strip but honestly I really loved the venue. I have attended this conference since the first one back in 2012 and have been honored to be a speaker since 2013. I have to say that this one was the best one yet!

The keynotes on day one and day two were fantastic, the sessions were great, the food was amazing and the party ... SPECTACULAR AND FUN!!!!

As always, I love this time of year as it allows me to network and catch up with old and new friends in the community.

To all those that attended my WebSockets presentation, you can find my slides and links to all the demo code in the following github repo.

https://github.com/GiancarloGomez/ColdFusion-Modern-uses-for-WebSockets

I am already looking forward to next year as I have great plans on expanding my sessions more and helping more developers understand the power and ease of using WebSockets.

Until next year!!!

Keep coding and learning ....

Tuesday, June 12, 2018

Clear your Netflix viewing history using JavaScript

If any of you have wanted to tried to clear some or all of your Netflix watch history, then you have most likely encountered the burden of clicking on a delete button over and over again. Well, if you rather do it in one little action try the following.

To begin do the following:
  1. Open Netflix in the browser of your choice.
  2. Hover over your profile picture in the upper-right corner of the screen.
  3. Click Account.
  4. Click Viewing Activity under My Profile.
WARNING:  You should understand JavaScript and what you are attempting to do before moving forward.

At the time of this writing, the following script will take any entry that is not from the current year and delete them from your watch history. You can choose to continue to scroll down the page before executing the following script in order to work thru your entire watch history. If you have a lot of entries, this will take a bit as each click that you are forcing is making an XHR.

Once you are ready to continue, simply open your web developer tools of your favorite modern browser and enter the following script in the console and execute.

UPDATE
Please run this with caution. At the moment, I was able to get rid of my pre 2018 entries but it appears I am getting a 403 response (forbidden) from Netflix on my browser and all my devices. There is a possibility that I got blocked. I will keep you all posted.

UPDATE 2
Netflix is working back to normal again but it was odd that a couple of friends and family members accounts worked and mine did not. I will assume that it was a safeguard that temporarily blocked my account due to the high amount of requests I made in a short amount of time. I know it was not my IP that was blocked as I tried to access from other devices outside of my network and it was still blocked. Maybe it was just some crazy coincidence and I sound insane. Regardless, I will still say, use with caution. In the end, it did what I wanted, cleared my viewing history since 2010 which was well over 2,600 individual clicks I was not wanting to do manually. Maybe in the future they will give an easier way to clear our entire viewing history or at least an easier way to bulk delete.

Friday, October 06, 2017

ColdFusion 2016, IIS 8.5, Skip IIS Custom Errors and 401 responses

Well I thought I would just put this quick thought out as it had me pulling my hair for a bit.

I developed an API for a client that when it fails authentication it returns a 401 and a JSON response in the body. In ColdFusion 11 I had no issues and then I just updated their staging server to ColdFusion 2016 and it started to return 401 without the response BODY ( sometimes it would and sometimes it would not ). This caused some issues with an app I am developing that uses this API and hence the hair pulling.

So, I decided to look at my connector and see it it was a setting I chose and it was, apparently clicking on Skip IIS Custom Errors causes this issue.

I have written about this before and recommended it (http://www.giancarlogomez.com/2016/05/coldfusion-10-iis-7-custom-errors-and.html) but now it appears I might revert back to the default setting (at least for this client ).

Now, after comparing the ColdFusion 11 install that I have still on production, it appears I have this setting set to false and on this upgrade I decided to set to true ( or click in the wsconfig GUI ). I don't know why I did this, maybe because I saw a checkbox for it and was like cool I will click it ( squirrel ).

So as a reminder to myself and hopefully to anyone else that might experience this issue, just set that setting to false and everything will go back to normal :-).



Tuesday, May 23, 2017

Invalid SSL on Chrome 58+ due to missing_subjectAltName

A friend of mine experienced this today and I referred him to a post that I used to fix the issue locally with my self-signed certificates when I first encountered it a month ago.

The author, Alexander Zeitler, goes thru the steps required to create your own CA (certificate authority) which is very handy when you want to just trust any certificate you create using it. Then he goes thru the steps for generating the SSL certificates using OpenSSL. In my own experience, I did not need the additional server config file he specifies, which I believe it was an issue with my version of OpenSSL but regardless it worked.

You can read thru the comments to find out more.

The link is :
https://alexanderzeitler.com/articles/Fixing-Chrome-missing_subjectAltName-selfsigned-cert-openssl/

He also wrote it on my birthday, so it was a nice gift. Thank you for sharing Alexander!