Issues faced during ES upgrade from 1.4.2 to 2.3.2

Hi,

We had ElasticSearch with 1.4.2 and had code using TransportClient.
We are now trying to upgrade to ES 2.3.2 but I am facing several issues with the jar files.

This is the code used to connect to ES server using TransportClient
Settings settings = Settings.settingsBuilder()
.put( "cluster.name", OnedataProperties.ES_CLUSTER_NAME )
.put( "node.http.enabled", nodeHttpEnable ).put( "gateway.type", gatewaytype )
.put( "client.transport.sniff", transportSnif ).put( "index.store.type", indexStortype )
.build();
client = TransportClient.builder().settings( settings ).build();
( (TransportClient) client ).addTransportAddress( new InetSocketTransportAddress( InetAddress
.getByName( "XX.XX.XX.XX" ), 9300 ) );

With 1.4.2, I had included only lucene-core, lucene-analyzers-common, guava and elasticsearch jar files in my client application and it was working fine. After upgrade, I have upgraded the version of the 4 jar files to use the ones in sync with ES 2.3.2. However, when I run my application, it keeps throwing me dependency errors one by one - stating that it needs jsr166e-1.1.0.jar, t-digest-3.0.jar, netty.jar etc. The list is growing and seems endless.

Can you please let me know

  1. Is there a thin client version of the ElasticSearch library that can be included in the client application?
  2. What is the complete list of jar files that I need to include in my client application to work with ES 2.3.2?
  3. I have used the default elasticsearch.yml file that comes with the installation. Are there any changes that need to be done in the yml file?

Thanks,
Supriya

Not yet.

You should use Maven or Gradle to get the dependencies.

Here we go:

$ mvn dependency:tree
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Elasticsearch: Core 2.3.4-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ elasticsearch ---
[INFO] org.elasticsearch:elasticsearch:jar:2.3.4-SNAPSHOT
[INFO] +- org.hamcrest:hamcrest-all:jar:1.3:test
[INFO] +- com.carrotsearch.randomizedtesting:randomizedtesting-runner:jar:2.3.2:test
[INFO] |  \- junit:junit:jar:4.11:test
[INFO] +- org.apache.lucene:lucene-test-framework:jar:5.5.0:test
[INFO] |  \- org.apache.lucene:lucene-codecs:jar:5.5.0:test
[INFO] +- org.apache.httpcomponents:httpclient:jar:4.3.6:test
[INFO] |  +- org.apache.httpcomponents:httpcore:jar:4.3.3:test
[INFO] |  +- commons-logging:commons-logging:jar:1.1.3:test
[INFO] |  \- commons-codec:commons-codec:jar:1.6:test
[INFO] +- com.google.jimfs:jimfs:jar:1.0:test
[INFO] +- org.apache.lucene:lucene-core:jar:5.5.0:compile
[INFO] +- org.apache.lucene:lucene-backward-codecs:jar:5.5.0:compile
[INFO] +- org.apache.lucene:lucene-analyzers-common:jar:5.5.0:compile
[INFO] +- org.apache.lucene:lucene-queries:jar:5.5.0:compile
[INFO] +- org.apache.lucene:lucene-memory:jar:5.5.0:compile
[INFO] +- org.apache.lucene:lucene-highlighter:jar:5.5.0:compile
[INFO] +- org.apache.lucene:lucene-queryparser:jar:5.5.0:compile
[INFO] |  \- org.apache.lucene:lucene-sandbox:jar:5.5.0:compile
[INFO] +- org.apache.lucene:lucene-suggest:jar:5.5.0:compile
[INFO] |  \- org.apache.lucene:lucene-misc:jar:5.5.0:compile
[INFO] +- org.apache.lucene:lucene-join:jar:5.5.0:compile
[INFO] |  \- org.apache.lucene:lucene-grouping:jar:5.5.0:compile
[INFO] +- org.apache.lucene:lucene-spatial:jar:5.5.0:compile
[INFO] |  \- org.apache.lucene:lucene-spatial3d:jar:5.5.0:compile
[INFO] +- com.spatial4j:spatial4j:jar:0.5:compile
[INFO] +- com.vividsolutions:jts:jar:1.13:compile
[INFO] +- com.github.spullara.mustache.java:compiler:jar:0.8.13:compile
[INFO] +- com.google.guava:guava:jar:18.0:compile
[INFO] +- org.elasticsearch:securesm:jar:1.0:compile
[INFO] +- com.carrotsearch:hppc:jar:0.7.1:compile
[INFO] +- joda-time:joda-time:jar:2.9.4:compile
[INFO] +- org.joda:joda-convert:jar:1.2:compile
[INFO] +- com.fasterxml.jackson.core:jackson-core:jar:2.6.6:compile
[INFO] +- com.fasterxml.jackson.dataformat:jackson-dataformat-smile:jar:2.6.6:compile
[INFO] +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.6.6:compile
[INFO] |  \- org.yaml:snakeyaml:jar:1.15:compile
[INFO] +- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.6.6:compile
[INFO] +- io.netty:netty:jar:3.10.5.Final:compile
[INFO] +- com.ning:compress-lzf:jar:1.0.2:compile
[INFO] +- com.tdunning:t-digest:jar:3.0:compile
[INFO] +- org.hdrhistogram:HdrHistogram:jar:2.1.6:compile
[INFO] +- commons-cli:commons-cli:jar:1.3.1:compile
[INFO] +- log4j:log4j:jar:1.2.17:compile
[INFO] +- log4j:apache-log4j-extras:jar:1.2.17:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.6.2:compile
[INFO] +- net.java.dev.jna:jna:jar:4.1.0:compile
[INFO] \- com.twitter:jsr166e:jar:1.1.0:compile

If you want to be able to access elasticsearch from another machine, you'll have to define network.host.

HTH

where should i use "mvn dependency:tree"?

Have you sloved your issue?would you please list the dependcy jar what are needed to run elaticsearch .

Have you sloved your issue?would you please list the dependcy jar what are needed to run elaticsearch .

I already gave that list Issues faced during ES upgrade from 1.4.2 to 2.3.2 - #2 by dadoonet

where should i use "mvn dependency:tree"?

Download the source code. git checkout the version you need. Then run the command.