Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

When using hive import through sqoop, sometimes I get this error: error=13, Permission denied

Highlighted

When using hive import through sqoop, sometimes I get this error: error=13, Permission denied

New Contributor

Using oozie workflow, sqoop action, I am trying to import a table from SQL Server to Hive with sqoop using hive-import, sometimes it works fine, but randomly it fails with this error:

ERROR [main] tool.ImportTool (ImportTool.java:run(613)) - Encountered IOException running import job: java.io.IOException: Cannot run program "hive": error=13, Permission denied

My HDP version is 2.3.4, Ambari: 2.2.0, Hive: 1.2.1, and here is my command:

import --connect "jdbc:sqlserver://x.x.x.x:1433;database=ABC;username=xxx;password=xxx" --table xxx --split-by xxx --hive-import --hive-overwrite --hive-drop-import-delims --fields-terminated-by "|" -- --schema dbo

Any help is apprecited.

6 REPLIES 6
Highlighted

Re: When using hive import through sqoop, sometimes I get this error: error=13, Permission denied

Contributor

PLease check if setting the sqoop parameter --hive-home parameter explicitly helps.

Highlighted

Re: When using hive import through sqoop, sometimes I get this error: error=13, Permission denied

New Contributor

I am kind of new to this. Where/how do I find hive-home directory?

Highlighted

Re: When using hive import through sqoop, sometimes I get this error: error=13, Permission denied

New Contributor

@pbalasundaram

I added a parameter to the sqoop command as --hive-home "/usr/hdp/2.3.4.0-3485/hive", and ran it 5 times. It was successful 4 times and still failed once.

Highlighted

Re: When using hive import through sqoop, sometimes I get this error: error=13, Permission denied

Super Guru

@Cyrus Leghvan

Looks like all your node-managers are not pointing to current version of HDP

Please run below command on all the nodemanagers and see if you are getting same result, if not then you need to modify symlink from /usr/hdp/current/hive-client to /usr/hdp/<current-hdp-version>/hive

ls -lrt /usr/hdp/current/|grep hive-client

Sample output

[root@sandbox ~]# ls -lrt /usr/hdp/current/|grep hive-client
lrwxrwxrwx 1 root root 26 2016-04-11 17:43 hive-client -> /usr/hdp/2.3.2.0-2950/hive
Highlighted

Re: When using hive import through sqoop, sometimes I get this error: error=13, Permission denied

New Contributor

@Kuldeep Kulkarni

I ran it on all nodes and getting the same result.

Highlighted

Re: When using hive import through sqoop, sometimes I get this error: error=13, Permission denied

New Contributor

Help is needed please, anyone?

Don't have an account?
Coming from Hortonworks? Activate your account here