# Elasticsearch-hdfs snapshot failed: Server IPC version 9 cannot communicate with client version 4

**URL:** <https://discuss.elastic.co/t/elasticsearch-hdfs-snapshot-failed-server-ipc-version-9-cannot-communicate-with-client-version-4/41474>\
**Category:** Elasticsearch\
**Tags:** es-hadoop\
**Created:** [February 11, 2016, 11:01am UTC](https://discuss.elastic.co/t/elasticsearch-hdfs-snapshot-failed-server-ipc-version-9-cannot-communicate-with-client-version-4/41474 "2016-02-11T11:01:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Astro-es](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@Astro-es](https://discuss.elastic.co/u/Astro-es)\
**Post date:** [February 11, 2016, 11:01am UTC](https://discuss.elastic.co/t/elasticsearch-hdfs-snapshot-failed-server-ipc-version-9-cannot-communicate-with-client-version-4/41474/1 "2016-02-11T11:01:36Z")

</div>

Setup:

elasticsearch 2.1.1  
hadoop 2.2.0

I have been trying to sapshot elasticsearch to hdfs repository. But it fails.  
Following [this](https://github.com/elastic/elasticsearch-hadoop/tree/master/repository-hdfs) document.

This call fails:

curl -XPUT '[http://localhost:9200/\_snapshot/my\_backup](http://localhost:9200/_snapshot/my_backup)' -d '  
{"type": "hdfs",  
"settings":{  
"uri": "hdfs://127.0.0.1:9000/",  
"conf\_location":"pathTo/hadoop-2.2.0/etc/hadoop/hdfs-site.xml,pathTo/hadoop-2.2.0/etc/hadoop/core-site.xml",  
"path": "elasticsearch",  
"load\_defaults": "true",  
"compress": true}  
}'

with error:

{"error":{"root\_cause":[{"type":"repository\_exception","reason":"[my\_backup] failed to create repository"}],"type":"repository\_exception","reason":"[my\_backup] failed to create repository","caused\_by":{"type":"creation\_exception","reason":"Guice creation errors:\n\n1) Error injecting constructor, ElasticsearchGenerationException[Cannot create Hdfs file-system for uri [hdfs://127.0.0.1:9000/]]; nested: RemoteException[Server IPC version 9 cannot communicate with client version 4];\n at org.elasticsearch.repositories.hdfs.HdfsRepository.(Unknown Source)\n while locating org.elasticsearch.repositories.hdfs.HdfsRepository\n while locating org.elasticsearch.repositories.Repository\n\n1 error","caused\_by":{"type":"generation\_exception","reason":"Cannot create Hdfs file-system for uri [hdfs://127.0.0.1:9000/]","caused\_by":{"type":"remote\_exception","reason":"S **erver IPC version 9 cannot communicate with client version 4**"}}}},"status":500}

The content of hadoop-libs directory under plugin repository-hdfs looks like this:

commons-codec-1.4.jar commons-lang-2.4.jar jackson-mapper-asl-1.8.8.jar  
commons-collections-3.2.1.jar commons-logging-1.1.1.jar jets3t-0.6.1.jar  
commons-configuration-1.6.jar commons-math-2.1.jar oro-2.0.8.jar  
commons-digester-1.8.jar commons-net-1.4.1.jar xmlenc-0.52.jar  
commons-httpclient-3.0.1.jar hadoop-core-1.2.1.jar  
commons-io-2.1.jar jackson-core-asl-1.8.8.jar

I see plugins being loaded while elasticsearch startup

[INFO][plugin.hadoop.hdfs] Loaded Hadoop [1.2.1] libraries from file:/usr/share/elasticsearch/plugins/repository-hdfs/

What is the issue causing it to fail to snapshot?  
Any help will be appreciated.

---

<div class="post-metadata">

**Author:** ![costin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/costin/32/44950_2.png) [@costin](https://discuss.elastic.co/u/costin)\
**Post date:** [February 21, 2016, 10:37pm UTC](https://discuss.elastic.co/t/elasticsearch-hdfs-snapshot-failed-server-ipc-version-9-cannot-communicate-with-client-version-4/41474/2 "2016-02-21T22:37:18Z")

</div>

The exception appears since you are not using the correct Hadoop version within the hdfs plugin as explained in the [docs](https://github.com/elastic/elasticsearch-hadoop/tree/master/repository-hdfs#flavors). You are basically using the plugin with Hadoop 1.2.1 inside against a Hadoop 2.x - upgrading to Hadoop 2 or using the same libraries fixes this.

---

<div class="post-metadata">

**Author:** ![Astro-es](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@Astro-es](https://discuss.elastic.co/u/Astro-es)\
**Post date:** [February 25, 2016, 10:54am UTC](https://discuss.elastic.co/t/elasticsearch-hdfs-snapshot-failed-server-ipc-version-9-cannot-communicate-with-client-version-4/41474/3 "2016-02-25T10:54:55Z")

</div>

Thanks Costin,

I tried upgrading ES to 2.2.0 and trid the call:

curl -XPUT '[http://localhost:9200/\_snapshot/my\_backup](http://localhost:9200/_snapshot/my_backup)' -d '{"type": "hdfs",  
"settings":{  
"uri":  
"hdfs://127.0.0.1:9000/",  
"conf\_location":"~/hadoop-2.2.0/etc/hadoop/hdfs-site.xml,~/hadoop-2.2.0/etc/hadoop/core-site.xml",  
"path": "elasticsearch",  
"load\_defaults": "true",  
"compress": true}

}'

It gives the same error.

Another thing is, the plugin that I downloaded by **bin/plugin install elasticsearch/elasticsearch-repository-hdfs/2.2.0** , I get hadoop-core-1.2.1.jar under hadoop-libs. I tried it replcing with hadoop-common-2.2.0 and other 2.2.0 auth jars ..but it failed.

Which plugin I should download to get it working? Which version of hadoop and ES?

Thanks

---

<div class="post-metadata">

**Author:** ![Astro-es](https://avatars.discourse-cdn.com/v4/letter/a/b782af/32.png) [@Astro-es](https://discuss.elastic.co/u/Astro-es)\
**Post date:** [March 2, 2016, 7:07am UTC](https://discuss.elastic.co/t/elasticsearch-hdfs-snapshot-failed-server-ipc-version-9-cannot-communicate-with-client-version-4/41474/4 "2016-03-02T07:07:12Z")

</div>

@costin ,

Any suggestions on this?

---

<div class="post-metadata">

**Author:** ![costin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/costin/32/44950_2.png) [@costin](https://discuss.elastic.co/u/costin)\
**Post date:** [March 3, 2016, 10:00am UTC](https://discuss.elastic.co/t/elasticsearch-hdfs-snapshot-failed-server-ipc-version-9-cannot-communicate-with-client-version-4/41474/5 "2016-03-03T10:00:50Z")

</div>

Have you read the docs I mentioned? This is fair question since it contains a section on the various flavours of the plugin including Hadoop 1 and Hadoop 2:

> Yarn / Hadoop 2.x  
> The hadoop2 version contains the plugin jar plus the Hadoop 2.x (Yarn) dependencies.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:25pm UTC](https://discuss.elastic.co/t/elasticsearch-hdfs-snapshot-failed-server-ipc-version-9-cannot-communicate-with-client-version-4/41474/6 "2017-07-06T13:25:59Z")

</div>


