kudu1.10基於cdh6.3.1搭建

天下熙攘皆為利往發表於2020-11-14
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為主機名

 

 
 
 
 
 
 
 
 
 
 
 
 

相關文章