解决:Server IPC version 9 cannot communicate with client version 4

使用idea的maven项目运行mapreduce程序Server IPC version 9 cannot communicate with client version 4

原因:

Java初始化hdfs client时出现的,原因是maven依赖的版本和hdfs的版本不一致

maven仓库中的hadoop-core最高只有1.2.1版本, 不能加这个配置, 使用hadoop-common + hadoop-hdfs + hadoop-client的2.7.1版本即可

我的pom文件:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>hadoop01</groupId>
    <artifactId>hadoop01</artifactId>
    <version>1.0-SNAPSHOT</version>

    <dependencies>
        <!--<dependency>-->
            <!--<groupId>org.apache.hadoop</groupId>-->
            <!--<artifactId>hadoop-core</artifactId>-->
            <!--<version>1.2.1</version>-->
        <!--</dependency>-->
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-common</artifactId>
            <version>2.7.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-hdfs</artifactId>
            <version>2.7.1</version>
        </dependency>

        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-client</artifactId>
            <version>2.7.1</version>

        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <configuration>
                    <excludeTransitive>false</excludeTransitive>
                    <stripVersion>true</stripVersion>
                    <outputDirectory>./lib</outputDirectory>
                </configuration>

            </plugin>
        </plugins>
    </build>
</project>
时间: 2024-08-26 14:45:18

解决:Server IPC version 9 cannot communicate with client version 4的相关文章

bug--java访问hdfs (Server IPC version 9 cannot communicate with client version 4 错误)

1. 今天想做一个hdfs的java工具类,但是在连接hdfs的时候,报如下错误: Exception in thread "main" 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

maven在Idea建立工程,运行出现Server IPC version 9 cannot communicate with client version 4错误

问题的根源在于,工程当中maven dependencies里面的包,有个hadoop-core的包,版本太低,这样,程序里面所有引用到org.apache.hadoop的地方,都是低版本的,你用的是maven3的话,默认是hadoop-core-1.2.1.jar,这个就是那个"ipc client version4", 而一般情况下你的电脑里运行的hadoop都是2.x,显然版本不对,于是我就想办法修改这个,但是maven装上之后就不能随便改里面的包,折腾半天之后,发现只能通过工程

怎么解决server is too busy,这是什么意思?

最近多年未见的一朋友向我咨询一个问题,就是他自己搭建的网站最近经常出现“server is too busy”这个是什么意思呢?该怎么去进行解决呢? 一般出现server is too busy,大多数都是由于asp程序中有过多的server.createobject请求,每一个请求都需要排队等待.举个例子:如果程序中允许的最大队列为500的话,如果当前队列有499的话,当第500个请求到达的时候,就出出现server is too busy错误.        server is too bu

解决:未能加载文件或程序集“EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”

使用nuget管理程序包,有可能在不同时间安装不同版本的Entity Framework:在项目创建初期安装的是6.0.0.0版本,后来添加的类库,安装了6.1.1版本,所以出现这个问题. 解决办法: 1. 工具 -> 库程序包管理器 -> 管理解决方案的nuget程序包 2. 在选中已安装的包中找到EntityFramework,选中后,点击"更新"按钮 3. 选择要更新的项目(一般会自动默认选择需要更新的项目),点击"确定"按钮 4. 等待更新完毕,

Android系统进程间通信(IPC)机制Binder中的Client获得Server远程接口过程源代码分析

文章转载至CSDN社区罗升阳的安卓之旅,原文地址:http://blog.csdn.net/luoshengyang/article/details/6633311 在上一篇文章中,我 们分析了Android系统进程间通信机制Binder中的Server在启动过程使用Service Manager的addService接口把自己添加到Service Manager守护过程中接受管理.在这一篇文章中,我们将深入到Binder驱动程序源代码去分析Client是如何通过Service Manager的

解决eclipse中web项目出现Project facet Java version 1.8 is not supported.的问题

解决eclipse中web项目出现Project facet Java version 1.7 is not supported.的问题 这个错误是因为eclipse中没有jdk1.7,把jdk1.7引进来就好啦 方法/步骤 项目名称上右键选择properties(属性)   B处出现错误的话则双击JRE System library添加java的运行环境如下图所示   如果alternate JRE要是没有的话,可以点击Installed JREs选择自己安装的JRE环境,如下图所示   如果

There is a version mismatch between the spring client and the server

$ RAILS_ENV=production bundle exec rails c There is a version mismatch between the spring client and the server. You should restart the server and make sure to use the same version. CLIENT: 1.3.6, SERVER: 1.3.5 $ spring status Spring is running: 1728

Android Error:(1, 0) Gradle version 2.2 is required. Current version is 3.4.1.

我们在使用Android Studio的时候新建项目没什么问题的,但是当我们下载一份Github上的项目导入进去的时候却没法正常使用,其原因主要是gradle配置问题.而由于gradle这个玩意儿版本更新太快,android Studio每个版本也不一样.比如2.3版本使用gradle的版本是3.3,而2.4版本使用的是3.4.1.那么这个时候会出现什么问题呢?当你使用Android Studio 2.4版本导入一个2.3版本的项目的话就会出现需要修改gradle的版本.有时候Android S

PHP错误:SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

使用PHP连接MySQL 8的时候,可能会发生如标题所示的错误: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client 发生这种错误,是由于MySQL 8默认使用了新的密码验证插件:caching_sha2_password,而之前的PHP版本中所带的mysqlnd无法支持这种验证.解决这个问题,有两种办法. 一种办法是升级PHP支持MySQL 8的新验证插件. PHP 7.