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.

org.apache.hadoop.hbase.client.NoServerForRegionException: Unable to find region

org.apache.hadoop.hbase.client.NoServerForRegionException: Unable to find region

New Contributor

Hi,

 

i am running a map reduce job on hbase and I getting the following exception.

 

ERROR mapreduce.TableInputFormat: org.apache.hadoop.hbase.client.NoServerForRegionException:

Unable to find region for TestTable,,99999999999999 after 2 tries.

 

 

And I am using hbase version 0.94.15 ....Also I am able to run scans and other tasks from Hbase shell.

 

 

Thanks

vikram

2 REPLIES 2

Re: org.apache.hadoop.hbase.client.NoServerForRegionException: Unable to find region

Master Guru
Could you ensure your MR code does the below things?

1. Its invoked with the 'hadoop jar' command, but also with HADOOP_CLASSPATH set to $(hbase classpath) output prior to invocation? This ensures the right library AND configs get loaded, for proper cluster and table discovery.
2. It does NOT do any "HBaseConfiguration.create()" or "new Configuration()" within the Map or Reduce code, and instead just gets it from "context.getConfiguration()"?
Highlighted

Re: org.apache.hadoop.hbase.client.NoServerForRegionException: Unable to find region

New Contributor

Hi Harsh,

 

I'm facing the same issue while executing via Eclipse (Run/Debug). Please advise how to fix the same as I need to debug the code at Eclipse.

 

 

 

However, if I run via command line then it's working but squealing following error:

 

hadoop jar hbaseMR.jar com.vikasg.usernamecount.master.WordCountHBaseSink

 

15/10/21 22:40:13 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is 16584@localhost.localdomain
15/10/21 22:40:13 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost.localdomain/127.0.0.1:2181. Will not attempt to authenticate using SASL (java.lang.SecurityException: Unable to locate a login configuration)
15/10/21 22:40:13 INFO zookeeper.ClientCnxn: Socket connection established to localhost.localdomain/127.0.0.1:2181, initiating session
15/10/21 22:40:14 INFO zookeeper.ClientCnxn: Session establishment complete on server localhost.localdomain/127.0.0.1:2181, sessionid = 0x1508d0430440022, negotiated timeout = 60000
15/10/21 22:40:17 INFO mapreduce.TableOutputFormat: Created table instance for user2
15/10/21 22:40:17 ERROR mapreduce.TableInputFormatBase: Cannot resolve the host name for /127.0.0.1 because of javax.naming.CommunicationException: DNS error [Root exception is java.io.IOException: Network is unreachable]; remaining name '1.0.0.127.in-addr.arpa'
15/10/21 22:40:17 WARN conf.Configuration: fs.default.name is deprecated. Instead, use fs.defaultFS
15/10/21 22:40:17 WARN conf.Configuration: dfs.https.address is deprecated. Instead, use dfs.namenode.https-address
15/10/21 22:40:17 WARN conf.Configuration: io.bytes.per.checksum is deprecated. Instead, use dfs.bytes-per-checksum
15/10/21 22:40:26 INFO mapred.JobClient: Running job: job_201510211747_0001
15/10/21 22:40:27 INFO mapred.JobClient: map 0% reduce 0%
15/10/21 22:41:25 INFO mapred.JobClient: Task Id : attempt_201510211747_0001_m_000000_0, Status : FAILED
java.lang.NullPointerException
at java.lang.String.<init>(String.java:593)

 

I can guess the reason of NPE which is the due to NULL/BLANK object of Result at Mapper. Actually, I'm Scanning one table and inserting the data at other table. 

 

So, I request you to please advise to resolve the issue.

 

Thanks in advance!

 

Regards,

Vikas