Here at CF Webtools we’ve been shifting towards Virtual Machines to replace our dedicated “iron” as Mark Kruger likes to say. Let me say for starters that I’m very impressed with the Dell PowerEdge VRTX Shared Infrastructure Platform. There is so much back-end power in that thing we’ve been able to move our entire set of staging platforms onto one M620 Server Node along with a RAID 6 shared PERC disk array. It handles it like a champ and each virtual server is extremely fast. After about a year of testing and no real issues we’ve been able to move some of our production servers onto another server node. We’re looking forward to adding a couple more server nodes as well. Each node runs VMware ESXi HyperVisor 6.0 via RAID 1 SD cards.

In addition we’re also migrating some workstation VM’s away from Hyper-V and onto a separate Dell Server that we’ve reclaimed.

vcenterconverter61But here’s the real reason I’m writing today:

FAILED: A file I/O error occurred while accessing ”.

I get this error when using “WMware vcenter Converter Standalone 6.0.0” to convert any powered-on Windows machines onto one of the ESXi instances. I don’t get this issue when converting power-on Linux machines. Very odd and Google results of forums haven’t been very helpful. Mostly just a lot of run chkdsk and check for fully qualified domain resolutions.

I’m not going to cover Linux conversions here since they work. But basically what a powered-on Windows conversion does is it installs a helper VM on the machine to be converted. It’s run as a service and you have the option to manually uninstall when finished or let it automatically uninstall.

Something, probably this helper service, then takes a snapshot of the source system. Then the helper VM does a block-level clone for each volume it finds.

Mine always failed after the snapshot and before the clone.

What I did was used the “Export logs…” link in the converter. The line I found interesting, reading the file vmware-converter-server-1.log, was:

error vmware-converter-server[01288] [Originator@6876 sub=Ufa.HTTPService] Failed to read request; stream: <io_obj p:0x03dc40ac, h:-1, <pipe ‘\\.\pipe\vmware-converter-server-soap’>, <pipe ‘\\.\pipe\vmware-converter-server-soap’>>, error: class Vmacore::TimeoutException(Operation timed out)

After some Google searching it dawned on me that I am using two IP subnets. One for the general network and one for management. My machine runs 10.0.0.* (general) and 10.1.1.* (management) subnets. The source system has 10.0.0.* assigned to it while the destination ESXi server has 10.1.1.* assigned to it.

Because my system can communicate with both networks, everything could communicate just fine with both the source and destination machines.

However once things get rolling, the process moves from my machine to communicating between the source and destination. My machine merely monitors the progress. Which makes sense. Keep out the middle man and you have efficient network data transfer.

So the fix here was to bind a temporary management subnet address (10.1.1.*) to the source machine’s NIC. Now the helper VM is able to communicate with the destination server over that management subnet. Read the rest of this entry »

Field Guide to Clients

Posted: December 7, 2015 in Uncategorized

These can be so true… though it’s what makes our world turn. Infographic from Ciplex.

clients_infographic_ciplex1

Technical Debt In An Image

Posted: December 4, 2015 in Uncategorized

technicaldebt

source unknown

Video  —  Posted: December 3, 2015 in ColdFusion, Uncategorized

Dead Ringers

Posted: September 2, 2015 in Uncategorized

I ran across a post on Facebook that peaked my interest. It lists how many terms came about. I’m going to post it here to reference.

They used to use urine to tan animal skins, so families used to all pee in a pot & then once a day it was taken & Sold to the tannery…….if you had to do this to survive you were “Piss Poor
But worse than that were the really poor folk who couldn’t even afford to buy a pot……they “didn’t have a pot to piss in” & were the lowest of the low. The next time you are washing your hands and complain because the water temperature isn’t just how you like it, think about how things used to be.

Read the rest of this entry »

Faux File Upload Input

Posted: August 27, 2015 in HTML
Tags: , ,

The element <input type=”file”> is very ugly in most browsers and it seems that even Bootstrap didn’t put any effort into sprucing it up.

My end objective was to have a user press a rectangle box with a title inside which would open a file dialog and ultimately upload that file.

At first I thought this would be easy after some quick research in Google land. Not so.

Note: I’m using the jQuery 2.x library in my examples

<style>
	input {
		display:none;
	}
</style>

<form method="post" enctype="multipart/form-data">
	<div id="wrapper">click here to upload<br><br>
		<input type="file">
	</div>
</form>

<script>
	$('#wrapper').click(function(event){
    	$(':file').click();
	});
	
	$(':file').change( function() {
		$('form').submit();
	});
</script>

At first I thought it would be as easy as 1) hiding the input 2) watching the click event on the container 3) trigger the input’s click event and 4) submit the form.

But what I found out was that the event listener kept firing infinitely until the browser aborted with a “Uncaught RangeError: Maximum call stack size exceeded” error in the console. Though honestly I don’t completely understand what’s going on here, the click event by my mouse bubbles up to the child input element.

To resolve that issue I started looking for the event that was not fired by the input element:

<script>
	$('#wrapper').click(function(event){
		if( !$(event.target).is(':file') ) {
	    	$(':file').click();
	    }
	});
	
	$(':file').change( function() {
		$('form').submit();
	});
</script>

At this point @chrish on CFML Slack was helping me out and also offered up a solution were as now we are stopping propagation for the input element.

<script>
	$('#wrapper > :file').click(function(event) { event.stopPropagation(); });
	$('#wrapper').click(function(event){
    	$(':file').click();
    }
	
	$(':file').change( function() {
		$('form').submit();
	});
</script>

I ended up sticking with the first solution incorporating the “if” statement until Jessica Kennedy reminded me of a simple solution using the label element. Because this simplifies things (AKA less likely to break) I’m now sticking with this solution. Normally a label will focus on the input field when clicked on. But in this case it fires off an event to open the file dialog. I’ve tested this in Chrome, FireFox and IE 9+. I’m pretty sure the label element has some limitations what you can stick in it, so this may not always work for you. But in my case I was able to apply the Bootstrap widget classes (not seen in this example) and it worked as expected.

<style>
	input {
		display:none;
	}
</style>

<form method="post" enctype="multipart/form-data">
	<label id="wrapper">click here to upload<br><br>
		<input type="file">
	</label>
</form>

<script>
	$(':file').change( function() {
		$('form').submit();
	});
</script>

javalogo-81x162I happened to read a post on Adobe’s ColdFusion Facebook page, that references a blog post, that references a pretty obscure tip. ColdFusion really needs to implement this somehow in CF Admin like a configurable directory for this file.

I remember knowing this step, but forgot, because it’s documented in obscure places like in the upgrade notes when ColdFusion releases a patch that officially supports a newer version of ColdFusion.

Anyway, ending my rant, when you upgrade to a new major version of Java (and in my opinion every minor version too) be sure to do the following:

  1. Copy tools.jar from {JDK_Home}/lib to {cf_install_home}/{instance}/lib/
  2. Delete all files from {cf_install_home}/{instance}/stubs/ to get the newly compiled classes.

Only JDK contains the tools.jar file not the jre installation. You don’t have to install JDK on the machine where ColdFusion is installed. You can just have jre on this machine and get tools.jar from any other machine’s JDK installation.