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

Webhcat show database error missing operand


hello guys,

so I was trying to connect hive metadata through webhcat. I started webhcat_server successfully.I first test the link:


It returns :


which is a success.Then I try


It gives me error

{"statement":"show databases like '*';","error":"unable to show databases for: *","exec":
	 "stderr":"which: no /opt/lib/hadoop/bin/hadoop in ((null))
	 dirname: missing operand
	 Try 'dirname --help' for more information.
	 /opt/lib/hadoop/bin/hadoop: line 26: /opt/lib/hive-hcatalog/sbin/../libexec/ No such file or directory
	 /opt/lib/hadoop/bin/hadoop: line 144: exec: : not found",

I did quite a research on Internet. some people run into the same problem but no one has an answer.

I can successfully start hcatalog server & webhcat server.

I notice that there is no under /hive-hcatalog/libexec...But should that be under /hadoop/libexec? Is there something wrong with script maybe?


Master Collaborator


Yes sir that won't work either. But I move on to this question because I found out that in higher version Vertica (8+) you can directly create external table mapping partitions on HDFS. So no Hcatalog needed anymore. Thanks!


@Jesse zhao

Not sure which HDP/Hive version you are working with, looks like its looking for the binary in this location /opt/lib/hadoop/bin/hadoop , can you tell us why its looking for the binaries there ?

If you are using ambari, then can you ensure that hive-env contains all the binaries and also, in ambari, templeton.hadoop contains the location of binaries, can you check where its pointing ?

; ;