Support Questions

Find answers, ask questions, and share your expertise

Oozie + sqoop action fails when import records from mysql

avatar
Explorer

sqoop import --connect jdbc:mysql://mysqlhost:3306/demo --username demo --password 'ai2110!' --table calendar --target-dir /user/hue/tblew2211112 -m 1 --as-textfile

 

If you run the above command in a shell, it works normally.
However
hue => editor => when running in sqoop

 

The mysql ID and password are correct.

I am getting the following error:

>>> Invoking Sqoop command line now >>>

2022-10-21 08:09:12,719 [main] WARN  org.apache.sqoop.tool.SqoopTool  - $SQOOP_CONF_DIR has not been set in the environment. Cannot check for additional configuration.
2022-10-21 08:09:12,758 [main] INFO  org.apache.sqoop.Sqoop  - Running Sqoop version: 1.4.7
2022-10-21 08:09:12,771 [main] WARN  org.apache.sqoop.tool.BaseSqoopTool  - Setting your password on the command-line is insecure. Consider using -P instead.
2022-10-21 08:09:12,781 [main] WARN  org.apache.sqoop.ConnFactory  - $SQOOP_CONF_DIR has not been set in the environment. Cannot check for additional configuration.
2022-10-21 08:09:12,826 [main] INFO  org.apache.sqoop.manager.MySQLManager  - Preparing to use a MySQL streaming resultset.
2022-10-21 08:09:12,826 [main] INFO  org.apache.sqoop.tool.CodeGenTool  - Beginning code generation
2022-10-21 08:09:13,084 [main] ERROR org.apache.sqoop.manager.SqlManager  - Error executing statement: java.sql.SQLException: Access denied for user 'demo'@'152.30.119.754' (using password: YES)
java.sql.SQLException: Access denied for user 'demo'@'152.30.119.754' (using password: YES)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3976)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3912)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:871)
    at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1714)
    at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1224)
    at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2190)
    at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2221)
    at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2016)
    at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:776)
    at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)

 

 

1 REPLY 1

avatar

@yoiun Going to go out on a ledge here:  It seems like the the sqoop command and hue/sqoop command are executed on different hosts.  Does the new host have permissions to mysql?   This error here:

Access denied for user 'demo'@'152.30.119.754'

leads me to believe it does not.