You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "Ctest (Jira)" <ji...@apache.org> on 2020/02/26 01:52:00 UTC

[jira] [Created] (HDFS-15193) Improving the error message for missing `dfs.namenode.rpc-address.$NAMESERVICE`

Ctest created HDFS-15193:
----------------------------

             Summary: Improving the error message for missing `dfs.namenode.rpc-address.$NAMESERVICE`
                 Key: HDFS-15193
                 URL: https://issues.apache.org/jira/browse/HDFS-15193
             Project: Hadoop HDFS
          Issue Type: Bug
          Components: hdfs
            Reporter: Ctest


I set `dfs.nameservices` with the value of one name service (let’s say `ns1` for simplicity) and forgot to set `dfs.namenode.rpc-address.ns1`. 

Then I got error message:

 

 
{code:java}
[ERROR] testNonFederation(org.apache.hadoop.hdfs.tools.TestGetConf)  Time elapsed: 0.195 s <<< ERROR!
java.io.IOException: Incorrect configuration: namenode address dfs.namenode.servicerpc-address or dfs.namenode.rpc-address is not configured.
at org.apache.hadoop.hdfs.DFSUtil.getNNServiceRpcAddressesForCluster(DFSUtil.java:629)
at org.apache.hadoop.hdfs.tools.TestGetConf.getAddressListFromConf(TestGetConf.java:132)
at org.apache.hadoop.hdfs.tools.TestGetConf.verifyAddresses(TestGetConf.java:234)
at org.apache.hadoop.hdfs.tools.TestGetConf.testNonFederation(TestGetConf.java:308)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:748)
{code}
 

 

But the actual reason for the error is that `dfs.namenode.rpc-address.ns1` or `dfs.namenode.servicerpc-address.ns1` is not set.

 

How to improve

 

I wrote a patch to improve the error message. Here is the current error message:

[ERROR] testNonFederation(org.apache.hadoop.hdfs.tools.TestGetConf)  Time elapsed: 0.195 s <<< ERROR!

java.io.IOException: Incorrect configuration: namenode address dfs.namenode.servicerpc-address[.$NAMESERVICE] or dfs.namenode.rpc-address[.$NAMESERVICE] is not configured.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org