kudu1.10基於cdh6.3.1搭建


1、下載kudu依賴: yum -y install cyrus-sasl-plain ntp
 
2、下載kudu rpm包:
 
3、kudu安裝部署分布:
機器
服務
cdh01
kudu-master,kudu-tserver
cdh02
kudu-master,kudu-tserver
cdh03
kudu-master,kudu-tserver
 
4、進入目錄:/etc/kudu/conf
修改master.gflagfile文件如下:
 
 
# Do not modify these two lines. If you wish to change these variables,
# modify them in /etc/default/kudu-master.
## Comma-separated list of the RPC addresses belonging to all Masters in this cluster.
## NOTE: if not specified, configures a non-replicated Master.
 
--fromenv=rpc_bind_addresses
--fromenv=log_dir
--fs_wal_dir=/var/lib/kudu/master
--fs_data_dirs=/var/lib/kudu/master
--master_addresses=cdh02:7051,cdh03:7051
 
## You can avoid the dependency on ntpd by running Kudu with --use-hybrid-clock=false
## This is not recommended for production environment.
## NOTE: If you run without hybrid time the tablet history GC will not work.
## Therefore when you delete or update a row the history of that data will be kept
## forever. Eventually you may run out of disk space.
#--use_hybrid_clock=false
 
修改tserver.gflagfile文件如下:
# Do not modify these two lines. If you wish to change these variables,
# modify them in /etc/default/kudu-tserver.
--fromenv=rpc_bind_addresses
--fromenv=log_dir
--fs_wal_dir=/var/lib/kudu/tserver
--fs_data_dirs=/var/lib/kudu/tserver
--tserver_master_addrs=node02:7051,node03:7051

 

5、上面兩個文件修改好之后分發到上述三台機器
 
啟動方式:進入/etc/init.d目錄:
service kudu-master restart

service kudu-tserver restart

 6、啟動后在/var/log/kudu目錄進行日志的查看

啟動成功在后台查看端口:
master:8051
tserver:8050
進入瀏覽器進行IP:端口 驗證kudu服務是否正常
 
kudu常見報錯,摘自:
整理如下:
 
第一種報錯:
Log file created at: 2018/04/02 10:40:33
Running on machine: mrj001
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
F0402 10:40:33.091943 51977 master_options.cc:46] At least 2 masters are required for a distributed config, but master_addresses flag ('192.168.137.6') only specifies 1 masters.

 

報錯分析:

    至少需要配置兩個master,但是只配置了一個

報錯處理:

    kudu-master支持多master備份機制,所以配置時需注意;

    vi /etc/kudu/kudu-master

    注釋掉--master-addresses 

    該參數配置為master節點以及ip列表,不指定默認為單master節點;如果指定了該配置,但是只有一個master節點就會報錯;

 

 
 第二種報錯:
Log file created at: 2018/04/02 10:46:39
Running on machine: mrj001
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
F0402 10:46:39.101296 52137 tablet_server_main.cc:72] Check failed: _s.ok() Bad status: IO error: Failed to load FS layout: Could not lock /soft/kudu/data/data/block_manager_instance: Could not lock /soft/kudu/data/data/block_manager_instance: lock /soft/kudu/data/data/block_manager_instance: Resource temporarily unavailable (error 11)

報錯分析:

    

kudu-tserver啟動報錯,對目錄/soft/kudu/data/data/block_manager_instance不能夠進行鎖定

 

 
 
 第三種報錯:
Log file created at: 2018/04/06 16:13:39
Running on machine: mrj001
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg

F0406 16:13:39.828665  2572 master_main.cc:68] Check failed: _s.ok() Bad status: Service unavailable: Cannot initialize clock: Error reading clock. Clock considered unsynchronized

 

報錯分析:

kudu在啟動之前必須保證各個服務器ntp一致,當各個table server不一致時會導致此報錯;

解決辦法:

查看ntpd服務是否開啟:service ntpd status

查看ntpd服務是否已經同步:ntpstat

如果沒有安裝ntp服務,請參照本人所寫博客:https://blog.csdn.net/m0_38003171/article/details/79789557

 

 
 第四種報錯:
Log file created at: 2018/04/07 13:24:52
Running on machine: mrj001
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg

F0407 13:24:52.627974  5771 master_main.cc:68] Check failed: _s.ok() Bad status: IO error: Could not create new FS layout: Unable to write instance metadata: Call to mkstemp() failed on name template /soft/kudu/master/data/instance.kudutmp.XXXXXX: Permission denied (error 13)

 

報錯分析:

經過分析報錯可以得出:/soft/kudu/master/data/目錄下沒有創建文件的權限,同時kudu在啟動的時候默認是使用kudu用戶進行創建,所以要確定kudu用戶能夠對該文件夾下面的所有目錄進行管理

 

報錯處理:

在沒有權限的目錄下面執行:chown -R kudu:kudu ./*,改變用戶組和用戶為kudu即可解決

 

第五種報錯:

Log file created at: 2018/04/07 13:37:05
Running on machine: mrj001
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg

F0407 13:37:05.960657  5931 tablet_server_main.cc:72] Check failed: _s.ok() Bad status: IO error: Failed to load FS layout: Filesystem root /soft/kudu/tserver/wal                                                                                                   contains illegal whitespace

報錯分析:

/soft/kudu/tserver/wal包含不符合規則的空白

 

報錯處理:

這個報錯是因為tserver配置文件中沒有指定master地址造成的;

檢查/etc/kudu/conf/tserver.gflagfile配置文件,在該配置文件中添加:--tserver_master_addrs=mrj001:7051

注意:mrj001為主機名

 

 
 
 
 
 
 
 
 
 
 
 
 


免責聲明!

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



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