I have just lost my faith in the universe (again).
I’m working with a QNAP Turbo NAS TS-410U. I’m setting up Remote Replication to Amazon S3, for offsite backups.
When I researched the QNAP product line, I found with some degree of confidence that the TS-410U would support Amazon S3 replication. So I told my customer to purchase the $700 unit, plus four $100 hard disks to plug into it. She did, and the unit arrived.
Before we get into the Amazon S3 thing, I need to rant a little bit. Are you ready?
<rant>
You can always tell when a product design team consists of semi-intelligent MONKEYS that have been fed marijuana laced with crystal meth. I’m not talking about the TS-410U here. It seems to be a good product. So far, despite the troubles I am about to go into with the firmware and the Amazon S3, I like the TS-410U. No, when I accuse QNAP of employing baked, methed-out monkeys, I’m talking about the team who either designed, or decided which generic product to license to fill the need for, the rack-mount rail system.
To say that the rail system is not tool-less is an understatement, and a distraction from the core problem. The thing shipped with about 6 bags of screws of different sizes and shapes. All in all, there were about 80 screws. I wish I were exaggerating. Naturally, one of the screw bags had split open (the one containing the tiniest screws) and they were all over the inside of the box. There were instructions, but they were in Engrish, of course, and very vague. I’m very glad that I have mechanical aptitude, or I’d have struggled with the rail kit for much longer than I did, and would have been quite flabbergasted. Eventually I figured out which screws to put where, and assembled the rails, only to find that the rails would not collapse all of the way. The ends of a couple of the screws protruded too far into the channel, and stopped the inner rail from going all of the way into the outer rail. Aha! So THAT is what the washers were for. I got this now. Much too much time later, after much sweat and frustration, I racked the QNAP.
Then I spent 3 minutes snapping two pairs of tool-less rail kits from Dell into the rack for the other servers I was setting up that day.
I mean, really. I would happily pay $50 – $100 more for a QNAP TS-410U, if the dang thing came with tool-less rails. QNAP, are you paying attention?
OK, just had to get that over with.
</rant>
OK, Amazon S3. Signed up, created an account, copied and pasted the Access Key and Private Access Key. Logged into the AWS Console, created a Bucket. Checked the access permissions on the bucket. Created a folder inside the bucket.
Thus armed, I logged into the Administration console of the QNAP. I looked around for the Amazon S3 stuff. Couldn’t find it. Not here, not there, not anywhere. I could not find it, Sam-I-Am! Looking around online, I found a helpful article from QNAP on how to set up the Amazon S3 replication. It says to go to Backup -> Remote Replication -> Amazon S3. But it’s not there. the header at the top of the article lists the models that these instructions are supposed to work with. The TS-410U is NOT in there. What’s up with that? I was SURE that the TS-410U supported Amazon S3.
Further investigation found a firmware update that includes the Amazon S3 component. My QNAP was many versions behind on the firmware. I wonder how long it’s been sitting on a shelf in a warehouse. I downloaded the update and tried to use it. The QNAP said it failed. It did not like the update file. I downloaded another copy from another mirror site. That one worked OK. The thing updated in about 5 minutes.
OK, so now I have an Amazon S3 tab in Remote Replication. I went through the wizard, defined the profile, gave it the access keys, gave it the Bucket name and the folder name, clicked the Test button, and…
…it failed. “The Bucket does not exist, or you do not have access to it.” Uh huh. Someone stole mah bukkit.
OK, let’s get down to troubleshooting. Is it time sensitive? It’s been an hour since I created the bucket. It can’t still be initializing. Is it case sensitive? It may be, but I typed it right. Did I screw up the ACLs? No, the permissions look right. Hmm. Well, maybe it’s a bug in the testing system. I’ll finish the wizard without a successful test and see if it runs. Does it? Nope. FAIL!
This went on for some time before I once again resorted to the old standby, Google.
I didn’t find anything with the specific error message, in quotes, which was my primary inspiration for writing this article. I didn’t even find anything clearly laying out for me what had to be done. What I did find was that it was possible to create buckets and folders with a plug-in for Firefox called S3Fox. I remembered seeing this utility mentioned in that QNAP article as well, in the section about synchronizing your S3 files via web browser. Something went “clunk” in my brain.
I downloaded Firefox (no, don’t faint in amazement that I did not already have it installed, really). Just to poke briefly at the 9-year-old arrogant haters out there who may have been conditioned by their separatist, home-schooling, plant-eating parents, let me just say right now that I UNCHECKED the box for making Firefox my default browser. Not everyone shares your opinions and preferences. Get over it.
Then I downloaded the S3Fox plug-in. My goal here was to double-check whether mah bukkit was working or not, using another utility which utilizes the same access and authentication method as the QNAP, so that when/if the QNAP tech support guy ever called me back, I could tell him that my bucket was configured just fine, thank you, and that the problem had to be on the QNAP.
I was able to successfully log into my bucket using S3Fox, and was able to upload, download, and delete files and folders. Then I had an intuitive leap.
I knew that the QNAP was not happy with my bucket.
I knew that S3Fox liked my bucket just fine.
I knew that S3Fox had the ability to create buckets.
I knew that the QNAP guys liked S3Fox.
So I deleted my bucket, then recreated it using S3Fox. Logged back into the QNAP, tried the test again, and…
…Success!
The QNAP implementation of Amazon S3 Remote Replication can use a bucket I created using S3Fox, but CANNOT work with one that I created using Amazon’s own AWS Management Console. Who’d have thought it?
Update:
Goaded by Eugene, my masochistic software tester friend, I tested this again, to make sure it wasn’t a one-time error. I logged into the Amazon AWS console, created a new bucket, logged into the QNAP, started the wizard, and…
…it worked. OK, now that I have started down this dark path, forever will it dominate my destiny (or at least until I figure out whether it really was a one-time break or some other thing).
So I re-traced my earlier steps EXACTLY. You see, when I created my first bucket, I did something a little bit different. Read on:
Logged into the Amazon console.
Clicked the “Create Bucket” button.
Typed a 5-character name in the “Bucket Name” field, consisting of three capital letters followed by two numbers.
Now here is where I diverged from the path when I did the test that succeeded where I expected it to fail. This time, just like the first time, instead of clicking the “Create” button, I clicked the “Set Up Logging” button instead. This takes me to another page where I can check a box to enable logging and specify a bucket for the logs to go into, and a prefix for the log files to have.
THEN I clicked the “Create” button, which created the bucket, along with some logging attributes.
I finished by adding a folder with the same character pattern as all of the others.
Once again, (and I tested it more than once this time), the QNAP device cannot work with the bucket that was created with the logging service added into it.
Knowing that Eugene would be disappointed if I did not pursue this to its grisly conclusion, I then added logging to the folder that worked properly when I created it without logging. This did not affect the ability to access it from the QNAP.
Sensing that I was not out of the woods yet, I persisted. I then created another bucket without the logging, then immediately added logging to it, without first connecting with the QNAP. The QNAP then failed to connect to this bucket.
Of course, I could not stop there. Then I had to remove the logging from the bucket, and check the QNAP again: Still no luck.
There are probably some other test sequences I could run, for example, create a bucket with S3Fox, then go to the AWS console and add logging before connecting with the QNAP. However, I am not as masochistic as Eugene, so I’ll tell him that if he wants to log in and play with this, he’s welcome to.
My conclusion: If you create a bucket _and add logging to it_ using the AWS console before connecting to it with the QNAP, it will fail. If you create a bucket _without logging_, then connect to it with the QNAP, then add logging to it afterward, it will probably keep working.
I do hope that the QNAP guy does call back, so I can let him know about this product bug.
Tags: Amazon S3, QNAP, Remote Replication