# Migrating from Elasticsearch 2 to 6

**URL:** <https://discuss.elastic.co/t/migrating-from-elasticsearch-2-to-6/149494>\
**Category:** Elasticsearch\
**Created:** [September 21, 2018, 5:06pm UTC](https://discuss.elastic.co/t/migrating-from-elasticsearch-2-to-6/149494 "2018-09-21T17:06:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ApolloX](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@ApolloX](https://discuss.elastic.co/u/ApolloX)\
**Post date:** [September 21, 2018, 5:06pm UTC](https://discuss.elastic.co/t/migrating-from-elasticsearch-2-to-6/149494/1 "2018-09-21T17:06:26Z")

</div>

I'm in the process of migrating an application from 2.4.6 server to a 6.3.2 server. I have a Java process that currently indexes data on the 2.4.6 server using the Shield plugin for authentication. As part of the migration, I would like the same process to also index the data on the 6.3.2 server.

Problem: Can you create one Java process that can talk to both 2.4.6 and 6.3.2 servers?

1. Possible Solution #1: Use the latest Jar  
Is it possible to connect to the 2.4.6 server using the 6.3.2 client? It doesn't seem to work as trying to use shield settings/plugins results in errors establishing the connection.

2. Possible Solution #2: Use both jars  
Anyone have experience or tips setting up Java to use both JARs? The problem is that Java does not (easily) allow accessing org.elasticsearch.elasticsearch jars of completely different versions at the same time.

Thanks in advance!

---

<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:** [October 19, 2018, 5:06pm UTC](https://discuss.elastic.co/t/migrating-from-elasticsearch-2-to-6/149494/2 "2018-10-19T17:06:33Z")

</div>

Closed on October 19, 2018, 5:06pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
