AnsweredAssumed Answered

AsyncHbaseSink tries to communicate with zookeeper on TCP port 2181 instead of 5181

Question asked by kkuehl on Apr 4, 2013
This question seems directly related to http://answers.mapr.com/questions/2514/hbase-code-is-not-running-javanetconnectexception

I am using the mapr m3 vmware image.
/opt/mapr/hbase/hbase-0.92.1/conf/hbase-site.xml contains
<pre>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>5181</value>
</property>
</pre>
and netstat -an | grep LISTEN confirms zookeeper is running on 5181

I have written a prototype asynchbasesink for flume.

I have attempted to add /opt/mapr/hbase/hbase-0.92.1/conf to the beginning of the classpath as recommended in the answers to the similar question above.
<pre>
flume-ng agent --classpath /opt/mapr/hbase/hbase-0.92.1/conf/ --conf $CWD/conf --conf-file $CWD/conf/flume.conf -Dflume.root.logger=DEBUG,console,LOGFILE -n agent
</pre>

When the above command line is executed, the following is displayed in the console:
<pre>
 + exec /usr/lib/jvm/java-6-sun-1.6.0.26/bin/java -Xms100m -Xmx200m -Dcom.sun.management.jmxremote -Dflume.root.logger=DEBUG,console,LOGFILE -cp '/opt/mapr/flume/flume-1.3.1/lib/*:/opt/mapr/hbase/hbase-0.92.1/conf:lib/*:ct-flume-agent/target/*:
 ....
</pre>

It still tries to connect to tcp port 2181:
<pre>
2013-04-04 08:18:11,066 (lifecycleSupervisor-1-0-SendThread(localhost:2181)) [INFO - org.apache.zookeeper.ClientCnxn$SendThread.logStartConnect(ClientCnxn.java:966)] Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (Unable to locate a login configuration)
2013-04-04 08:18:11,070 (lifecycleSupervisor-1-0-SendThread(localhost:2181)) [WARN - org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1089)] Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
</pre>

I also have tried adding the folloging to my derived AsyncHbaseEventSerializer class's initialize()
<pre>
Configuration conf = HBaseConfiguration.create();
conf.setInt("hbase.zookeeper.property.clientPort", 5181);
</pre>
with identical results.

Any help/insight would be appreciated.


Outcomes