Fix locale/encoding error using Cloudera Manager with Vagrant

Posting a Google breadcrumb:

This weekend I tried to use Cloudera Manager with Apache Whirr to set up a hadoop cluster. Somewhat frustratingly, Cloudera Manager does not work on OSX, and Whirr has a bug that makes it not work properly on EC2. So I settled on creating a Virtual Machine running Ubuntu on my laptop, which I created using Vagrant.

When trying to run the Cloudera installer, I got this error:


The encoding you selected (UTF8) and the encoding that the
selected locale uses (LATIN1) do not match.  This would lead to
misbehavior in various character string processing functions.
Rerun initdb and either do not specify an encoding explicitly,
or choose a matching combination.
I couldn’t find a solution online, but what ultimately worked was:
$ sudo su – root
$ export LANG=“en_US.utf8" 
$ export LC_ALL="en_US.utf8”
$ (still as root) ./cloudera-manager-installer.bin
The problem is that for some reason, the default locale/encoding on the vagrant VM prototype images is plain English, not UTF8. Hope this helps. with Whirr and Ubuntu Precise 12.04

Just leaving a Google breadcrumb in case someone hits this error. If you’re trying to launch a cluster using Whirr and Precise, and you get this error: (ubuntu:rsa[fingerprint(8a:da:a2:0f:23:d0:3b:91:38:93:1f:5b:2b:dc:33:90),sha1(f5:eb:ab:91:a2:a7:be:f1:90:f6:2c:10:f0:89:1f:51:12:a9:32:e5)]@ (ubuntu:rsa[fingerprint(8a:da:a2:0f:23:d0:3b:91:38:93:1f:5b:2b:dc:33:90),sha1(f5:eb:ab:91:a2:a7:be:f1:90:f6:2c:10:f0:89:1f:51:12:a9:32:e5)]@ error acquiring SSHClient(timeout=60000): Exhausted available authentication methods

You can fix it by adding:
to your (or equivalent) file.