Unable to launch hive in putty

Hi,

I am getting the following error when I am trying to access hive in labs:
[Fatal Error] :-1:-1: Premature end of file.
2017-07-04 02:09:36,351 FATAL [main] conf.Configuration: error parsing conf core-site.xml
org.xml.sax.SAXParseException; Premature end of file.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)
at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2514)
at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2502)
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2573)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2526)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2418)
at org.apache.hadoop.conf.Configuration.set(Configuration.java:1143)
at org.apache.hadoop.conf.Configuration.set(Configuration.java:1115)
at org.apache.hadoop.mapred.JobConf.setJar(JobConf.java:520)
at org.apache.hadoop.mapred.JobConf.setJarByClass(JobConf.java:538)
at org.apache.hadoop.mapred.JobConf.(JobConf.java:432)
at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:2909)
at org.apache.hadoop.hive.conf.HiveConf.(HiveConf.java:2868)
at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:74)
at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:58)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:640)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:624)
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.apache.hadoop.util.RunJar.run(RunJar.java:233)
at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
Exception in thread “main” java.lang.RuntimeException: org.xml.sax.SAXParseException; Premature end of file.
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2679)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2526)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2418)
at org.apache.hadoop.conf.Configuration.set(Configuration.java:1143)
at org.apache.hadoop.conf.Configuration.set(Configuration.java:1115)
at org.apache.hadoop.mapred.JobConf.setJar(JobConf.java:520)
at org.apache.hadoop.mapred.JobConf.setJarByClass(JobConf.java:538)
at org.apache.hadoop.mapred.JobConf.(JobConf.java:432)
at org.apache.hadoop.hive.conf.HiveConf.initialize(HiveConf.java:2909)
at org.apache.hadoop.hive.conf.HiveConf.(HiveConf.java:2868)
at org.apache.hadoop.hive.common.LogUtils.initHiveLog4jCommon(LogUtils.java:74)
at org.apache.hadoop.hive.common.LogUtils.initHiveLog4j(LogUtils.java:58)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:640)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:624)
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.apache.hadoop.util.RunJar.run(RunJar.java:233)
at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
Caused by: org.xml.sax.SAXParseException; Premature end of file.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:150)
at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2514)
at org.apache.hadoop.conf.Configuration.parse(Configuration.java:2502)
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2573)
… 19 more
Please let me know once the issue is resolved.

Regards,
Ram

@rss161030 Issue got resolved.

Hi,
Hive issue got resolved but I am unable to use HDFS commands. I am getting the below mentioned error if I try to list the files.
hadoop fs -ls /user/XXXXXX/
Java HotSpot™ 64-Bit Server VM warning: INFO: os::commit_memory(0x00006a0289000000, 351272960, 0) failed; error=‘Cannot allocate memory’ (errno=12)

There is insufficient memory for the Java Runtime Environment to continue.

Native memory allocation (mmap) failed to map 351272960 bytes for committing reserved memory.

An error report file with more information is saved as:

/home/rss161030/hs_err_pid31121.log

Please let me know once the issue is resolved.

Regards,
Ram

@rss161030 Try now issue got resolved.

sample output
[rss161030@gw01 ~]$ hadoop fs -ls /
Found 12 items
drwxrwxrwx - yarn hadoop 0 2017-07-05 08:52 /app-logs
drwxr-xr-x - hdfs hdfs 0 2017-03-10 10:03 /apps
drwxr-xr-x - yarn hadoop 0 2016-11-14 19:03 /ats
drwxr-xr-x - hdfs hdfs 0 2016-11-14 19:03 /hdp