Can't connect to ES 1.6


(Rob) #1

I was able to index 230K documents overnight, doing a curl on health and indices I can see the index and the health returns a yellow status - everything just like on the previous version of ES - except I can't seem to connect to instance.

I've tried 3rd party tools - that all work on the last version of ES - and none connect (ElasticHQ for example). When I try to "search" my site returns a blank, white, page - no errors.

The installation process seemed very different for this version - as does the start process - and I can't get ES to run as a service with this version. Is it supposed to be installed in a specific location? Right now it's in /opt/elasticsearch-1.6.0

Is it possible to downgrade the installation or copy the index into an installation of a previous version? I just don't want to spend another 8 hours indexing today :wink:

Thanks!


(Rob) #2

UPDATE:
If I do a "netstat -tanp" on the system running 1.5.2 I get this line, which is not present
in 1.6:

tcp 0 0 127.0.0.1:55207 127.0.0.1:9200 TIME_WAIT -

1.5.2 works perfectly.
1.6 is running but nothing can connect to it.

Help - please advise :smile:
Rob


(Costin Leau) #3

Moved the post from Elasticsearch Hadoop category to Elasticsearch.


(Mark Walkom) #4

What does curl $IP:9200/ return?


(Rob) #5

Hello Mark,

It returns:

curl: (6) Could not resolve host:


(Mark Walkom) #6

Did you use that exact command or did you replace $IP with your own IP?


(Rob) #7

lol…the exact command….

Okay - I put in 127.0.0.1 and my public facing IP - both didn't return a thing.

I hit enter, the cursor drops down a line, and just hangs there. I have to cntr-c to get back to a prompt.


Can't establish a connection
(Rob) #8

Tried it again, as I was responding with my last, and it just timed out:

curl: (7) Failed to connect to IP port 9200: connection timed out.

But the IP it gives is not anything I've ever seen and isn't anywhere in my netstat


(Mark Walkom) #9

How are you installing ES, how are you starting it?
Have you checked the logs to see if anything is reported?


(Rob) #10

Mark - sorry - I was in the wrong terminal window when I tried that curl.

The return is:

curl (7) Failed to connet to IPxxx.xxx.xxx.xxx port 9200: Connection Refused.

I installed it per the instructions as follows:
curl -L -O https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.6.0.tar.gz
tar -xvf elasticsearch-1.6.0.tar.gz
cd elasticsearch-1.6.0/bin

and started it with this command:
./elasticsearch

Also, when it started, the process said "recovered [0] indices…" and then hung, I had to cntr-c out of it, but I posted it as an issue on Github last night and was told that was okay.


(Mark Walkom) #11

As I mentioned in the GH issue it's not hung, that is what you see when ES has started and is ready to serve requests.

Does ps -ef|grep java show Elasticsearch running?


(Rob) #12

Ah - that was you - thank you again!

Here is what that returns:
tomcat6 1782 1 0 14:22 ? 00:00:33 /usr/lib/jvm/default-java/bin/java -Djava.util.logging.config.file=/var/lib/tomcat6/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC -Djava.endorsed.dirs=/usr/share/tomcat6/endorsed -classpath /usr/share/tomcat6/bin/bootstrap.jar -Dcatalina.base=/var/lib/tomcat6 -Dcatalina.home=/usr/share/tomcat6 -Djava.io.tmpdir=/tmp/tomcat6-tomcat6-tmp org.apache.catalina.startup.Bootstrap start
root 2000 1 0 14:27 pts/0 00:02:25 /usr/bin/java -Xms256m -Xmx1g -Djava.awt.headless=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -XX:+DisableExplicitGC -Dfile.encoding=UTF-8 -Delasticsearch -Des.path.home=/opt/elasticsearch-1.6.0 -cp :/opt/elasticsearch-1.6.0/lib/elasticsearch-1.6.0.jar:/opt/elasticsearch-1.6.0/lib/:/opt/elasticsearch-1.6.0/lib/sigar/ org.elasticsearch.bootstrap.Elasticsearch
root 3467 1961 0 22:38 pts/0 00:00:00 grep --color=auto java


(Mark Walkom) #13

You're running ES in Tomcat?


(Rob) #14

By the way, this is a test system, so I can blow it up, no problem - reinstall, etc...


(Rob) #15

That's the first I've seen Tomcat mentioned on this server. I'm running Apache2, php5.9,Mariadb10.x and not much else. No idea how Tomcat got into this mix - like I said, I just followed the instructions as I have with previous versions, on the same image I've been using for months.

If I do a ps -aux Tomcat isn't even there.


(Mark Walkom) #16

Hmm ok, might just be an environment variable.
Why not just use a deb/rpm to install ES, that way you get the service to handle starting of the service?


(Rob) #17

Having not used "Linux" since Unix SCO was all the rage I thought it'd be best to just follow the instructions on the site :wink:

Okay - I'm just going to delete this server and create a new one - can you provide me a link to the 1.6 deb package?

Thank you for all your help!


(Mark Walkom) #18

You'd be best off using a repository - https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-repositories.html


(Rob) #19

Will do…thanks again Mark!


(dxm1825) #20

Kibana 3 against ElasticSearch 1.4 throws an Connection Failed screen. The error text says to set http.cors.allow-origin, but it misses out the important http.cors.enabled: true

Working config:

$ grep cors elasticsearch-1.4.0.Beta1/config/elasticsearch.yml
http.cors.allow-origin: "/.*/"
http.cors.enabled: true

Source