mysql之sqoop 1.99.5 安装错误之无法访问 mysql 5.6 的 JDBC 连接器(在 Ubuntu 节点上运行的 hadoop 2.4.1 集群)

EasonJim 阅读:173 2023-08-24 23:31:47 评论:0

在其中一个从属节点上安装了 sqoop 服务器(在所有 ubunutu 14 节点上运行的 hadoop 2.4.1 集群), sqoop2-tool verify 返回以下错误,(也尝试将 mysql-connector-java-5.1.34-bin.jar 放入/usr/lib/sqoop/server/lib ,/usr/lib/sqoop/lib/(创建了这个文件夹)和/var/lib/sqoop ,没有任何作用)

sqoop2-tool verify 
Sqoop home directory: /usr/lib/sqoop 
Setting SQOOP_HTTP_PORT:     12000 
Setting SQOOP_ADMIN_PORT:     12001 
Using   CATALINA_OPTS:        
Adding to CATALINA_OPTS:    -Dsqoop.http.port=12000 -Dsqoop.admin.port=12001 
Mar 14, 2015 11:02:53 PM org.apache.catalina.startup.ClassLoaderFactory validateFile 
WARNING: Problem with directory [/usr/lib/sqoop/lib], exists: [false], isDirectory: [false], canRead: [false] 
Sqoop tool executor: 
    Version: 1.99.5 
    Revision: 9665c01f674d69d41a6fcfffb2c0b94590f70f59 
    Compiled on Wed Feb 18 09:42:27 PST 2015 by vbasavaraj 
Running tool: class org.apache.sqoop.tools.tool.VerifyTool 
2015-03-14 23:02:54,477 INFO  [main] core.SqoopServer (SqoopServer.java:initialize(51)) - Booting up Sqoop server 
2015-03-14 23:02:54,493 INFO  [main] core.PropertiesConfigurationProvider (PropertiesConfigurationProvider.java:initialize(96)) - Starting config file poller thread 
log4j: Parsing for [root] with value=[WARN, file]. 
log4j: Level token is [WARN]. 
log4j: Category root set to WARN 
log4j: Parsing appender named "file". 
log4j: Parsing layout options for "file". 
log4j: Setting property [conversionPattern] to [%d{ISO8601} %-5p %c{2} [%l] %m%n]. 
log4j: End of parsing for "file". 
log4j: Setting property [file] to [@LOGDIR@/sqoop.log]. 
log4j: Setting property [maxBackupIndex] to [5]. 
log4j: Setting property [maxFileSize] to [25MB]. 
log4j: setFile called: @LOGDIR@/sqoop.log, true 
log4j: setFile ended 
log4j: Parsed "file" options. 
log4j: Parsing for [org.apache.sqoop] with value=[DEBUG]. 
log4j: Level token is [DEBUG]. 
log4j: Category org.apache.sqoop set to DEBUG 
log4j: Handling log4j.additivity.org.apache.sqoop=[null] 
log4j: Parsing for [org.apache.derby] with value=[INFO]. 
log4j: Level token is [INFO]. 
log4j: Category org.apache.derby set to INFO 
log4j: Handling log4j.additivity.org.apache.derby=[null] 
log4j: Finished configuring. 
log4j: Could not find root logger information. Is this OK? 
log4j: Parsing for [default] with value=[INFO,defaultAppender]. 
log4j: Level token is [INFO]. 
log4j: Category default set to INFO 
log4j: Parsing appender named "defaultAppender". 
log4j: Parsing layout options for "defaultAppender". 
log4j: Setting property [conversionPattern] to [%d %-5p %c: %m%n]. 
log4j: End of parsing for "defaultAppender". 
log4j: Setting property [file] to [@LOGDIR@/default.audit]. 
log4j: setFile called: @LOGDIR@/default.audit, true 
log4j: setFile ended 
log4j: Parsed "defaultAppender" options. 
log4j: Handling log4j.additivity.default=[null] 
log4j: Finished configuring. 
Exception in thread "PurgeThread" org.apache.sqoop.common.SqoopException: JDBCREPO_0009:Failed to finalize transaction 
    at org.apache.sqoop.repository.JdbcRepositoryTransaction.close(JdbcRepositoryTransaction.java:115) 
    at org.apache.sqoop.repository.JdbcRepository.doWithConnection(JdbcRepository.java:109) 
    at org.apache.sqoop.repository.JdbcRepository.doWithConnection(JdbcRepository.java:61) 
    at org.apache.sqoop.repository.JdbcRepository.purgeSubmissions(JdbcRepository.java:589) 
    at org.apache.sqoop.driver.JobManager$PurgeThread.run(JobManager.java:648) 
Caused by: java.sql.SQLNonTransientConnectionException: No current connection. 
    at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) 
    at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) 
    at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) 
    at org.apache.derby.impl.jdbc.Util.noCurrentConnection(Unknown Source) 
    at org.apache.derby.impl.jdbc.EmbedConnection.checkIfClosed(Unknown Source) 
    at org.apache.derby.impl.jdbc.EmbedConnection.setupContextStack(Unknown Source) 
    at org.apache.derby.impl.jdbc.EmbedConnection.commit(Unknown Source) 
    at org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:334) 
    at org.apache.commons.dbcp.DelegatingConnection.commit(DelegatingConnection.java:334) 
    at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.commit(PoolingDataSource.java:211) 
    at org.apache.sqoop.repository.JdbcRepositoryTransaction.close(JdbcRepositoryTransaction.java:112) 
    ... 4 more 
Caused by: java.sql.SQLException: No current connection. 
    at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) 
    at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) 
    ... 15 more 
Verification was successful. 
Tool class org.apache.sqoop.tools.tool.VerifyTool has finished correctly. 
hduser@slave:/usr/lib/sqoop/bin$ hadoop version 
Hadoop 2.4.1 
Subversion http://svn.apache.org/repos/asf/hadoop/common -r 1604318 
Compiled by jenkins on 2014-06-21T05:43Z 
Compiled with protoc 2.5.0 
From source with checksum bb7ac0a3c73dc131f4844b873c74b630 
This command was run using /usr/local/hadoop/share/hadoop/common/hadoop-common-2.4.1.jar 

请您参考如下方法:

这实际上与 derby 存储库有关。事实上,这个异常很可能不是问题。消息 Verification was successful. 表示该工具已正确完成。尝试通过 bin/sqoop.sh server start 启动 Sqoop2,并通过 bin/sqoop.sh client 将客户端连接到它。

通过 user@sqoop.apache.org 跟进社区.


标签:hadoop
声明

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

关注我们

一个IT知识分享的公众号