zoukankan      html  css  js  c++  java
  • Flume报错:ERROR hdfs.HDFSEventSink: process failed java.lang.NoSuchMethodError: org.apache.hadoop.ipc.RPC.getProtocolProx

    报错日志:

    21/07/06 12:07:54 ERROR hdfs.HDFSEventSink: process failed
    java.lang.NoSuchMethodError: org.apache.hadoop.ipc.RPC.getProtocolProxy(Ljava/lang/Class;JLjava/net/InetSocketAddress;Lorg/apache/hadoop/security/UserGroupInformation;Lorg/apache/hadoop/conf/Configuration;Ljavax/net/SocketFactory;ILorg/apache/hadoop/io/retry/RetryPolicy;Ljava/util/concurrent/atomic/AtomicBoolean;)Lorg/apache/hadoop/ipc/ProtocolProxy;
            at org.apache.hadoop.hdfs.NameNodeProxies.createNNProxyWithClientProtocol(NameNodeProxies.java:418)
            at org.apache.hadoop.hdfs.NameNodeProxies.createNonHAProxy(NameNodeProxies.java:314)
            at org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider.getProxy(ConfiguredFailoverProxyProvider.java:124)
            at org.apache.hadoop.io.retry.RetryInvocationHandler.<init>(RetryInvocationHandler.java:74)
            at org.apache.hadoop.io.retry.RetryInvocationHandler.<init>(RetryInvocationHandler.java:65)
            at org.apache.hadoop.io.retry.RetryProxy.create(RetryProxy.java:58)
            at org.apache.hadoop.hdfs.NameNodeProxies.createProxy(NameNodeProxies.java:181)
            at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:678)
            at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:619)
            at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:149)
            at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2397)
            at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:89)
            at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2431)
            at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2413)
            at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:368)
            at org.apache.hadoop.fs.Path.getFileSystem(Path.java:296)
            at org.apache.flume.sink.hdfs.BucketWriter$1.call(BucketWriter.java:240)
            at org.apache.flume.sink.hdfs.BucketWriter$1.call(BucketWriter.java:232)
            at org.apache.flume.sink.hdfs.BucketWriter$9$1.run(BucketWriter.java:668)
            at org.apache.flume.auth.SimpleAuthenticator.execute(SimpleAuthenticator.java:50)
            at org.apache.flume.sink.hdfs.BucketWriter$9.call(BucketWriter.java:665)
            at java.util.concurrent.FutureTask.run(FutureTask.java:266)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
            at java.lang.Thread.run(Thread.java:748)
    Exception in thread "SinkRunner-PollingRunner-DefaultSinkProcessor" java.lang.NoSuchMethodError: org.apache.hadoop.ipc.RPC.getProtocolProxy(Ljava/lang/Class;JLjava/net/InetSocketAddress;Lorg/apache/hadoop/security/UserGroupInformation;Lorg/apache/hadoop/conf/Configuration;Ljavax/net/SocketFactory;ILorg/apache/hadoop/io/retry/RetryPolicy;Ljava/util/concurrent/atomic/AtomicBoolean;)Lorg/apache/hadoop/ipc/ProtocolProxy;
            at org.apache.hadoop.hdfs.NameNodeProxies.createNNProxyWithClientProtocol(NameNodeProxies.java:418)
            at org.apache.hadoop.hdfs.NameNodeProxies.createNonHAProxy(NameNodeProxies.java:314)
            at org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider.getProxy(ConfiguredFailoverProxyProvider.java:124)
            at org.apache.hadoop.io.retry.RetryInvocationHandler.<init>(RetryInvocationHandler.java:74)
            at org.apache.hadoop.io.retry.RetryInvocationHandler.<init>(RetryInvocationHandler.java:65)
            at org.apache.hadoop.io.retry.RetryProxy.create(RetryProxy.java:58)
            at org.apache.hadoop.hdfs.NameNodeProxies.createProxy(NameNodeProxies.java:181)
            at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:678)
            at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:619)
            at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:149)
            at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2397)
            at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:89)
            at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2431)
            at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2413)
            at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:368)
            at org.apache.hadoop.fs.Path.getFileSystem(Path.java:296)
            at org.apache.flume.sink.hdfs.BucketWriter$1.call(BucketWriter.java:240)
            at org.apache.flume.sink.hdfs.BucketWriter$1.call(BucketWriter.java:232)
            at org.apache.flume.sink.hdfs.BucketWriter$9$1.run(BucketWriter.java:668)
            at org.apache.flume.auth.SimpleAuthenticator.execute(SimpleAuthenticator.java:50)
            at org.apache.flume.sink.hdfs.BucketWriter$9.call(BucketWriter.java:665)
            at java.util.concurrent.FutureTask.run(FutureTask.java:266)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
            at java.lang.Thread.run(Thread.java:748)

    解决办法:

    需要把hdfs的配置文件  hdfs-site.xml和core-site.xml配置文件copy到flume/conf/ 目录下,

    另外把需要的hadoop jar包拷贝到flume/lib 目录下(或者引用环境变量)

    需要的相关jar包:

    commons-configuration-1.6.jar、
    hadoop-auth-2.7.2.jar、
    hadoop-common-2.7.2.jar、
    hadoop-hdfs-2.7.2.jar、
    commons-io-2.4.jar、
    htrace-core-3.1.0-incubating.jar

  • 相关阅读:
    罗马数字转整数
    对称的二叉树
    python中列表,元组,字符串 互相转换
    python django 批量上传文件并绑定对应文件的描述
    python django mkdir和makedirs的用法
    python 获取两位的月份(09)和天数(09)
    django 注册后台管理 在debug=true能行,在debug=false不能显示出管理标签
    django OperationalError: unable to open database file 创建数据库
    网站安全保证设置及网站认证
    动态的有序分类导航:每个一级标题下都有多个二级标题。
  • 原文地址:https://www.cnblogs.com/-courage/p/14976680.html
Copyright © 2011-2022 走看看