Advertisement

Showing posts with label Hadoop V2. Show all posts
Showing posts with label Hadoop V2. Show all posts

Thursday, July 5, 2018

Hadoop V2 Cloudera - Zookeeper org.apache.zookeeper.server.quorum.QuorumPeerMain: Invalid config, exiting abnormally

In this blog I discuss an issue I faced in installation of Cloudera  Zookeeper service during installation (5.15.0)

Issue  - Failing Zookeper Installation 
Symptoms
Logon to one of the node where you are trying to install the zookepere service
cd /var/log/zookeeper


2018-07-05 05:35:35,792 ERROR org.apache.zookeeper.server.quorum.QuorumPeerMain: Invalid config, exiting abnormally
org.apache.zookeeper.server.quorum.QuorumPeerConfig$ConfigException: Error processing /run/cloudera-scm-agent/process/115-zookeeper-server/zoo.cfg.



Solution
run below Command on each server and resume the installation, it should complete successfully. 

chmod 755 /var/lib/zookeeper;
chown zookeeper.zookeeper /var/lib/zookeeper;
ls -altrid /var/lib/zookeeper;
setfacl -m "u:zookeeper:rwx,g:zookeeper:rwx" /var/lib/zookeeper/;

getfacl /var/lib/zookeeper/;
mkdir /var/lib/zookeeper/version-2;
chown zookeeper.zookeeper /var/lib/zookeeper/version-2;


 

 

Thursday, June 21, 2018

Hadoop V2 - Cloudera - Setup Services and Roles (Steps and Screenshots)

If you have followed my previous blog on adding hosts to cluster. You should be now at a stage where the role assignments and setup should take place. 

From where we left of you should now see be adding roles.

1. Select type of services  you want to install (Custom Services or any of your choice)



2. Select role assignments (careful, but you can change these later)



3. Review the Databases (and click on Test Connection if required)


4. Review changes (careful, it's a long list)



5. Wait 






Wednesday, June 20, 2018

Hadoop V2 - Cloudera - Add Hosts to Cluster (Steps and Screenshots)


If you have installed the Cloudera Manager properly and followed the instructions then, below screenshots will help you in adding hosts to the cluster. 

 1. Go All Hosts on the Home Page 
 

2. Click on Add New Hosts to Cluster

3. Specify Search String for hosts and click on search

4. Choose the installation type (default here, no changes done)

5. Accept the License

6. Do NOT choose single user mode
7. Enter Credentials to Login


8. Proceed with the installation

 9. Finish up the installation.





Tuesday, June 19, 2018

HadoopV2 - Cloudera - Install (Steps and Screenshots)

In this blog I cover quick installation of cloudera manager. 

Download Installer file 

curl http://archive.cloudera.com/cm5/installer/5.10.1/cloudera-manager-installer.bin -o cloudera-manager-installer.bin

Create repo files 

cat /etc/yum.repos.d/cloudera-cdh5.repo
[cloudera-cdh5]
# Packages for Cloudera's Distribution for Hadoop, Version 5, on RedHat    or CentOS 7 x86_64
name=Cloudera's Distribution for Hadoop, Version 5
baseurl=https://archive.cloudera.com/cdh5/redhat/7/x86_64/cdh/5/
gpgkey =https://archive.cloudera.com/cdh5/redhat/7/x86_64/cdh/RPM-GPG-KEY-cloudera   
gpgcheck = 0
 


cat /etc/yum.repos.d/centos57-updates.repo
[updates]
name=Updates
baseurl=http://vault.centos.org/5.7/updates/\$basearch/
gpgcheck=0

Refres cache for Yum repos
yum makecache

Install Execute  (as root)

 chmod u+x cloudera-manager-installer.bin

 Log Location

1. /var/log/cloudera-manager-installer
2.  and /var/log/cloud-init.log
 

If your installation fails refer to /var/log/cloudera-manager-installer directory for logs. Look for the last update log. 

Other things you should make sure to have ease of installation for next steps
1. ntp is installed  and running (either pointing to local or internet server)
NTP Enabled (sudo  systemctl enable ntpd, sudo service ntpd start )
2. /etc/hosts or DNS -  The canonical name of each host in /etc/hosts must be the FQDN (for example myhost-1.mynet.myco.com), not the unqualified hostname (for example myhost-1). The canonical name is the first entry after the IP address. (server 192.168.1.200 prefer)
Do not use aliases, either in /etc/hosts or in configuring DNS.


3. Add /etc/yum.conf the proxy configuration - in case you want yum to use proxy servers (this is for hosts addition) "proxy=http://192.168.1.200:3128/"
4. Java installed on all hosts to be managed (sudo yum install oracle-j2sdk1.7 -y)









 Login using admin/admin for the first time



Post this you can click on Home , we will add hosts individually later


Check for the services installed on the box where you installed

 chkconfig --list | grep cloudera


cloudera-scm-server     0:off   1:off   2:off   3:on    4:on    5:on    6:off
cloudera-scm-server-db  0:off   1:off   2:off   3:on    4:on    5:on    6:off
 

Thursday, May 10, 2018

Hadoop V2 - Hue Setup

In this blog I am going to discuss on how to setup Hue in your HDFS cluster.


Step 1
Download Hue on Edge Node and Extract

wget https://www.dropbox.com/s/auwpqygqgdvu1wj/hue-4.1.0.tgz?dl=0#

 tar -xzf hue-4.1.0.tgz
 

Step 2
Make Hue
 cd /tmp/hue-4.1.0
 yum install python-devel.x86_64 -y
 yum install sqlite-devel.x86_64 -y
 yum install libxml2-devel.x86_64 -y
 yum install libxslt-devel.x86_64 -y
 yum install libffi-devel.x86_64 -y
 yum install openldap-devel.x86_64 -y
 yum install mariadb-devel.x86_64 -y
 yum install gmp-devel.x86_64 -y
 make install


Step 3
Create User and change ownership
useradd -u 1014  -g hadoop hue
chown -R hue:hadoop /usr/local/hue



Step 4
Add to core-site.xml (on nn) and distribute to cluster.

Then restart both nn

<property>
    <name>hadoop.proxyuser.hue.hosts</name>
    <value>*</value>
</property>
<property>
    <name>hadoop.proxyuser.hue.groups</name>
    <value>*</value>
</property>


Step 5
Configure hue.ini. Below is what all I have configured. I always mark 'Custom' to whatever I change in order to get the changes I do to config files faster.

cd /usr/local/hue

 cat ./desktop/conf/hue.ini | grep Custom
      fs_defaultfs=hdfs://devcluster:8020 ###Custom
      webhdfs_url=http://192.168.1.71:14000/webhdfvs/v1    ###Custom
        hadoop_conf_dir=/etc/hadoop/conf   ###Custom
       resourcemanager_host=rm ###Custom
         resourcemanager_port=8032 ###Custom
       resourcemanager_api_url=http://rm:8088 ##Custom
       proxy_api_url=http://rm:8088 ##Custom
       history_server_api_url=http://rm:19888 ###Custom



Step 6
[Start hue - As hue]
/usr/local/hue/build/env/bin/supervisor


Step 7
Login to URL
http://<hostname>:8888
You will get first time user password set UI.




I generally (in test envs) set user to hue and password to hadoop

Tuesday, May 8, 2018

HDPV2 - Decomissioning a Node

In this blog I am going to discuss how to decommission a node in HDFS
Decommissioning is a graceful process in which blocks get replicated to other nodes.


Step 1
Following Properties must be set on your HDFS
cd /etc/hadoop/conf
hdfs-site.xml
<property>
        <name>dfs.hosts.exclude</name>
        <value>/etc/hadoop/conf/dfs.hosts.exclude</value>
</property>

<property>
        <name>dfs.hosts</name>
        <value>/etc/hadoop/conf/dfs.hosts.include</value>
</property>

yarn-site.xml
<property>
        <name>yarn.resourcemanager.node.include-path</name>
        <value>/etc/hadoop/conf/dfs.hosts.include</value>
</property>
<property>
        <name>yarn.resourcemanager.node.exclude-path</name>
        <value>/etc/hadoop/conf/dfs.hosts.exclude</value>
</property>



Step 2
[As root on nn]

Remove entry of new node from slaves and include file and add it to the exclude file
(I am removing d3n)


cd /etc/hadoop/conf
cat slaves
d1n
d2n
d4n

[As root on rm]

cd /etc/spark/conf
cat slaves
d1n
d2n
d3n


Step 3
[As root on nn]
Distribute slaves, dfs.hosts.include and dfs.hosts.exclude to nn, snn and rm

Step 4
[As hdfs on nn]
hdfs dfsadmin –refreshNodes

Step 5

[As yarn on rm]
yarn rmadmin -refreshNodes


Step 6
[As hdfs on nn]
Verify using
hdfs dfsadmin -report

Step 7
Stop all daemons.

Decomission the node once the output of hdfs dfsadmin -report no longer shows the name of the node.

[As hdfs on d3n]
hadoop-daemon.sh stop datanode

[As yarn on d3n]
yarn-daemon.sh stop nodemanager

[As spark on d3]
stop-slave.sh