DB2 Migration and Paths

Today I assisted a coworker in our upgrade of DB2 from 9.5 to 9.7.  He had run into an issue where the instance migration utility kept failing.  Initially the output of the instance migration utility was a simple variable not found.  However, using the debug (-d) option on db2iupgrade I discovered the true issue.  This brings up a good point that we can’t always trust the first error message we see on the screen.  A lot of times issues are much more deep than they appear.

After reviewing the debug information, I had to sift through IBM’s various instance scripts (written in bash script) to discover why the procedure was having an issue.  I had to modify the scripts to output the exact command that the scripts were running where the issue was occurring.  Unfortunately I could run the command as the root user with no issues, which led me to believe there was an environmental issue.  I began comparing the environments for both the root user and db2 instance owner user between this server we were having issues on and servers we did not have the issue on.  I quickly discovered someone had set the PATH variable to include the db2 bin directory.  I suppose because the PATH variable included the previous version’s bin directory, the instance scripts were getting run for the wrong version, hence causing things to error out during the instance migration.

After resolving this simple PATH issue (it ended up being in the instance owner’s bash_profile), I thought of some good advice from a senior coworker years ago.  He told me the more complex a problem seemed, the greater chance the underlying cause was very simple.  I have found this to be true in at least 90% of the issues I work with.  Now, onto the next challenge, TFIM plugin class loader problems and Identity Manager upgrades!

Also, for reference, here was the error we saw:

/opt/ibm/db2/V9.7/instance/db2iupgrade -u db2fenc1 db2inst1
...
/opt/ibm/db2/V9.7/instance/db2iutil: line 2498: DB2INSTVER: parameter null or not set
DBI1124E  Instance db2inst1 cannot be upgraded.
...
/opt/ibm/db2/V9.7/instance/db2iutil: line 2502: [: too many arguments

Today’s Weather

Barn Feb 22 2014Today’s weather was a much needed break from the monotony of winter.  Blue sky, the grass is visible again, and the barn is open and airing out.  Beautiful!

 

 

 

Sky Feb 22 2014Here is a view from my weather cam from today. It has been breezy all day which is really helping dry things out.

 

 

 

Weather Feb-22-2014

The tower sensor in the barn was pretty close with the outside 5-in-1 sensor earlier. However, now that the sun is directly on the barn it is a few degrees warmer in there now. The Acu-Rite bridge allows for up to 3 sensors, 1 including the 5-in-1. Technically I could add another tower sensor. From what I have read on forums, you can actually connect as many sensors as you want, they just won’t show up on the My Backyard Weather page. However, if your crafty and pull the data from the bridge you can get the data for those additional sensors.

Moving WordPress to Root

I found a couple great resources for those that installed WordPress in its own directory but want to move it to root.  The first, Moving WordPress, talks about how to physically move all of the files.

However, I found another article, Giving WordPress Its Own Directory, which I followed parts of to quickly get WordPress working on my root directory but leaving it installed in its own directory.  It was rather simple:

  1. Login to the admin console, go to General Settings, change the Site address (URL) to your domain http://www.yourdomain.com and save the changes.
  2. Copy from your wordpress directory index.php and .htaccess (I used cp -a to ensure permissions stayed the same) into your root directory
  3. Edit index.php in your root directory and add, on the require dirname FILE line, the directory name of where wordpress resides.

Awesome!  This allowed me to install WordPress, get it working at www.mljenkins.com/wordpress, then make it available at my root directory at www.mljenkins.com without having to go through a major headache of moving tons of files.  It would also allow me switch from WordPress to another solution in the future fairly easily.

Speaking of which, make sure you keep flexibility in mind when installing a new solution.  It’s best not to back yourself into a corner where you must use the same solution from now until eternity without suffering major downtime.  Designing your solution with flexibility in mind will allow you to part with it in the future if it gets too expensive (monetarily or time) in the future.

WordPress Weather

This Christmas I received an AcuRite 5-in-1 with Internet bridge.  I have it setup on with the Acu-Link site (My Backyard Weather) to forward weather data to Weather Underground.  This is a pretty easy setup that almost anyone with minor Internet knowledge could setup.

Then I added an Ubiquiti AirCam and also started pushing that to Weather Underground.  That process was a bit more technical, since it involved me writing a script on my Linux server to fetch the image from the AirCam and push it using FTP to Weather Underground.

I have realized the bridge is capable of a lot more than the AcuRite site utilizes.  However, there is no way to fetch the data from the bridge.  Instead, you have to grab it off the wire when the bridge sends data up to the Acu-Link site using a web service.  By doing this, you can gain access to a lot more data and do what you please with it.

In the near future, I plan on developing a PHP web service that I can run on my Linux server have the bridge push the data there.  At that point I can store the data within a MySQL database, then forward it out to Weather Underground for faster updates.  I will be blogging my project here as I have time.

In the short-term, I want to get the Weather Underground data displayed on my blog.  I came across a great writeup on Developer Drive By Jonny Schnittger where he made a quick widget to display the weather data.  I hope to use some of these ideas to create my own widget and put it up soon.

Stay tuned for further updates.  I have a lot in mind; now, if I can just find the time!  However, with the storms of spring approaching quickly, I have an incentive to get my projects done sooner than later.

Welcome!

Welcome to my personal website. I hope to get some more information up here soon. I am converting my primary site over to WordPress to make it easier to maintain in the long term.