I am trying to use Java 2.3 client API (ES 2.3 is installed on a Linux RH 7 Machine) to connect to ElasticSearch just a single node configuration. However its stuck at the TransportClient.builder().settings(settings).build(). I waited for 5-10 minutes and nothing happened. No exception was thrown either.
btw, I have installed Marvel and Kibana. and they are running perfect. I can access them remotely also using a web-browser.
Configuration: ES 2.3 installed on Redhat 7. with Java 1.8.
Client API Java 2.3.3 on Mac OSX
So, in the code below, its prints "here0" but no "here1" or noting beyond and just stays there indefinitely. No exception either
btw, I don't think its ES server configuration problem.
I tried to run my Java code completely offline on my laptop (as in - not connected to internet or neither to network). Still it stuck at the same "here0" and never shows "here1". Wondering, whether its the Client library issue or something related.
On another note, earlier I have extensively used ES 1.7. And everything runs perfectly through my laptop.
Nah!! I replaced with the IP address and its still stuck. I tried to debug, and this is where the program got to the last point. (This is Thread.class)
Yes, everything works from my client machine. curl etc. from command prompt. Thats how I figured out, something in my code thats not working properly. But it was hard to debug, as it didn't throw any exception.
Well, I was able to fix the issue. I think it was some kind of version conflict with Spring IO, ES, and Java 1.8. I still don't know the reason btw. I started with a "clean slate" for ES 2.3.3 (instead of porting my old code that was perfectly running ES 1.7) and one by one added the necessary entries in pom.xml.
Current working configuration is Spring IO 4.2.6. RELEASE with Java 1.8 and ES 2.3.3
Now I am able to use the same aforementioned code and inject data in ES.
thank you very much for your support in resolving the issue.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.