1

I run hbase with start-hbase.sh, but the log file output exception as follow:

2015-09-12 18:39:37,935 WARN  [RS:0;roger-ubuntu:54809-SendThread(localhost:2181)] zookeeper.ClientCnxn: Session 0x14fc12354a40004 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: 拒绝连接
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:740)
    at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:361)
    at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)

According to Exception, hbase can not connect to zookeeper, but this hbase should run a zookeeper for self.

here is my hbase-site.xml:

<configuration>
    <property>
        <name>hbase.coprocessor.region.classes</name>
        <value>com.gzhdi.coprocessor.HelloWorldEndPoint</value>
    </property>
</configuration>

and my hbase-env.sh:

export HBASE_OPTS="-XX:+UseConcMarkSweepGC"
roger
  • 9,063
  • 20
  • 72
  • 119

1 Answers1

1

Have you have to set the hbase.zookeeper.quorum property in hbase-site.xml? Also check if classpath is set properly or not, check this doc out: Package org.apache.hadoop.hbase.mapreduce.

Are you running a standalone HBase? You can always see run the hbase zkcli to check.

slm
  • 15,396
  • 12
  • 109
  • 124
cogan
  • 106
  • 5
  • As you see, all content in `hbase-site.xml` is in my question. And yes, I am running hbase in standalone mode. `./zkCli.sh -server localhost:2181` also return `java.net.ConnectException` Excetion – roger Sep 14 '15 at 02:00