启动zookeeper后看到2181端口已经占用
然后运行:zkCli.sh -server server1:2181
运行后在welcome to zookeeper!后不断出错误信息:
- Opening socket connection to server localhost/0:0:0:0:0:0:0:1:2181. Will not attempt to authenticate using SASL (unknown error)
JLine support is enabled
Socket connection established to localhost/0:0:0:0:0:0:0:1:2181, initiating session
Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
tickTime=2000
initLimit=10
syncLimit=5
dataDir=/hadoop_data/zookeeper-3.4.5/data
dataLogDir=/hadoop_data/zookeeper-3.4.5/log
clientPort=2181
server.1=hadoop98:2888:3888
server.2=hadoop30:2888:3888
server.3=hadoop40:2888:3888
其中的dataDir目录和dataLogDir都已经建立好。也已经在三台服务器的dataDir目录里建立myid的对应文件
hosts文件:PXA270的视频监控系统设计与开发+帧对比算法
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.30 hadoop30
192.168.1.40 hadoop40
192.168.1.98 hadoop98
奇怪的是,我的hbase使用的这三个zookeeper,在hbase shell里看状态说三台hbase服务器都正常启动了,难道这个错误无关紧要?
hbase-site.xml的内容是:
<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://hadoop98:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.master</name>
<value>hdfs://hadoop98:6000</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>hadoop98,hadoop30,hadoop40</value>
</property>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>
hbase-env.sh中的 HBASE_MANAGES_ZK也设置为false
这样,myid从0开始配置
如果不行,关闭2个ZK,只留一个
再不行,用HBASE托管拉起试试