hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lauren Yang <>
Subject RE: hive-site.xml not found on classpath
Date Fri, 30 Nov 2012 18:46:45 GMT
You can see if the classpath is being passed correctly to hadoop by putting in an echo statement
around line 150 of the hive cli script where it passes the CLASSPATH variable to HADOOP_CLASSPATH.
# pass classpath to hadoop

You could also echo the classpath in the hadoop script (in your HADOOP_HOME\bin directory)
to see if the classpath is being passed correctly to the time when the cli jar is invoked.

As far as the logs location, if this is not set in your hive-site.xml, you can set it by passing
 in HIVE_OPTS when you invoke the command line.

Like so:
EXPORT HIVE_OPTS= -hiveconf hive.log.dir=$ HIVE_HOME\logs"
Then run "hive"

Run "hive --hiveconf hive.log.dir=$ HIVE_HOME\logs"


From: Stephen Boesch []
Sent: Friday, November 30, 2012 12:16 AM
Subject: Re: hive-site.xml not found on classpath

running 0.9.0 (you can see it from the classpath shown below);

steve@mithril:/shared/cdh4$ echo $HIVE_CONF_DIR
steve@mithril:/shared/cdh4$ ls -l $HIVE_CONF_DIR
total 152
-rw-r--r-- 1 steve steve 46053 2011-12-13 00:36 hive-default.xml.template
-rw-r--r-- 1 steve steve  1615 2012-11-13 23:37<>
-rw-r--r-- 1 steve steve  1671 2012-11-28 01:43
-rw-r--r-- 1 steve steve  1593 2011-12-13 00:36
-rw-r--r-- 1 steve steve  1637 2011-12-13 00:36
-rw-r--r-- 1 root  root   2056 2012-11-28 01:38
-rw-r--r-- 1 steve steve  2056 2012-03-25 12:49
-rw-r--r-- 1 steve steve  4415 2012-11-25 23:02 hive-site.xml
steve@mithril:/shared/cdh4$ echo $HIVE_HOME
steve@mithril:/shared/cdh4$ echo $(which hive)

also you can see the hive/conf is the first entry

After adding the debug statement:


But even so:

  *   the log dir is still wrong (writing to /tmp/${user}/hive.log instead of $HIVE_HOME/logs)
  *   the following message in the log file
2012-11-30 00:12:31,775 WARN  conf.HiveConf (<clinit>(70)) - hive-site.xml
not found on CLASSPATH

2012/11/30 Bing Li <<>>
which version of hive do you use?

Could you try to add the following debug line in bin/hive before hive real executes, and see
the result?


if [ "$TORUN" = "" ]; then
   echo "Service $SERVICE not found"
   echo "Available Services: $SERVICE_LIST"
   exit 7
   $TORUN "$@"

The version I used is 0.9.0

2012/11/30 Stephen Boesch <<>>
Yes i do mean the log is in the wrong location, since it was set to a persistent path in the

None of the files in that directory appear to be picked up properly: neither the hive-site.xml

I have put echo statements into the 'hive" and the  shell scripts and the echo
statements prove that  HIVE_CONF_DIR is set properly:  /shared/hive/conf

But even so the following problems occur:

  *   the message "hive-site.xml is not found in the classpath"
  *   none of the hive-site.xml values are taking properly
  *   the in that same directory is not taking effect.

2012/11/29 Bing Li <<>>
Hi, Stephen
what did you mean the "wrong place under /tmp" in
"I am seeing the following message in the logs (which are in the wrong place under /tmp..)"

Did you mean that you set a different log dir but it didn't work?

the log dir should be set in conf/, conf/
and you can try to reset HIVE_CONF_DIR in conf/ with 'export" command.

- Bing

2012/11/30 Stephen Boesch <<>>
thought i mentioned in the posts those were already set and verified.. but yes in any case
that's first thing looked at.

steve@mithril:~$ echo $HIVE_CONF_DIR
steve@mithril:~$ echo $HIVE_HOME

2012/11/29<> <<>>

Have you tried setting HIVE_HOME and HIVE_CONF_DIR?

On Thu, Nov 29, 2012 at 2:46 PM, Stephen Boesch <<>>

2012/11/29 Shreepadma Venugopalan <<>>
Are you seeing this message when your bring up the standalone hive cli by running 'hive'?

On Thu, Nov 29, 2012 at 12:56 AM, Stephen Boesch <<>>
i am running under user steve.  the latest log (where this shows up ) is  /tmp/steve/hive.log

2012/11/29 Viral Bajaria <<>>
You are seeing this error when you run the hive cli or in the tasktracker logs when you run
a query ?

On Thu, Nov 29, 2012 at 12:42 AM, Stephen Boesch <<>>

I am seeing the following message in the logs (which are in the wrong place under /tmp..)

hive-site.xml not found on classpath

My hive-site.xml is under the standard location  $HIVE_HOME/conf so this should not happen.

Now some posts have talked that the HADOOP_CLASSPATH was mangled.  Mine is not..

So what is the underlying issue here?




View raw message