Support Questions
Find answers, ask questions, and share your expertise

CDH / hive install issues...

New Contributor

 Hi All,

I just installed the CM/CDH on 4 nodes VM server, with "All Services".

No health issues.

Everything is good -except this annoying messages when invoking hive.





$ hive
/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/bin/../lib/hive/conf/ line 24: /opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hbase/hbase-hadoop2-compat.jar: Permission denied
/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/bin/../lib/hive/conf/ line 25: /opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hbase/lib/htrace-core.jar: Permission denied
/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/bin/../lib/hive/conf/ line 26: /opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hbase/hbase-client.jar: Permission denied
/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/bin/../lib/hive/conf/ line 27: /opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hbase/hbase-server.jar: Permission denied
/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/bin/../lib/hive/conf/ line 28: /opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hbase/hbase-hadoop-compat.jar: Permission denied
/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/bin/../lib/hive/conf/ line 29: /opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/lib/hbase/hbase-common.jar: Permission denied
WARNING: Use "yarn jar" to launch YARN applications.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/jars/log4j-slf4j-impl-2.8.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/jars/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]

Logging initialized using configuration in jar:file:/opt/cloudera/parcels/CDH-6.3.2-1.cdh6.3.2.p0.1605554/jars/hive-common-2.1.1-cdh6.3.2.jar!/ Async: false

WARNING: Hive CLI is deprecated and migration to Beeline is recommended.





What should I do to eliminate these errors?





@CloudEraLong I am assuming that you are using Ubuntu OS. This is a known issue where the problem seems to be the version of "sed" running on the machine.


Can you please try making following change

1. Open /opt/cloudera/cm-agent/service/common/ and search for function replace_hive_hbase_jars_template.
2. Here you will notice "HBASE_JAR=$(sed "s: :,:g" <<< ..... " it is this command that appends the hbase jars to the classpath. It looks like on ubuntu 18 this command in not replacing whitespaces with ",". You can experiment. On the terminal itself try running "sed "s: :,:g" <<< $(printf "a\nb\nc\n")  "  You will notice that it is not replacing new line with "," .
3. I don't know much about bash/shell scripting but one command that I tried and seems to be working is " tr '\n' ',' <<< $(printf "a\nb\nc\n")  ".
4. Try this and see this works.
Once you have the right command. Simply redeploy client config on each host.

The issue came form the upstream HADOOP-16167 .




Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
; ;