Let me explain my situation first:
In the HBase shell interface, you can run it with commands, but not with Java API.
HBase and zookeeper configuration files are all OK.
During Java API operation, it is stuck and cannot be connected. Look at the HBase and zookeeper logs. There is no information available.
When the program runs for a long time, it reports an error (intercept a useful line):
java. net. UnknownHostException: can not resolve hadoop01,16020,164077701361
Maybe I can’t recognize Hadoop 01. What’s this?It’s my node hostname.
Here’s how to view it:
1 zkServer.SH check whether there are any leaders, followers, etc. in zookeeper.Mine (is it a zookeeper configuration problem)
2. Check the zookeeper log and enter the logs directory. One of mine is Hadoop 01 and the other is master (previous host name).
At this point, I probably know where the problem is
Possible
1 . Host name and configuration conflict
2 . HBase version data conflict (I have installed different versions)
Solution:
1. Close HBase and zookeeper
2 delete the data file of zookeeper (violence works miracles). Mine is in the data. Pay attention not to delete myid (all three nodes are deleted)
3 restart zookeeper and HBase
Run java code
Finish work
Read More:
- [Solved] Hbase Error: ERROR: KeeperErrorCode = NoNode for /hbase/master
- [Solved] Hbase-shell 2.x Error: Unhandled Java exception: java.lang.IncompatibleClassChangeError: Found class jline.Terminal…
- Mongodb java version 3.X, prompt “XXX (an encryption algorithm) is not available” when there is a user name and password
- How to Solve Hbase JAVA import Package Error
- The node requests the API address written by java to report an error error:getaddrinfo ENOTFOUND
- [Solved] Error:(3, 46) java: Program Package org.springframework.context.annotation does not exist
- Java uses class array to report error Exception in thread “main” java.lang.NullPointerException solution
- [Solved] JAVA Connect rabbitMQ Error: An unexpected connection driver error occured
- Spring integrated HBase error [How to Solve]
- JAVA Connect MYSQL Error: Path does not chain with any of the trust anchors
- [Solved] Kafka in Windows error:java. nio. file. Filesystemexception: this file is in use by another program and cannot be accessed by the process
- [Solved] Error installing MVN: Java_Home is set to an invalid directory
- [Solved] IDEA Error(15, 16) java Program Pack sun.misc does not exsit or import sun.misc.BASE64Decoder Cannot find
- keytool error: java.lang.Exception: Input not an X.509 certificate
- [Solved] the resource is not on the build path of a java project
- Java Error: No enclosing instance of type Main is accessible. Must qualify the allocation with an encl
- [Solved] org.apache.flink.client.program.ProgramInvocationException: The main method caused an error
- javaweb Connect Datas Error: che.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1444)
- Using java to call Jython, the error URI is not hierarchical
- The precision of decimal calculation with double and float in Java is not accurate