Not able to run sqoop giving permission error under the folder /tmp/sqoop-satycse06/compile

Hi Team,
I am not able run any command of sqoop. I getting the below error

sqoop eval --connect “jdbc:mysql://nn01.itversity.com:3306/retail_db” --username retail_dba --password itversity --query “select
count(*) from departments”;

Warning: /usr/hdp/2.5.0.0-1245/accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
Exception in thread “main” java.lang.RuntimeException: Could not create temporary directory: /tmp/sqoop-satycse06/compile/e0b5f56e5959b3533b4242dda1a
caf7a; check for a directory permissions issue on /tmp.

Still getting the same issue. It’s pointing toward /tmp path only.

sqoop eval --connect “jdbc:mysql://nn01.itversity.com:3306/retail_db” \ --username retail_dba \ --password itversity \ --query “s
elecr count (*) from orders” \ --target-dir /user/satycse06/compile/
Warning: /usr/hdp/2.5.0.0-1245/accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
Exception in thread “main” java.lang.RuntimeException: Could not create temporary directory: /tmp/sqoop-satycse06/compile/68d6c184ca5f56d3a22f775d5f1
a0ff2; check for a directory permissions issue on /tmp.

can anyone reply on this issue?

Hi Team,
Could you please suggest on this issue how to fix it.
As I am not able to use the sqoop utility.
I ran this with and without target directory also but got the same error.

sqoop eval --connect “jdbc:mysql://nn01.itversity.com:3306/retail_db” --username retail_dba --password itversity --query “select
count(*) from orders” \ --target-dir /user/satycse06/
Warning: /usr/hdp/2.5.0.0-1245/accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
Exception in thread “main” java.lang.RuntimeException: Could not create temporary directory: /tmp/sqoop-satycse06/compile/c88a2e9ade348482b76badc5cf5
80941; check for a directory permissions issue on /tmp.

I am not able to use even import and export also using sqoop giving same permission error.
I have raised this issue with @itversity before 3 days and still not getting any response.
How i can use the lab for sqoop practise and others if an issue will not resolve for such a long period.

I used the soop command with --target-dir and without --target-dir also but got the same error.

sqoop import --connect jdbc:mysql://nn01.itversity.com/retail_db --table customers --num-mappers 2
Warning: /usr/hdp/2.5.0.0-1245/accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
Exception in thread “main” java.lang.RuntimeException: Could not create temporary directory: /tmp/sqoop-satycse06/compile/e59350a28a9c09d4dd6aff233b2
752e6; check for a directory permissions issue on /tmp.
at org.apache.sqoop.SqoopOptions.getNonceJarDir(SqoopOptions.java:909)
at org.apache.sqoop.SqoopOptions.initDefaults(SqoopOptions.java:979)
at org.apache.sqoop.SqoopOptions.(SqoopOptions.java:376)
at com.cloudera.sqoop.SqoopOptions.(SqoopOptions.java:77)
at org.apache.sqoop.Sqoop.(Sqoop.java:85)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:224)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234)
at org.apache.sqoop.Sqoop.main(Sqoop.java:243)
[satycse06@gw01 ~]$ sqoop import --connect jdbc:mysql://nn01.itversity.com/retail_db --table customers --num-mappers 2 -target-dir /user/satycse06/
Warning: /usr/hdp/2.5.0.0-1245/accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
Exception in thread “main” java.lang.RuntimeException: Could not create temporary directory: /tmp/sqoop-satycse06/compile/e5e81817e81d81bac30138d9639
270d7; check for a directory permissions issue on /tmp.

Hi Satya,

Try using the query listed below.

While using --query option
You need to specify
1)where $CONDITION
2)need to specify no of mappers(or)–split-by

sqoop import --connect “jdbc:mysql://nn01.itversity.com:3306/retail_db”
–username retail_dba --password itversity --query “select * from
departments where $CONDITIONS” -m 1 --target-dir /user/abhishek4/temp.It may help you

@Abhishek @itversity @viswanath.raju
I have tried again as per your suggestion but this time I am getting $ACCUMULO_HOME error.
Kindly request you to fix this issue as i am struggling from last 5 days to practise sqoop but not able to do.

sqoop --import --connect “jdbc:mysql://nn01.itversity.com:3306/retail_db” --username retail_dba --password itversity --query “sel
ect * from departments” -m 1 --target-dir /user/satycse06/tmp
Warning: /usr/hdp/2.5.0.0-1245/accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
No such sqoop tool: --import. See ‘sqoop help’.
[satycse06@gw01 ~]$ sqoop --import --connect “jdbc:mysql://nn01.itversity.com:3306/retail_db” --username retail_dba --password itversity --query “sel
ect * from departments” where department_id = 2 -m 1 --target-dir /user/satycse06/tmp
Warning: /usr/hdp/2.5.0.0-1245/accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
No such sqoop tool: --import

It is sqoop-import or sqoop import not sqoop --import

@itversity @viswanath.raju
I got the same error even i ran through sqoop import or sqoop-import.
I don’t think this error is related with this one.I have tried so many times with so many different approach.
so first check from your side whether this is permission or environment related issue.

sqoop import --connect “jdbc:mysql://nn01.itversity.com:3306/retail_db” --username retail_dba --password itversity --query “selec
t * from departments” where department_id = 2 -m 1 --target-dir /user/satycse06/tmp
Warning: /usr/hdp/2.5.0.0-1245/accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
Exception in thread “main” java.lang.RuntimeException: Could not create temporary directory: /tmp/sqoop-satycse06/compile/ff3c1a46b4aace95b313329ee07
70d03; check for a directory permissions issue on /tmp.
at org.apache.sqoop.SqoopOptions.getNonceJarDir(SqoopOptions.java:909)
at org.apache.sqoop.SqoopOptions.initDefaults(SqoopOptions.java:979)
at org.apache.sqoop.SqoopOptions.(SqoopOptions.java:376)
at com.cloudera.sqoop.SqoopOptions.(SqoopOptions.java:77)
at org.apache.sqoop.Sqoop.(Sqoop.java:85)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:224)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234)
at org.apache.sqoop.Sqoop.main(Sqoop.java:243)
[satycse06@gw01 ~]$ sqoop eval --connect “jdbc:mysql://nn01.itversity.com:3306/retail_db” --username retail_dba --password itversity --query "select

  • from departments" where department_id = 2 -m 1 --target-dir /user/satycse06/tmp
    Warning: /usr/hdp/2.5.0.0-1245/accumulo does not exist! Accumulo imports will fail.
    Please set $ACCUMULO_HOME to the root of your Accumulo installation.

@itversity
could you please look into this issue.
so that i can use the sqoop.

@itversity - Below folder access is similar like my id, I didn’t face this problem “check for a directory permissions issue on /tmp”

How to resolve this for satycse06 id?

satycse06@gw01 /]$ ls -ltr /tmp/sqoop-satycse06
total 4
drwxr-xr-x 2 1983 students 4096 Jan 14 04:06 compile

Below code working fine for me, but its giving permission issue for satycse06

sqoop import --connect “jdbc:mysql://nn01.itversity.com:3306/retail_db”
–username retail_dba
–password itversity
–table departments
–where “department_id = 2”
-m 1
–target-dir /user/gnanaprakasam/tmp

@itversity
Could you please solve this issue.?? @viswanath.raju

@itversity @Itversity123
Why you people are not replying. I am facing this issue from last 10 to 12 days and still, there is no solution given from your side.
Please fix it. I have subscribed the lab for 3 months and from last 15 days, i stuck with this issue.
How I will do the practice?

Please check now. This should be resolved.

@perraju
Yes, Now it’s working thanks a lot!!.
So what was the issue? one humble request to @itversity Please try to resolve the issue as earliest possible.I have waited more than 15 days to get the resolution of this issue.

Sorry for the delay. We will make sure to get the issues resolved quickly.

@satya_prakash_gaurav, sorry for the delay. We have added one more month for the subscription. We are not monitoring this category. Any lab related issues, please log in bigdata-labs category going forward for immediate attention.