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.

"main" java.lang.RuntimeException: core-site.xml not found

"main" java.lang.RuntimeException: core-site.xml not found

New Contributor

Good day,

 

We have installed CDH 5.4.2

 

We are getting the below error while running the Hadoop fs (file system) command.

 

[root@cloudera-one bin]# hadoop fs -cat hdfs://192.168.6.173:7180/file1Exception in thread "main" java.lang.RuntimeException: core-site.xml not found 

at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2476)

 

        at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2476)

        at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2402)

        at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2319)

        at org.apache.hadoop.conf.Configuration.set(Configuration.java:1057)

        at org.apache.hadoop.conf.Configuration.set(Configuration.java:1029)

        at org.apache.hadoop.conf.Configuration.setBoolean(Configuration.java:1367)

        at org.apache.hadoop.util.GenericOptionsParser.processGeneralOptions(GenericOptionsParser.java:319)

        at org.apache.hadoop.util.GenericOptionsParser.parseGeneralOptions(GenericOptionsParser.java:485)

        at org.apache.hadoop.util.GenericOptionsParser.<init>(GenericOptionsParser.java:170)

        at org.apache.hadoop.util.GenericOptionsParser.<init>(GenericOptionsParser.java:153)

        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:64)

        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)

        at org.apache.hadoop.fs.FsShell.main(FsShell.java:340)

 

Kindly advise the solution at an earliest. Thanks in Advance.

 

Veera

 

7 REPLIES 7

Re: "main" java.lang.RuntimeException: core-site.xml not found

New Contributor

Any solution pl.

Re: "main" java.lang.RuntimeException: core-site.xml not found

Please ensure client configuration is present in /etc/hadoop/conf/. If you use Cloudera Manager, ensure the node has a gateway role and you have delpoyed Client Configuration, then try again

Regards,
Gautam Gopalakrishnan

Re: "main" java.lang.RuntimeException: core-site.xml not found

New Contributor

Hi Veera,

 

Have you been able to find a solution for this problem?

 

I'm trying to connect Hadoop CDH5.3 with Splunk via Hadoop Connect and I encounter this identical error stack trace.

 

Best 

Regards

Luke

 

 

Re: "main" java.lang.RuntimeException: core-site.xml not found

New Contributor
I am also facing this issue

Re: "main" java.lang.RuntimeException: core-site.xml not found

Explorer

hadoop command "hadoop fs -cat hdfs://192.168.6.173:7180/file1".  Port belongs to CM, shouldn't this is NN port

 

 

Re: "main" java.lang.RuntimeException: core-site.xml not found

New Contributor

Its failing because its not able to find the conf path where core-site.xml is located.

 

set the below variable in ~/.bash_profile or at the start of the script.

 

export HADOOP_CONF_DIR=/home/hadoop/hadoop-2.6.4/etc/hadoop

 

This should solve your problem.

Re: "main" java.lang.RuntimeException: core-site.xml not found

New Contributor
export HADOOP_CONF_DIR=/etc/hadoop -- should solve your problem