Cloudera Manager5安裝總結遇到問題及解決辦法 CDH 5.8 on CentOS 7


問題導讀:
1.Cloudera Manager在線安裝你認為有什么優點和缺點?
2.Cloudera Manager安裝過程中遇到,你認為該如何解決?
3.在線安裝 addr.arpa domain name pointer localhost出現這個問題該如何解決?





安裝過程中,由於網絡終端,導致下面問題:
問題1:安裝停止在獲取安裝鎖
/tmp/scm_prepare_node.tYlmPfrT 
using SSH_CLIENT to get the SCM hostname: 172.16.77.20 33950 22 
opening logging file descriptor 

正在啟動安裝腳本... 正在獲取安裝鎖... BEGIN flock 4 



此時刪除 /tmp/. scm_prepare_node.lock 再重試就可解決





問題2:不能選擇主機

安裝失敗了,重新不能選主機

bunengxuanze.png


圖1
解決方案,需要清理安裝失敗文件
卸載 Cloudera Manager 5.1.x.和 相關軟件【官網翻譯:高可用】






問題3:DNS反向解析PTR localhost:
描述:

DNS反向解析錯誤,不能正確解析Cloudera Manager Server主機名
日志:
Detecting Cloudera Manager Server...
Detecting Cloudera Manager Server...
BEGIN host -t PTR 192.168.1.198
198.1.168.192.in-addr.arpa domain name pointer localhost.
END (0)
using localhost as scm server hostname
BEGIN which python
/usr/bin/python
END (0)
BEGIN python -c 'import socket; import sys; s = socket.socket(socket.AF_INET); s.settimeout(5.0); s.connect((sys.argv[1], int(sys.argv[2]))); s.close();' localhost 7182
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<string>", line 1, in connect
socket.error: [Errno 111] Connection refused
END (1)
could not contact scm server at localhost:7182, giving up
waiting for rollback request


解決方案:

將連不上的機器 /usr/bin/host 文件刪掉,執行下面命令:
  1. sudo mv /usr/bin/host /usr/bin/host.bak
復制代碼



說明:
不明白cloudera的初衷,這里已經得到 Cloudera Manager Server的ip了,卻還要把ip解析成主機名來連接
由於DNS反向解析沒有配置好,根據Cloudera Manager Server 的ip解析主機名卻得到了localhost,造成之后的連接錯誤
這里的解決方案是直接把/usr/bin/host刪掉,這樣Cloudera Manager就會直接使用 ip進行連接,就沒有錯了
參考:






問題 4 NTP:

問題描述: 
Bad Health --Clock Offset
The host's NTP service did not respond to a request for the clock offset.
解決:
配置NTP服務
步驟參考:

CentOS配置NTP Server:

http://www.hailiangchen.com/centos-ntp/

國內常用NTP服務器地址及IP

http://www.douban.com/note/171309770/

修改配置文件:
[root@work03 ~]# vim /etc/ntp.conf

# Use public servers from the pool.ntp.org project.
# Please consider joining the pool ( http://www.pool.ntp.org/join.html).
server s1a.time.edu.cn prefer
server s1b.time.edu.cn
server s1c.time.edu.cn

restrict 172.16.1.0 mask 255.255.255.0 nomodify   <===放行局域網來源

啟動ntp
#service ntpd restart    <===啟動ntp服務
客戶端同步時間(work02,work03):
ntpdate work01
說明:NTP服務啟動需要大約五分鍾時間,服務啟動之前,若客戶端同步時間,則會出現錯誤“no server suitable for synchronization found”
定時同步時間:
在work02和 work03上配置crontab定時同步時間

crontab -e
00 12 * * * root /usr/sbin/ntpdate 192.168.56.121 >> /root/ntpdate.log 2>&1 
問題 2.2
描述:
     Clock Offset

  • Ensure that the host's hostname is configured properly.
  • Ensure that port 7182 is accessible on the Cloudera Manager Server (check firewall rules).
  • Ensure that ports 9000 and 9001 are free on the host being added.
  • Check agent logs in /var/log/cloudera-scm-agent/ on the host being added (some of the logs can be found in the installation details).
問題定位:

在對應host(work02、work03)上運行 'ntpdc -c loopinfo'
[root@work03 work]# ntpdc -c loopinfo
ntpdc: read: Connection refused
解決:

開啟ntp服務:
三台機器都開機啟動 ntp服務
chkconfig ntpd on






問題 5 heartbeat:
錯誤信息:
Installation failed. Failed to receive heartbeat from agent.
解決:關閉防火牆


centos7.0(默認是使用firewall作為防火牆,如若未改為iptables防火牆,使用以下命令查看和關閉防火牆)

查看防火牆狀態:firewall-cmd --state

關閉防火牆:systemctl stop firewalld.service







問題 6 Unknow Health:
Unknow Health
重啟后:Request to theHost Monitor failed.
service --status-all| grep clo
機器上查看scm-agent狀態:cloudera-scm-agent dead but pid file exists
解決:重啟服務
service cloudera-scm-agent restart
service cloudera-scm-server restart






問題 7 canonial name hostname consistent:
Bad Health
The hostname and canonical name for this host are not consistent when checked from a Java process.
canonical name:
4092 Monitor-HostMonitor throttling_logger WARNING  (29 skipped) hostname work02 differs from the canonical name work02.xinzhitang.com
解決:修改hosts 使FQDN和 hostname相同
ps:雖然解決了但是不明白為什么主機名和主機別名要一樣
/etc/hosts
192.168.1.185 work01 work01
192.168.1.141 work02 work02
192.168.1.198 work03 work03





問題 8 Concerning Health:
Concerning Health Issue
--  Network Interface Speed --
描述:The host has 2 network interface(s) that appear to be operating at less than full speed. Warning threshold: any.
詳細:
This is a host health test that checks for network interfaces that appear to be operating at less than full speed.
A failure of this health test may indicate that network interface(s) may be configured incorrectly and may be causing performance problems. Use the ethtool command to check and configure the host's network interfaces to use the fastest available link speed and duplex mode.
解決:
本次測試修改了 Cloudera Manager 的配置,應該不算是真正的解決



問題 9:



Cloudera 建議將 /proc/sys/vm/swappiness 設置為 0。當前設置為 60。使用 sysctl 命令在運行時更改該設置並編輯 /etc/sysctl.conf 以在重啟后保存該設置。您可以繼續進行安裝,但可能會遇到問題,Cloudera Manager 報告您的主機由於交換運行狀況不佳。以下主機受到影響:


解決辦法:執行下面即可


  1.      
         
         
                 
    echo 0 > /proc/sys/vm/swappiness

    1.查看你的系統里面的swappiness
    $ cat /proc/sys/vm/swappiness
    不出意外的話,你應該看到是 60
    2.修改swappiness值為10
    $ sudo sysctl vm.swappiness=10
    但是這只是臨時性的修改,在你重啟系統后會恢復默認的60,所以,還要做一步:
    $ gksudo gedit /etc/sysctl.conf
    在這個文檔的最后加上這樣一行:
    vm.swappiness=10



問題10:

對於虛擬機安裝時直接拷貝虛擬機文件的,需要將復制后的虛擬機里的一下文件刪除,不然會出現 識別錯誤等

刪掉/var/lib/cloudera-scm-agent里面的
response.avro  uuid


  1.      
         
         
                 
    1. rm /var/lib/cloudera-scm-agent/*



問題11:

Failed to create Oozie database.

可以試試:
   
   
   
           
  1. rm -rf /var/lib/oozie/*
或者:
   
   
   
           
  1.  drop database oozie on postgresql

內嵌  PostgreSQL  數據庫的密碼位置  : 
    scm數據庫的用戶名,密碼 
    more /etc/cloudera-scm-server/db.properties 
    其他數據庫(如amon,hmon,smon,rman,nav)的用戶名、密碼 
    more /etc/cloudera-scm-server/db.mgmt.properties 
    數據庫管理者(相當於oracle DBA)cloudera-scm的用戶名、密碼 
    /var/lib/cloudera-scm-server-db/data/generated_password.txt 
    hive數據庫的用戶名、密碼 
    You can find the databaes admin(cloudera-scm) password in /var/lib/cloudera-scm-server-db/data/generated_password.txt. 


針對數據庫的管理

1:連接數據庫

    psql --host=localhost --port=7432 --username=scm --dbname=postgres -v ON_ERROR_STOP=1 
    psql --host=localhost --port=7432 --username=hmon --dbname=hmon -v ON_ERROR_STOP=1 
    psql --host=localhost --port=7432 --username=hive --dbname=hive -v ON_ERROR_STOP=1 
    psql --host=localhost --port=7432 --username=cloudera-scm -W=Cl5y3a3i6C --dbname=postgres -v ON_ERROR_STOP=1

    輸入用戶口令后即可進入數據庫 
        顯示數據庫列表 \l  
        切換數據庫\c test 
        退出 \q 
        列表表、視圖、序列 \d

2:數據查詢

    注意在查看hive數據庫中表中的數據時,可以由於hive數據庫在建表時,表的定義使用了大小寫混合拼寫的方式,在PostgreSQL中使用雙引號來界定標識符使您的具體大小寫混合的拼寫。否則會報下圖中的錯誤:

ERROR:  relation "dbs" does not exist

3、數據導出

    pg_dump -h localhost -p 7432 -U scm > /tmp/scm_server_db_backup.$(date +%Y%m%d)



或者放棄postgresql,使用mysql,作為數據庫

  CentOS7的yum源中默認好像是沒有mysql的。為了解決這個問題,我們要先下載mysql的repo源。

1. 下載mysql的repo源

$ wget http://repo.mysql.com/mysql-community-release-el7-7.noarch.rpm

2. 安裝mysql-community-release-el7-5.noarch.rpm包

$ sudo rpm -ivh mysql-community-release-el7-7.noarch.rpm

安裝這個包后,會獲得兩個mysql的yum repo源:/etc/yum.repos.d/mysql-community.repo,/etc/yum.repos.d/mysql-community-source.repo。

3. 安裝mysql

$ sudo yum install mysql-server

根據步驟安裝就可以了,不過安裝完成后,沒有密碼,需要重置密碼。

來源: http://www.mamicode.com/info-detail-503994.html


4、 install the MySQL connector on a RHEL  system:


sudo yum install mysql-connector-java

5、To set the MySQL root password:

   
   
   
           
  1. service mysqld start
    
    
    
            
  1. sudo /usr/bin/mysql_secure_installation

6、To make sure the MySQL server starts at boot:

  • On RHEL systems:
$ sudo /sbin/chkconfig mysqld on
$ sudo /sbin/chkconfig --list mysqld
mysqld          0:off   1:off   2:on    3:on    4:on    5:on    6:off
7、create database and user 

      
      
      
              
  1. mysql -u root -p
  2. mysql> CREATE USER 'hive'@'metastorehost' IDENTIFIED BY 'mypassword';
  3. ...
  4. mysql> REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'hive'@'metastorehost';
  5. mysql> GRANT ALL PRIVILEGES ON metastore.* TO 'hive'@'metastorehost';
  6. mysql> FLUSH PRIVILEGES;
  7. mysql> quit;




hello world:

   
   
   
           
  1. sudo -u hdfs hadoop jar /opt/cloudera/parcels/CDH/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar pi 10 100




The "Getting Started with Hadoop" Tutorial










>Install htop on CentOS 7


Install Epel Release

First, enable the epel release on CentOS 7.

yum -y install epel-release

install htop With Yum Command

Now we can install CentOS htop using yum install command.

yum -y install htop








免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM