HDFS IO错误org.apache.hadoop.ipc.RemoteException:服务器IPC版本9无法与客户机版本4进行通信 [英] HDFS IO error org.apache.hadoop.ipc.RemoteException: Server IPC version 9 cannot communicate with client version 4 i

查看:416
本文介绍了HDFS IO错误org.apache.hadoop.ipc.RemoteException:服务器IPC版本9无法与客户机版本4进行通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在虚拟机中使用Flume 1.6.0,在另一台虚拟机中使用Hadoop 2.7.1。
当我将Avro Events发送到Flume 1.6.0并尝试在Hadoop 2.7.1 HDFS系统上编写代码时。发生以下异常:
$ b $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $进程(HDFSEventSink.java:455)] HDFS IO错误
org.apache.hadoop.ipc.RemoteException:服务器IPC版本9无法与客户机版本4
在org.apache.hadoop.ipc.Client .call(Client.java:1113)
at org.apache.hadoop.ipc.RPC $ Invoker.invoke(RPC.java:229)
at com.sun.proxy。$ Proxy6.getProtocolVersion(未知源)
at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method .invoke(Method.java:497)
at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:85)
at org.apache.hadoop.io.retry.RetryInvocationHandler .invoke(RetryInvocationHandler.java:62)
at com.sun.proxy。$ Proxy6.getProtocolVersion (Unknown Source)
at org.apache.hadoop.ipc.RPC.checkVersion(RPC.java:422)
at org.apache.hadoop.hdfs.DFSClient.createNamenode(DFSClient.java:183)
at org.apache.hadoop.hdfs.DFSClient。< init>(DFSClient.java:281)
at org.apache.hadoop.hdfs.DFSClient。< init>(DFSClient.java:
at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:100)
at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1446)
at org.apache.hadoop.fs.FileSystem.access $ 200(FileSystem.java:67)
at org.apache.hadoop.fs.FileSystem $ Cache.get(FileSystem.java:1464)
在org.apache.hadoop.fs.FileSystem.get(FileSystem.java:263)
at org.apache.hadoop.fs.Path.getFileSystem(Path.java:187)
at org。 apache.flume.sink.hdfs.BucketWriter $ 1.call(BucketWriter.java:243)
at org.apache.flume.sink.hdfs.BucketWriter $ 1.call(BucketWriter.java:235)
at org.apache.flume.sink.hdfs.BucketWri ter $ 9 $ 1.run(BucketWriter.java:679)
在org.apache.flume.auth.SimpleAuthenticator.execute(SimpleAuthenticator.java:50)
在org.apache.flume.sink.hdfs。 BucketWriter $ 9.call(BucketWriter.java:676)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java :线程
在java.util.concurrent.ThreadPoolExecutor $ Worker.run(线程

我尝试在flume lib 文件夹中添加这些 .jars 文件夹
=>



hadoop -common-2.7.1.jar



avro-1.7.7.jar ,而不是 avro-1.7。 4.jar



avro-ipc-1.7.7.jar 代替 avro-ipc-1.7.4 .jar



guava-18.0.jar 而不是 guava-11.0.2.jar



但问题仍未解决。

解决方案

FlumeNG HDFS Sink 取决于以下 .jar 文件

  hadoop-auth-2.4.0 jar 
hadoop-common-2.4.0.jar
hadoop-hdfs-2.4.0.jar
commons-configuration-1.10 .jar

不包含在 Flume lib 文件夹。



通过添加这些 .jars ,异常已被成功克服。

I am using Flume 1.6.0 in a virtual machine and Hadoop 2.7.1 in another virtual machine . When I send Avro Events to the Flume 1.6.0 and it try to write on Hadoop 2.7.1 HDFS System. The follwing exception occurs

 (SinkRunner-PollingRunner-DefaultSinkProcessor) [WARN - org.apache.flume.sink.hdfs.HDFSEventSink.process(HDFSEventSink.java:455)] HDFS IO error
org.apache.hadoop.ipc.RemoteException: Server IPC version 9 cannot communicate with client version 4
    at org.apache.hadoop.ipc.Client.call(Client.java:1113)
    at org.apache.hadoop.ipc.RPC$Invoker.invoke(RPC.java:229)
    at com.sun.proxy.$Proxy6.getProtocolVersion(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:85)
    at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:62)
    at com.sun.proxy.$Proxy6.getProtocolVersion(Unknown Source)
    at org.apache.hadoop.ipc.RPC.checkVersion(RPC.java:422)
    at org.apache.hadoop.hdfs.DFSClient.createNamenode(DFSClient.java:183)
    at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:281)
    at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:245)
    at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:100)
    at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:1446)
    at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:67)
    at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:1464)
    at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:263)
    at org.apache.hadoop.fs.Path.getFileSystem(Path.java:187)
    at org.apache.flume.sink.hdfs.BucketWriter$1.call(BucketWriter.java:243)
    at org.apache.flume.sink.hdfs.BucketWriter$1.call(BucketWriter.java:235)
    at org.apache.flume.sink.hdfs.BucketWriter$9$1.run(BucketWriter.java:679)
    at org.apache.flume.auth.SimpleAuthenticator.execute(SimpleAuthenticator.java:50)
    at org.apache.flume.sink.hdfs.BucketWriter$9.call(BucketWriter.java:676)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Thread

I try by adding these .jars in flume lib folder =>

hadoop-common-2.7.1.jar

avro-1.7.7.jar instead of avro-1.7.4.jar

avro-ipc-1.7.7.jar instead of avro-ipc-1.7.4.jar

guava-18.0.jar instead of guava-11.0.2.jar

But the problem is still unsolved.

解决方案

FlumeNG HDFS Sink depends on the following .jar files

hadoop-auth-2.4.0 jar
hadoop-common-2.4.0.jar
hadoop-hdfs-2.4.0.jar 
commons-configuration-1.10.jar

which are not included in Flume lib folder .

By adding these .jars , the exception has been successfully overcome.

这篇关于HDFS IO错误org.apache.hadoop.ipc.RemoteException:服务器IPC版本9无法与客户机版本4进行通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆