The Elasticsearch interpreter in Zeppelin does not respond to requests - elasticsearch

I have a running Elasticsearch node in a machine. It is healthy, works fine. I can run any requests on the browser without issues. I have a zeppelin notebook where I set up the elastic interpreter. The following is how the interpreter looks like.
elasticsearch.basicauth.password
elasticsearch.basicauth.username
elasticsearch.client.type transport
elasticsearch.cluster.name elasticsearch
elasticsearch.host 127.0.0.1
elasticsearch.port 9300
elasticsearch.result.size 10
zeppelin.interpreter.localRepo /path/to/repo
After I open a notebook, I write:
%elasticsearch
GET /
And the result is this
Bad URL (it should be /index/type/id)
Or
%elasticsearch
GET /
Error : None of the configured nodes are available: [{#transport#-1}{ip}{ip:port}]
Even though
GET host:port/
works just fine in a browser.
What have I done wrong?
Edit:
In addition, I am using Zeppelin 0.7.1 and Elastic 5.4

The elasticSearch interpreter in Zeppelin works differently compared to the browser URL query.
You can think elasticsearch interpreter as a DSL converter which uses its own language. For example, to send GET query for a document, you need to specify index, type and id.
Here is the documentation for the elasticsearch interpreter in Zeppelin 0.7.1
http://zeppelin.apache.org/docs/0.7.1/interpreter/elasticsearch.html#using-the-elasticsearch-interpreter

Try to go to the configuration of elasticsearch interpreter (under the top right menu) and change the value of the paramter
elasticsearch.client.type to http
Also check if the cluster name is correct.
Then you can find here samples of how to create the requests: https://zeppelin.apache.org/docs/0.6.1/interpreter/elasticsearch.html

Related

how can i generate enrollment token for elasticsearch to connect with kibana?

I am having running elastic-search on my Kubernetes cluster with host http://192.168.18.35:31200/. Now I have to connect my elastic search to the kibana. For that an enrollment token needs to be generated but how?
When I login to the root directory of elastic-search from kibana dashboard and type the following command to generate a new enrollment token, it shows the error:
command : bin/elasticsearch-create-enrollment-token --scope kibana
error: bash: bin/elasticsearch-create-enrollment-token: No such file or directory
I have created a file elasticsearch-create-enrollment-token inside the bin directory and gave full permission. Still, no tokens are generated.
Have any ideas on enrollment token guys?
Assuming that you are on debian/ ubuntu, this should help
cd /usr/share/elasticsearch/bin/
then
./elasticsearch-create-enrollment-token --scope kibana
Since you're running ES 7.9, you also need Kibana 7.9. You cannot run Kibana 8 on ES 7.9.
That's the reason why you don't have the elasticsearch-create-enrollment-token script in your bin folder, since that's new in ES8
The enrollment flow for configuration is available in version 8.0 and onwards only and is designed to work only with the TLS configuration that is generated automatically on the first start of the node.
You can still use the documentation to setup TLS manually and configure Kibana to connect to your elasticsearch cluster as you would do in previous versions, this is always supported too.
I’d strongly suggest that you look into using ECK and take advantage of the documentation available.

How do you send a query to a neo4j server from Elasticsearch devtools?

I have a neo instance and a Elasticsearch instance running on a docker compose container.
I would like to eventually create visualization using Elasticsearch using Neo4j data but first I need to find a way to get the two to talk. I have the APOC plugin also if that is relevant. What is the syntax for talking to neo from Devtools in Elastic? Here is what I have so far
Works on Neo4j:
call apoc.bolt.load("bolt://neo4j:fall2021#localhost:7687","match(n) RETURN n LIMIT 5")
Does not work on Elastic:
GET apoc.bolt.load("bolt://neo4j:fall2021#localhost:7687")
To echo the above comments, you cannot do this.
Kibana will only ever talk to the Elasticsearch instance it has been configured to talk to.

In Elassandra not able to access elastic search url

Hi, I am new to Elassandra. I want to make setup(windows 10) and hit queries from elastic search url in stored documents. I have installed Elassandra and start it is working fine but i am not able to access elastic search url. I also tried to configure host and http.port in elasticsearch.yml but it did not work.
from bin i am running cassandra -f -e. here is no error in logs but still not able to access ES on localhost:9200
Please help me out on the steps.
Thanks in advance.

reload elasticsearch after changing elasticsearch.yml

How to make elasticsearch apply new configuration?
I changed one string in file ~ES_HOME/config/elasticsearch.yml:
# Disable HTTP completely:
#
http.enabled: false
Then tried to reload elasticsearch:
elasticsearch reload
Then tried to restart elasticsearch:
elasticsearch restart
Then checked and see that http requests are still acceptable to elastic search.
So my settings are not applied.
My os is os X. ElasticSearch version is 1.2.0
Strangely or not so, the supposed way to do it is just to stop the service, and start it again :)
I.E. get its pid (running ps axww | grep elastic), and then kill ESpid ; just be sure to use the TERM signal, to give it a chance to close properly.
Some *nix elasticsearch distros have control scripts wrappers for start/stop , but I don't think OS X does.
And on a side note, you have probably found the Cluster Update Settings API, and though it provides quite a few options, regretfully it can't be used to change that particular setting.
HTH
P.S. And yep, in Windows setup the services.msc is the way to do it, but doubt this is helpful for you :)
When you have installed the current version (7.4 at the time of writing) of Elasticsearch on macOS with Homebrew, you can run:
brew services restart elastic/tap/elasticsearch-full
This will restart Elasticsearch and reload te configuration.
If ElasticSearch is installed on Windows setup then you have to restart ElasticSearch windows service.
Thanks.

Running Kibana3, LogStash and ElasticSearch, all in one machine

Kibana3 works successfully when ElasticSearch is in a different machine, by setting elasticsearch: "http://different_machine_ip:9200" in config.js of Kibana3.
Now , I want to run all three of them in my local machine for testing. I'm using Windows7 and using Chrome browser. I installed Kibana 3 on Tomcat7. I started the embedded ElasticSearch from LogStash jar file.
I set the ElasticSearch location to "localhost:9200" or "127.0.0.1:9200" or "computer_name:9200". When I check Kibana3 on the browser, the ElasticSearch query revealed via spying has no logstash index.
curl -XGET 'http://localhost:9200//_search?pretty' -d ''
As you can see, the index part is empty, showing // only. The expected query should look like this.
curl -XGET 'http://localhost:9200/logstash-2013.08.13/_search?pretty' -d 'Some JSON Data'
The browser is able to call ElasticSearch API successfully. Example, typing http://localhost:9200/logstash-2013.08.13/_mapping?pretty=true on the address bar returns the mapping of logstash index. This proves that there is no probelm in connecting to ElasticSearch.
The problem here is that the index is empty from Kibana query. Why is the index empty?
Kibana 3 works differently from Kibana 1 and 2. It runs entirely in the browser.
The config file is read by javascript and executed in your browser, so localhost:9200 tells Kibana to look for ElasticSearch running on the laptop in front of you, not the server.
BTW - Recent versions of LogStash has Kibana bundled, so you don't have to host it independently.

Resources