Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hbase error to connect the Hbase Cluster

Hbase error to connect the Hbase Cluster

Explorer

I´m running a java project em Cloudera VM:

    2:07:43.352 [main-SendThread(127.0.0.1:2181)] INFO  org.apache.zookeeper.ClientCnxn - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
    02:07:43.368 [main] INFO  c.e.f.c.h.utilities.DataManager - Dataset URI : dataset:hbase:127.0.0.1/dev_customers.customer
    02:07:43.505 [main] INFO  org.apache.zookeeper.ZooKeeper - Initiating client connection, connectString=127.0.0.1:2181 sessionTimeout=90000 watcher=hconnection-0x14ec4505, quorum=127.0.0.1:2181, baseZNode=/hbase
    02:07:43.520 [main-SendThread(127.0.0.1:2181)] INFO  org.apache.zookeeper.ClientCnxn - Opening socket connection to server 127.0.0.1/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)
    02:07:43.523 [main] ERROR c.e.f.c.h.utilities.DataManager - An error was encountered while attempting to connect the HBase cluster.
    02:07:43.526 [main] ERROR c.e.f.c.h.utilities.DataManager - An error occurred when creating the managed schema

The Hbase/Zookeeper services are running

3 REPLIES 3

Re: Hbase error to connect the Hbase Cluster

Master Guru
Please ensure the /etc/hadoop/conf, /etc/hive/conf and /etc/hbase/conf
directories are on your Java program's classpath, so proper configs can be
auto-discovered and loaded (vs. defaults being loaded as in your case of
"127.0.0.1" being used).
Highlighted

Re: Hbase error to connect the Hbase Cluster

Explorer

Thanks for your reply.

I'm using IntelliJ, are saying to check the classpath of the project or environment variables?

Re: Hbase error to connect the Hbase Cluster

Master Guru
If you are using an IDE, and if you use Maven, then please try placing the
client XML config files (such as hbase-site.xml) from your cluster
immediately under src/main/resources directory of your project. These will
make it to your project's classpath correctly, by getting packed into the
jar. This is another way of doing the same form of change, but you may want
to remove the files when you are building the final assembly for deploying
into production (and use the /etc/*/conf paths instead) so the runtime
remains flexible.