I've noticed weird behaviour while working with hcat on CentOS 7. As an example, a simple command to test connection

hcat -e "show databases"

returns errors while running from home (~/) directory, while it is successful when running from any other directory.

whereis hcat returns a single location of /usr/bin/hcat.

Question: how to debug this?

I'm not experienced much on unix, but I'm guessing that something might be interfering with bash, though .bashrc and .bash_profile seem to be clean. Additionally, it works fine for other users. Also, same behaviour is seen when running with sudo rights, so it shouldn't be a permission issue?

  • What errors are you getting? – schaiba Jun 23 '17 at 14:26
  • @schaiba FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Got exception: org.apache.thrift.transport.TTransportException null). Also, the usual messages of Hive.Config doesn't appear at start, suggesting that it fails fetching config files before start. I could edit the question with the full trace, but I'm not sure it will be of much use if it's due to missing config? – Nutle Jun 23 '17 at 14:29
  • 1
    I'm not familiar with this tool but I suspect you have a configuration file in your home that is read by hcat. You cat try to use strace -e open hcat -e "show databases" to print what files has been tried to access by a command. – Kalavan Jun 23 '17 at 14:51
  • @Kalavan thanks, really useful tool. Played around with it, but the files accessed were the same in both cases, so I guess the problem is somewhere deeper. – Nutle Jun 26 '17 at 7:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.