使用yarn在Amazon EMR上运行sqoop2服务器时出错



我正在尝试在Amazon EMR集群(AMI版本3.2.0/Hadoop版本2.4.0)上安装sqoop 2(版本1.99.3)。当我启动sqoop服务器时,我在localhost.log中看到此错误:

Sep 10, 2014 4:55:56 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.RuntimeException: Failure in server initialization
    at org.apache.sqoop.core.SqoopServer.initialize(SqoopServer.java:57)
    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:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.apache.sqoop.common.SqoopException: MAPREDUCE_0002:Failure on submission engine initialization
    at org.apache.sqoop.submission.mapreduce.MapreduceSubmissionEngine.initialize(MapreduceSubmissionEngine.java:115)
    at org.apache.sqoop.framework.JobManager.initialize(JobManager.java:215)
    at org.apache.sqoop.core.SqoopServer.initialize(SqoopServer.java:53)
    ... 25 more
Caused by: java.io.IOException: Cannot initialize Cluster. Please check your configuration for mapreduce.framework.name and the correspond server addresses.
    at org.apache.hadoop.mapreduce.Cluster.initialize(Cluster.java:120)
    at org.apache.hadoop.mapreduce.Cluster.<init>(Cluster.java:82)
    at org.apache.hadoop.mapreduce.Cluster.<init>(Cluster.java:75)
    at org.apache.hadoop.mapred.JobClient.init(JobClient.java:470)
    at org.apache.hadoop.mapred.JobClient.<init>(JobClient.java:449)
    at org.apache.sqoop.submission.mapreduce.MapreduceSubmissionEngine.initialize(MapreduceSubmissionEngine.java:113)
    ... 27 more

以下是我按照安装说明所做的操作。请注意,对于EMR,$HADOOP_HOME是/HOME/HADOOP。

  • 我从Apache下载了sqoop-1.99.3-bin-hadoop200.tar.gz,并将其提取到$HADOOP_HOME/scoop中
  • 将以下内容添加到catalina.properties中的common.loader属性:/home/hadop/share/hadop/common/*.jar、/home/hadop/share/hadoop/common/lib/*.jar、/home/hadop/hare/hadop/mapreduce/*.jar和/home/haop/share/haop/yarn/*.jar
  • 在平方米属性中:
    • 我用/home/hadop/sqoop/log替换了@LOGDIR@
    • 我用/home/hadop/sqoop替换了@BASEDIR@
    • 对于属性org.apache.scoop.submission.engine.mapreduce.configuration.directory,我将/etc/hadoop/conf/替换为/home/hadoop/conf/
  • 然后我启动了服务器:bin/scoop.sh server start

据我从错误中所知,问题的根源是这条线:

Caused by: java.io.IOException: Cannot initialize Cluster. Please check your configuration for mapreduce.framework.name and the correspond server addresses.

并且该属性在mapred-site.xml中设置:

<property><name>mapreduce.framework.name</name><value>yarn</value></property>

这就是我想要的。

我觉得我在sqoop的安装/配置中缺少了一些参数设置,我尝试了其他一些事情(比如尝试AMI 3.0.4/Hoop 2.2.0),但无法启动sqoop服务器。

fyi。我在Kyle Mulka的博客上读过这篇文章,但它引用了Hadoop和sqoop的不同版本,似乎没有深入了解我的配置。我已经阅读了这个网站上的其他一些页面,但还没有找到一个引用我正在使用的Hadoop和sqoop版本的页面。我已经看到这种配置在Cloudera中运行(sqoop2和Hadoop2 with yarn),但我还不知道如何将其转化为EMR安装。

感谢对这篇文章的反馈,我更改了catalina.properties中的common.loader属性,而不是以前的属性:

common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/../lib/*.jar,/home/hadoop/share/hadoop/common/*.jar,/home/hadoop/share/hadoop/common/lib/*.jar,/home/hadoop/share/hadoop/mapreduce/*.jar,/home/hadoop/share/hadoop/yarn/*.jar

到此:

common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.home}/../lib/*.jar,/home/hadoop/share/hadoop/common/*.jar,/home/hadoop/share/hadoop/common/lib/*.jar,/home/hadoop/share/hadoop/hdfs/*.jar,/home/hadoop/share/hadoop/hdfs/lib/*.jar,/home/hadoop/share/hadoop/mapreduce/*.jar,/home/hadoop/share/hadoop/mapreduce/lib/*.jar,/home/hadoop/share/hadoop/tools/lib/*.jar,/home/hadoop/share/hadoop/yarn/*.jar,/home/hadoop/share/hadoop/yarn/lib/*.jar

之后,sqoop服务器成功启动。

相关内容

  • 没有找到相关文章

最新更新