Monday, October 27, 2014

Installing Hortonworks Hadoop Ambari Server

Installing their manager was simple enough:


Install steps here: http://ift.tt/1Dm56HJ


You can use any VM – not just the Vagrant steps described.


1. install the Hortonworks repo:

– wget http://ift.tt/1fESf8t

– cp ambari.repo /etc/yum.repos.d

2. make sure you set up your hosts file at /etc/hosts

2. install the ambari-server

– yum install ambari-server

– ambari-server setup

– just go with defaults

3. start ambari-server

– ambari-server start

– it’ll fail if your hosts file doesn’t include the hostname of the machine you’re running it on


4. in order to add machines to a cluster you need to have the ambari agent installed on each machine

– http://ift.tt/1Dm56HL

– the Ambari wizard will do it automatically ONLY if you have ssh keys installed

– if you don’t have ssh keys installed you will have to manually install the ambari agent on each machine

– wget http://ift.tt/1fESf8t

– cp ambari.repo /etc/yum.repos.d

– yum install ambari-agent

– point the agent at the Ambari server

– nano /etc/ambari-agent/conf/ambari-agent.ini


Notes:


1. The step where you register and check the servers: http://ift.tt/1tA1cuT

– Hosts will fail if you don’t have the /etc/hosts files synced up to reflect all the hosts

2. during install, you can tail -f /var/log/yum.log to see everything Ambari is installing

3. During the “Install, Start, and Test” step, I got a failure on all 3 nodes with this message: “Puppet has been killed due to timeout”. I see yum still installing stuff on each node, so I presume it’s just a case where my internet connection was too slow and it really did timeout. I’m going to let yum continue and then simply click the “retry” button in Ambari…. yeah, after waiting clear through when it installed the mysql-connector packages, I clicked the “Retry” button in Ambari – it’s progressing now.

4. This is kinda cool – it installs mysql as the backend DB for the manager and Hive.

5. It will install Nagios server and agents – again, kinda cool

6. It seems to use Puppet for deployment

7. Note the mysql install could be more secure. Run this on the mysql host at some point: mysql_secure_installation (use all defaults except the mysql root password)


Problems I encountered:

1. Not all services started right up after the install. I had to manually start a few

2. In the initial setup wizard I changed the oozie configs to use a mysql database (the one that was configured to be used for hive). However, the oozie username does not get created and neither does the database. I had to create mysql users oozie@% and oozie@horton2 (the name of the machine oozie was running on, not it was also the same host). The oozie@% wasn’t strictly necessary, but I added it for future machines I might run oozie on.

3.





Friday, October 24, 2014

Installing MapR for the first time

I’m going to give a step-by-step as I’m doing it. I’m running on a fresh CentOS 6.5 minimal install:


1. Download installer from here: http://ift.tt/1yw9kLV

– I had to do yum install wget

– mv mapr-setup mapr-setup.sh

– chmod u+x mapr-setup.sh

– ./mapr-setup.sh

– I see Run “/opt/mapr-installer/bin/install” as super user, to begin install process

– /opt/mapr-installer/bin/install

2. “Unable to install package sshpass”

– looking at logs in /opt/mapr-installer/var/mapr-installer.log I see it tried doing yum install sshpass

– well, I guess it wasn’t found in the default repos I have

– I’m doing this: http://ift.tt/12u8GUO (installing maprTech and EPEL repos)

3. Some questions about the install come up

– I typed in the hostname when it asked for the hostname for the control nodes (I guess a consistent /etc/hosts file would be a good idea)

– I go with default answers (I hit enter a bunch)

4. “Disks not set for node: c1″ (c1 is the hostname of my control node, which is the machine I’m running this installer on)

– I select to modify the options

– “d”

– “Enter the full path of disks for hosts separated by spaces or commas []:”

– I open a new SSH window and do lsblk to see possible drives. I’m going to add a new disk to this machine really quick

– echo “- – -” > /sys/class/scsi_host/host0/scan

– lsblk (don’t see any new disks

– echo “- – -” > /sys/class/scsi_host/host1/scan

– lsblk (still no new disks)

– echo “- – -” > /sys/class/scsi_host/host2/scan

– lsblk (ahh… there’s a new disk at sdb

5. /dev/sdb is the full path to the disks I want to use

– does this mean all hosts need to have the same device paths?

– not sure, but I’m going to find out how things go with adding data nodes later on

6. I put in the SSH creds

7. This is a decent wait

– while poking around in /opt/mapr-installer I noticed an ansible directory – cool way to install stuff – just use an ansible playbook :)

– Cloudera requires the Oracle JDK. MapR uses OpenJDK, which seemed to download and install faster than the Cloudera install.

– I noticed MapR has some good instructions on how to set up a local repo: http://ift.tt/12u8GUO

8. Well, that install took about 20 minutes (on the safe side)

9. I can log in. Now I’ll see how things look, create a few data node VMs, create a new cluster (or is the cluster technically created and I just need to add more nodes?)





Cloning a CentOS 6.5 VM and getting networking to work

Clone a working CentOS 6.5 machine and start it up:


update the hostname here:

nano /etc/sysconfig/network


Reset the NICs:

rm -rf /etc/udev/rules.d/70-persistent-net.rules


reset the UUID and MAC address:

nano /etc/sysconfig/network-scripts/ifcfg-eth0

– remove the stuff after “HWADDR=” just on that line though

– remove the stuff after “UUID=” just on that line)

– make sure you see ONBOOT=yes


reboot


After this, you may not need to mess with the MAC address, as mentioned below, but I figured I’d include how I’ve found to do it.


After reboot, do one of the below to set the MAC address:

1. Go to that above 70-persistent-net.rules file (it gets recreated), get the MAC address and then paste it into “HWADDR=” line

-OR-

2. run system-config-network-tui and confirm the network settings are as desired, then save it. This will put in the MAC address





Thursday, October 23, 2014

OAuth on Tableau Server 8.2

Situation:

Running Tableau behind a NAT

Tableau Server is behind a proxy server

No DNS from public internet

Wanting to extract Google Analytics data automatically via Tableau Server


Note:

The OAuth setup will not work without the proxy settings configured for the Run As account. Here’s what the error looked like after clicking “Accept” on the IE popup confirming I wanted to allow Tableau Server to connect to my Google Account via OAuth (after a 20 second pause):


Tableau Server encountered an internal error.

Request ID: VElOGwoxNiEAADC0qPEAAAHu

Tableau Server version: Version 8.2.3

(8200.14.0925.1717) 64-bit


Here are the steps I took to set up Tableau Server OAuth. They clarify a few things not super-explicitly mentioned here: http://ift.tt/1tmnlLZ:


1. Set up Google OAuth

– create new project here: http://ift.tt/1fljiJ4

– set up a new Client ID under “Credentials

– REDIRECT URI needs to be set to the hostname/domain name you use in your browser to connect to Tableau Server when you set up your Google Analytics key. Note, this cannot be an IP address. “localhost” works if you want to set up OAuth while logged in to the Tableau Server. Really, this whole thing is complicated by the fact that there is no direct, consistent public IP/domain name for accessing Tableau.

– JAVASCRIPT ORIGINS – just blank it out


2. Enable the “Analytics API” in the APIs page of your project


2. log in to Tableau Server (Web UI) with the hostname/domain name you put in the above REDIRECT URI field.


3. The Tableau Server admin needs to go to Admin > Maintenance and check the boxes in the Settings section to allow users to save their own OAuth tokens


3. On the top-right click on your name > User Preferences > click on “Add” next to Google Analytics


Notes on REDIRECT URI:

1. IP addresses result in Google saying you need to supply a device_id and something else – doesn’t work

3. You could make up a domain name and add it to your hosts file (and all your end users’ hosts files…. yikes), and telling IE to not use a proxy server for addresses beginning with that made-up domain name





Google Analytics auto extractions on Tableau Server: GetOAuthUsername caught exception processing specs Response code: 500

The Google Analytics connector will throw odd 500 errors if you don’t configure the Run As account to use the proxy server. If you happened to have Tableau Desktop installed on the Tableau Server machine, everything would have worked just fine…. because you had likely set your own proxy server settings. You also need to set the proxy server configs for your Tableau Server’s Run As account… there, I said it twice.


You have to login/RDP to the Tableau Server as the Run As account to do this. Running IE as the Run As account and configuring the proxy server didn’t “stick” (after setting it, I immediately opened up the configs again and they were reset to default). You have to RDP in. If you don’t, here’s an error you see when publishing a workbook to the server:


An error occurred when publishing the data source.

GetOAuthUsername caught exception processing specs Response code: 500





Error in Cluster – Error connecting to db with user ‘\”hive’\” and jdbcUrl ‘\”jdbc:postgresql://localhost:7432/hive’\”’

The Cluster Setup step (step 5) where it creates the Hive metastore tables kept failing with the below error (seen in the logs when you click on Details > stderr). I was installing the embedded Postgres DB.


Error connecting to db with user ‘\”hive’\” and jdbcUrl ‘\”jdbc:postgresql://localhost:7432/hive’\”’


It seems I got it to get past this by manually clicking to start the Hive metastore service:

Coudera Manager > in the cluster section on the left click on Hive > click on Instances tab > select the Hive metastore server and from Actions select “start”. For whatever reason, after doing that and then going back and clicking “Retry” on the Cluster Setup page, it didn’t throw the error and the cluster seemed to start up alright.





Wednesday, October 22, 2014

Cluster Installation step of installing Hadoop via Cloudera Manager

The “Cluster Installation” phase of installing the Hadoop cluster didn’t have CDH 5.2 – it only showed 4.7. It had also auto-selected some of the other parcel options (Accumulo, etc.), when every other time I’ve done this installation it had by default selected “None”. The following step where it downloads and distributes the parcels seemed to hang after downloading; so when I clicked “Back”, the cluster installation restarted and I had to reselect the nodes I wanted to include in the cluster. After that, the usual default selections of CDH 5.2 and none of the other parcels showed up; and this time it seems the download, distribution and activation worked fine.


My URL looked like this, in case you’ve encountered the same thing:

/cmf/express-wizard/wizard#step=parcelInstallStep


I don’t think this something is particularly broken, but I figured I’d post this as an edge case help.