org.apache.kudu.client.NoLeaderFoundException: Master config, has no leader. Exceptions received: org.apache.kudu.client.RecoverableException: Failed to connect to peer master-cdh2:7051(cdh2:7051): Connection refused: no further information:
运行程序的时候发现抱错kudu master has no leader ,说明kudu 的master server拒绝了这次连接,是因为kudu自身的安全机制导致的,修改配置文件/etc/kudu/conf/master.gflagfile,增加以下内容
--unlock_unsafe_flags=true
--allow_unsafe_replication_factor=true
--default_num_replicas=1
--rpc_negotiation_timeout_ms=9000
--rpc-encryption=disabled
--rpc_authentication=disabled
--trusted_subnets=0.0.0.0/0