0

我从 Cloudera tarball 安装了 sqoop2。我能够安装 sqoop2 服务器和客户端。

安装后,"http://localhost:12000"地址给出的结果包含一个字符串“Apache Sqoop ROOT”。我从这个字符串中了解到服务器正在运行,但是当我请求 它时"http://localhost:12000/sqoop/version"它给出:

HTTP 状态 404

当我显示版本时,在客户端外壳中 –all

我收到这条消息

处理命令期间发生异常异常:com.sun.jersey.api.client.UniformInterfaceException 消息:GEThttp://172.20.104.226:12000/sqoop/version返回响应状态为 404 Not Found

sqoop.log

2013-10-22 09:53:02,767 INFO repository.JdbcRepositoryProvider [org.apache.sqoop.repository.JdbcRepositoryProvider.initialize(JdbcRepositoryProvider.java:67)] JdbcRepository initialized. 2013-10-22 09:53:02,767 INFO repository.RepositoryManager [org.apache.sqoop.repository.RepositoryManager.initialize(RepositoryManager.java:118)] Creating or upgrading on disk structures if necessary 2013-10-22 09:53:03,543 DEBUG repository.JdbcRepositoryTransaction [org.apache.sqoop.repository.JdbcRepositoryTransaction.begin(JdbcRepositoryTransaction.java:73)] Tx count-begin: 1, rollback: false 2013-10-22 09:53:03,543 INFO repository.JdbcRepository 2013-10-22 09:53:04,136 INFO mapreduce.MapreduceSubmissionEngine [org.apache.sqoop.submission.mapreduce.MapreduceSubmissionEngine.initialize(MapreduceSubmissionEngine.java:100)] Found hadoop configuration file core-site.xml 2013-10-22 09:53:04,168 INFO core.SqoopServer [org.apache.sqoop.core.SqoopServer.destroy(SqoopServer.java:35)] Shutting down Sqoop server

卡塔利娜原木

`22 Oct, 2013 3:51:43 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/lib/sqoop/lib], exists: [false], isDirectory: [false], canRead: [false]
22 Oct, 2013 3:51:44 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/jdk1.6.0_37/jre/lib/amd64/server:/usr/lib/jvm/jdk1.6.0_37/jre/lib/amd64:/usr/lib/jvm/jdk1.6.0_37/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
22 Oct, 2013 3:51:44 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-12000
22 Oct, 2013 3:51:44 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 370 ms
22 Oct, 2013 3:51:44 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
22 Oct, 2013 3:51:44 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.36
22 Oct, 2013 3:51:44 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive sqoop.war
22 Oct, 2013 3:51:45 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
22 Oct, 2013 3:51:45 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/sqoop] startup failed due to previous errors
22 Oct, 2013 3:51:45 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/sqoop] registered the JDBC driver [org.apache.derby.jdbc.AutoloadedDriver40] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
22 Oct, 2013 3:51:45 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/sqoop] appears to have started a thread named [sqoop-config-file-poller] but has failed to stop it. This is very likely to create a memory leak.
22 Oct, 2013 3:51:45 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/sqoop] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@31a734ff]) and a value of type [org.apache.derby.iapi.services.context.ContextManager] (value [org.apache.derby.iapi.services.context.ContextManager@20d12eea]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
22 Oct, 2013 3:51:45 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/sqoop] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@31a734ff]) and a value of type [org.apache.derby.iapi.services.context.ContextManager] (value [org.apache.derby.iapi.services.context.ContextManager@221f7708]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
22 Oct, 2013 3:51:45 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
22 Oct, 2013 3:51:46 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-12000
22 Oct, 2013 3:51:46 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1762 ms
22 Oct, 2013 3:53:20 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-12000
22 Oct, 2013 3:53:21 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
22 Oct, 2013 3:53:21 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-12000
22 Oct, 2013 3:53:22 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/lib/sqoop/lib], exists: [false], isDirectory: [false], canRead: [false]
22 Oct, 2013 3:53:22 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/jdk1.6.0_37/jre/lib/amd64/server:/usr/lib/jvm/jdk1.6.0_37/jre/lib/amd64:/usr/lib/jvm/jdk1.6.0_37/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
22 Oct, 2013 3:53:23 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-12000
22 Oct, 2013 3:53:23 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 367 ms
22 Oct, 2013 3:53:23 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
22 Oct, 2013 3:53:23 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.36
22 Oct, 2013 3:53:23 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive sqoop.war
22 Oct, 2013 3:53:24 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
22 Oct, 2013 3:53:24 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/sqoop] startup failed due to previous errors
22 Oct, 2013 3:53:24 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/sqoop] registered the JDBC driver [org.apache.derby.jdbc.AutoloadedDriver40] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
22 Oct, 2013 3:53:24 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/sqoop] appears to have started a thread named [sqoop-config-file-poller] but has failed to stop it. This is very likely to create a memory leak.
22 Oct, 2013 3:53:24 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/sqoop] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6bf51e5c]) and a value of type [org.apache.derby.iapi.services.context.ContextManager] (value [org.apache.derby.iapi.services.context.ContextManager@7e0b6ef8]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
22 Oct, 2013 3:53:24 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/sqoop] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6bf51e5c]) and a value of type [org.apache.derby.iapi.services.context.ContextManager] (value [org.apache.derby.iapi.services.context.ContextManager@259a8416]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
22 Oct, 2013 3:53:25 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
22 Oct, 2013 3:53:25 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-12000
22 Oct, 2013 3:53:25 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2081 ms`

`22 Oct, 2013 3:51:43 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/lib/sqoop/lib], exists: [false], isDirectory: [false], canRead: [false]
22 Oct, 2013 3:51:44 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/jdk1.6.0_37/jre/lib/amd64/server:/usr/lib/jvm/jdk1.6.0_37/jre/lib/amd64:/usr/lib/jvm/jdk1.6.0_37/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
22 Oct, 2013 3:51:44 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-12000
22 Oct, 2013 3:51:44 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 370 ms
22 Oct, 2013 3:51:44 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
22 Oct, 2013 3:51:44 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.36
22 Oct, 2013 3:51:44 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive sqoop.war
22 Oct, 2013 3:51:45 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
22 Oct, 2013 3:51:45 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/sqoop] startup failed due to previous errors
22 Oct, 2013 3:51:45 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/sqoop] registered the JDBC driver [org.apache.derby.jdbc.AutoloadedDriver40] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
22 Oct, 2013 3:51:45 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/sqoop] appears to have started a thread named [sqoop-config-file-poller] but has failed to stop it. This is very likely to create a memory leak.
22 Oct, 2013 3:51:45 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/sqoop] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@31a734ff]) and a value of type [org.apache.derby.iapi.services.context.ContextManager] (value [org.apache.derby.iapi.services.context.ContextManager@20d12eea]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
22 Oct, 2013 3:51:45 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/sqoop] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@31a734ff]) and a value of type [org.apache.derby.iapi.services.context.ContextManager] (value [org.apache.derby.iapi.services.context.ContextManager@221f7708]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
22 Oct, 2013 3:51:45 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
22 Oct, 2013 3:51:46 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-12000
22 Oct, 2013 3:51:46 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1762 ms
22 Oct, 2013 3:53:20 PM org.apache.coyote.http11.Http11Protocol pause
INFO: Pausing Coyote HTTP/1.1 on http-12000
22 Oct, 2013 3:53:21 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
22 Oct, 2013 3:53:21 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-12000
22 Oct, 2013 3:53:22 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/lib/sqoop/lib], exists: [false], isDirectory: [false], canRead: [false]
22 Oct, 2013 3:53:22 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/jdk1.6.0_37/jre/lib/amd64/server:/usr/lib/jvm/jdk1.6.0_37/jre/lib/amd64:/usr/lib/jvm/jdk1.6.0_37/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
22 Oct, 2013 3:53:23 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-12000
22 Oct, 2013 3:53:23 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 367 ms
22 Oct, 2013 3:53:23 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
22 Oct, 2013 3:53:23 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.36
22 Oct, 2013 3:53:23 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive sqoop.war
22 Oct, 2013 3:53:24 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
22 Oct, 2013 3:53:24 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/sqoop] startup failed due to previous errors
22 Oct, 2013 3:53:24 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/sqoop] registered the JDBC driver [org.apache.derby.jdbc.AutoloadedDriver40] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
22 Oct, 2013 3:53:24 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/sqoop] appears to have started a thread named [sqoop-config-file-poller] but has failed to stop it. This is very likely to create a memory leak.
22 Oct, 2013 3:53:24 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/sqoop] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6bf51e5c]) and a value of type [org.apache.derby.iapi.services.context.ContextManager] (value [org.apache.derby.iapi.services.context.ContextManager@7e0b6ef8]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
22 Oct, 2013 3:53:24 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/sqoop] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@6bf51e5c]) and a value of type [org.apache.derby.iapi.services.context.ContextManager] (value [org.apache.derby.iapi.services.context.ContextManager@259a8416]) but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
22 Oct, 2013 3:53:25 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory ROOT
22 Oct, 2013 3:53:25 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-12000
22 Oct, 2013 3:53:25 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2081 ms`

本地主机日志

22 Oct, 2013 3:51:45 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.apache.sqoop.server.ServerInitializer
java.lang.NoClassDefFoundError: org/apache/hadoop/mapred/JobClient
    at org.apache.sqoop.submission.mapreduce.MapreduceSubmissionEngine.initialize(MapreduceSubmissionEngine.java:113)
    at org.apache.sqoop.framework.JobManager.initialize(JobManager.java:215)
    at org.apache.sqoop.core.SqoopServer.initialize(SqoopServer.java:53)
    at org.apache.sqoop.server.ServerInitializer.contextInitialized(ServerInitializer.java:36)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    at org.apache.catalina.core.StandardService.start(StandardService.java:525)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.mapred.JobClient
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
    ... 28 more
22 Oct, 2013 3:51:45 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class org.apache.sqoop.server.ServerInitializer
java.lang.NullPointerException
    at org.apache.sqoop.framework.JobManager.destroy(JobManager.java:176)
    at org.apache.sqoop.core.SqoopServer.destroy(SqoopServer.java:36)
    at org.apache.sqoop.server.ServerInitializer.contextDestroyed(ServerInitializer.java:32)
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4245)
    at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4886)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4750)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    at org.apache.catalina.core.StandardService.start(StandardService.java:525)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
22 Oct, 2013 3:53:24 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.apache.sqoop.server.ServerInitializer
java.lang.NoClassDefFoundError: org/apache/hadoop/mapred/JobClient
    at org.apache.sqoop.submission.mapreduce.MapreduceSubmissionEngine.initialize(MapreduceSubmissionEngine.java:113)
    at org.apache.sqoop.framework.JobManager.initialize(JobManager.java:215)
    at org.apache.sqoop.core.SqoopServer.initialize(SqoopServer.java:53)
    at org.apache.sqoop.server.ServerInitializer.contextInitialized(ServerInitializer.java:36)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    at org.apache.catalina.core.StandardService.start(StandardService.java:525)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.mapred.JobClient
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
    ... 28 more
22 Oct, 2013 3:53:24 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class org.apache.sqoop.server.ServerInitializer
java.lang.NullPointerException
    at org.apache.sqoop.framework.JobManager.destroy(JobManager.java:176)
    at org.apache.sqoop.core.SqoopServer.destroy(SqoopServer.java:36)
    at org.apache.sqoop.server.ServerInitializer.contextDestroyed(ServerInitializer.java:32)
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4245)
    at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4886)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4750)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
    at org.apache.catalina.core.StandardService.start(StandardService.java:525)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

谁能建议我出了什么问题

新日志

` org.apache.commons.dbcp.SQLNestedException: Borrow prepareStatement from pool failed
at org.apache.commons.dbcp.PoolingConnection.prepareStatement(PoolingConnection.java:113)
at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:281)
at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:313)
at org.apache.sqoop.repository.derby.DerbyRepositoryHandler.detectVersion(DerbyRepositoryHandler.java:293)

引起:java.sql.SQLSyntaxErrorException: Schema SQOOP 不存在 PoolingConnection.java:285) at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1179) at org.apache.commons.dbcp。 PoolingConnection.prepareStatement(PoolingConnection.java:107) ... 35 更多原因:java.sql.SQLException:架构“SQOOP”在 org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) 中不存在org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) ... 51 更多原因:错误 42Y07:org.apac 中不存在架构 SQOOP `

4

3 回答 3

0

我相信根本的例外是这个:

Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.mapred.JobClient

似乎 Sqoop 服务器无法找到它的 Hadoop 依赖项。您提到您已经通过 tarbals 而不是包安装了 Sqoop,因此您需要更改 catalina.properties 文件。我建议查看默认示例文件并使用 Hadoop 依赖项的正确位置更改配置文件。

于 2013-10-29T17:07:00.047 回答
0

请考虑这些点来跟踪 sqoop2 问题。

  1. 确保您的 hadoop namenode集群运行无密钥(即没有密码)。

  2. 确保NameNode、DataNode、NodeManager、ResourceManager、SecondaryNameNode 和 JobHistoryServer正在您的系统上运行。

  3. 使用使用绝对路径编辑您的“ catalina.properties ”文件来加载hadoop库,因为有时相对路径无法正常工作。在我的情况下。

    common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/../lib/*.jar,/home/infinity/HADOOP/hadoop/share/hadoop/common/*.jar,/home/infinity/HADOOP/hadoop/share/hadoop/common/lib/*.jar,/home/infinity/HADOOP/hadoop/share/hadoop/hdfs/*.jar,/home/infinity/HADOOP/hadoop/share/hadoop/hdfs/lib/*.jar,/home/infinity/HADOOP/hadoop/share/hadoop/mapreduce/*.jar,/home/infinity/HADOOP/hadoop/share/hadoop/mapreduce/lib/*.jar,/home/infinity/HADOOP/hadoop/share/hadoop/yarn/*.jar,/home/infinity/HADOOP/hadoop/share/hadoop/yarn/lib/*.jar,/home/infinity/HADOOP/hadoop/share/hadoop/tools/lib/*.jar,/home/infinity/HADOOP/hive/lib/*.jar
    
  4. sqoop.properties文件中的@BASEDIR@@LOGDIR@位置使用绝对路径**,以便轻松跟踪 sqoop 日志文件。

  5. 确保 hadoop 实例目录位置在您的 sqoop.properties 文件中可用。就我而言,这些是。

    提交引擎类

    org.apache.sqoop.submission.engine=org.apache.sqoop.submission.mapreduce.MapreduceSubmissionEngine
    

    Hadoop配置目录

    org.apache.sqoop.submission.engine.mapreduce.configuration.directory=/home/infinity/HADOOP/hadoop/etc/hadoop
    

    执行引擎配置

    org.apache.sqoop.execution.engine=org.apache.sqoop.execution.mapreduce.MapreduceExecutionEngine
    
  6. 如果所有设置都正常,则使用 sqoop.sh server start启动sqoop2-server

注意:- 1. 但是,在运行此命令之前,使用此命令Hadoop namenode -format格式化您的 hadoop 集群名称节点,然后启动您的sqoop2-server

如果这些所有设置在您的系统中都很好,那么这不是配置问题。这可能是 jar 兼容性问题。因为它仅在缺少本机 jar 文件或当前环境不支持第三方 jar 文件时才会发生。我建议您确保“catalina.properties”具有所有基本的本机依赖 jar 文件。

 Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.mapred.JobClient

我希望这篇文章能帮助您跟踪您的问题。

于 2016-11-03T10:23:17.030 回答
0

我认为您需要确保在里面sqoop.properties,hadoop配置目录org.apache.sqoop.submission.engine.mapreduce.configuration.directory应该设置为hadoop配置文件所在的正确目录。它/etc/hadoop/conf默认设置为,但在我的情况下,它实际上位于/root/hadoop-2.7.3/etc/hadoop

于 2016-10-15T12:37:53.773 回答