Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mysql 错误:在主节点上运行sqoop导入命令时_Mysql_Hadoop - Fatal编程技术网

Mysql 错误:在主节点上运行sqoop导入命令时

Mysql 错误:在主节点上运行sqoop导入命令时,mysql,hadoop,Mysql,Hadoop,我已经配置了hadoop多节点集群。当我试图在主节点中使用sqoop将表从mysql数据库导入配置单元时,它抛出以下错误 sqoop import --connect jdbc:mysql://master:3306/mysql --username root --password admin --table payment --hive-import -- --null-string '\\N' \ --null-non-string '\\N' 警告:/usr/lib/hcatalog不

我已经配置了hadoop多节点集群。当我试图在主节点中使用sqoop将表从mysql数据库导入配置单元时,它抛出以下错误

sqoop import --connect jdbc:mysql://master:3306/mysql --username root --password admin --table payment  --hive-import -- --null-string '\\N' \ --null-non-string '\\N'
警告:/usr/lib/hcatalog不存在!HCatalog作业将失败

Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: $HADOOP_HOME is deprecated.

14/04/14 16:17:32 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
14/04/14 16:17:32 INFO tool.BaseSqoopTool: Using Hive-specific delimiters for output. You can override
14/04/14 16:17:32 INFO tool.BaseSqoopTool: delimiters with --fields-terminated-by, etc.
14/04/14 16:17:32 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
14/04/14 16:17:32 INFO tool.CodeGenTool: Beginning code generation
14/04/14 16:17:33 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `payment` AS t LIMIT 1
14/04/14 16:17:33 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM `payment` AS t LIMIT 1
14/04/14 16:17:33 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /usr/local/hadoop
Note: /tmp/sqoop-hduser/compile/e31d2917f0d797c58258a17ed005633c/payment.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
14/04/14 16:17:35 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-hduser/compile/e31d2917f0d797c58258a17ed005633c/payment.jar
14/04/14 16:17:35 WARN manager.MySQLManager: It looks like you are importing from mysql.
14/04/14 16:17:35 WARN manager.MySQLManager: This transfer can be faster! Use the --direct
14/04/14 16:17:35 WARN manager.MySQLManager: option to exercise a MySQL-specific fast path.
14/04/14 16:17:35 INFO manager.MySQLManager: Setting zero DATETIME behavior to convertToNull (mysql)
14/04/14 16:17:35 INFO mapreduce.ImportJobBase: Beginning import of payment
14/04/14 16:17:36 INFO ipc.Client: Retrying connect to server: master/10.10.3.74:54311. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
14/04/14 16:17:37 INFO ipc.Client: Retrying connect to server: master/10.10.3.74:54311. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
14/04/14 16:17:38 INFO ipc.Client: Retrying connect to server: master/10.10.3.74:54311. Already tried 2 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
14/04/14 16:17:39 INFO ipc.Client: Retrying connect to server: master/10.10.3.74:54311. Already tried 3 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
14/04/14 16:17:41 INFO ipc.Client: Retrying connect to server: master/10.10.3.74:54311. Already tried 4 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
14/04/14 16:17:42 INFO ipc.Client: Retrying connect to server: master/10.10.3.74:54311. Already tried 5 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
14/04/14 16:17:43 INFO ipc.Client: Retrying connect to server: master/10.10.3.74:54311. Already tried 6 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
14/04/14 16:17:44 INFO ipc.Client: Retrying connect to server: master/10.10.3.74:54311. Already tried 7 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
14/04/14 16:17:45 INFO ipc.Client: Retrying connect to server: master/10.10.3.74:54311. Already tried 8 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
14/04/14 16:17:46 INFO ipc.Client: Retrying connect to server: master/10.10.3.74:54311. Already tried 9 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1 SECONDS)
14/04/14 16:17:46 **ERROR security.UserGroupInformation: PriviledgedActionException as:hduser cause:java.net.ConnectException: Call to master/10.10.3.74:54311 failed on connection exception: java.net.ConnectException: Connection refused**
14/04/14 16:17:46 ERROR tool.ImportTool: Encountered IOException running import job: java.net.ConnectException: Call to master/10.10.3.74:54311 failed on connection exception: java.net.ConnectException: Connection refused
    at org.apache.hadoop.ipc.Client.wrapException(Client.java:1142)
    at org.apache.hadoop.ipc.Client.call(Client.java:1118)
    at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:229)
    at org.apache.hadoop.mapred.$Proxy1.getProtocolVersion(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:622)
    at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:85)
    at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:62)
    at org.apache.hadoop.mapred.$Proxy1.getProtocolVersion(Unknown Source)
    at org.apache.hadoop.ipc.RPC.checkVersion(RPC.java:422)
    at org.apache.hadoop.mapred.JobClient.createProxy(JobClient.java:559)
    at org.apache.hadoop.mapred.JobClient.init(JobClient.java:498)
    at org.apache.hadoop.mapred.JobClient.<init>(JobClient.java:479)
    at org.apache.hadoop.mapreduce.Job$1.run(Job.java:563)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:416)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1190)
    at org.apache.hadoop.mapreduce.Job.connect(Job.java:561)
    at org.apache.hadoop.mapreduce.Job.submit(Job.java:549)
    at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:580)
    at org.apache.sqoop.mapreduce.ImportJobBase.doSubmitJob(ImportJobBase.java:186)
    at org.apache.sqoop.mapreduce.ImportJobBase.runJob(ImportJobBase.java:159)
    at org.apache.sqoop.mapreduce.ImportJobBase.runImport(ImportJobBase.java:239)
    at org.apache.sqoop.manager.SqlManager.importTable(SqlManager.java:600)
    at org.apache.sqoop.manager.MySQLManager.importTable(MySQLManager.java:118)
    at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:413)
    at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:502)
    at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
    at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
    at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
    at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220)
    at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
    at org.apache.sqoop.Sqoop.main(Sqoop.java:238)
Caused by: java.net.ConnectException: Connection refused
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:601)
    at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
    at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:511)
    at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:481)
    at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:457)
    at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:583)
    at org.apache.hadoop.ipc.Client$Connection.access$2200(Client.java:205)
    at org.apache.hadoop.ipc.Client.getConnection(Client.java:1249)
    at org.apache.hadoop.ipc.Client.call(Client.java:1093)
    ... 33 more
请帮助我。让我知道,想要更多的信息


提前感谢。

您不应该在命令行中提供密码,请在没有密码的情况下尝试。

这是一个注释,而不是解决方案。
versions of technologies
========== ===============
hadoop-1.2.1
Hive-0.11
sqoop-1.4.4