Elastic search does not start after installing x-pack - elasticsearch

I installed x-pack for Elastic Search 6.2.2 and I can't start Elastic search any more. It shows the following error:
[2018-03-01T19:56:55,884][ERROR][o.e.b.Bootstrap ] Exception
java.lang.IllegalStateException: failed to load plugin class [org.elasticsearch.xpack.core.XPackPlugin]
at org.elasticsearch.plugins.PluginsService.loadPlugin(PluginsService.java:563) ~[elasticsearch-6.2.2.jar:6.2.2]

Related

elasticsearch 7.9.0 jarhell lucene50.Lucene50StoredFieldsFormat$1 debian 10 cannot start

Any help on finding the issue with this.
I manually installed elasticsearch 7.9.0 (https://www.elastic.co/guide/en/elasticsearch/reference/current/deb.html)
I had to add lucene-backward-codecs-8.7.0.jar in /usr/share/elasticsearch/lib or I get the error below.
[2022-01-22T21:25:39,352][ERROR][o.e.b.Bootstrap ] [guest] Exception
java.lang.IllegalStateException: jar hell!
class: org.apache.lucene.codecs.lucene50.Lucene50StoredFieldsFormat$1
jar1: /usr/share/elasticsearch/lib/lucene-backward-codecs-8.7.0.jar
jar2: /usr/share/elasticsearch/lib/lucene-core-8.6.0.jar
before and if I remove the lucene-backward-codecs-8.7.0.jar
[2022-01-22T21:32:05,863][ERROR][o.e.b.Bootstrap ] [guest] Exception
java.lang.IllegalArgumentException: Could not load codec 'Lucene87'. Did you forget to add lucene-backward-codecs.jar?
Just encountered this exact issue while running elasticsearch in a docker container. I resolved it by removing all containers/images related to elasticsearch and repulling them.
I didn't see you mention Docker anywhere in your post, so I'm not sure how relevant this will be, but I figured I'd toss it out there just incase.

Unable to connect to all storage backends successfully with PredictionIO and Elasticsearch on Localhost

I'm trying to setup PredictionIO locally following these instructions.
Unfortunately I'm unable to get it to work. When I try to install a template or run "pio status" I get the error saying that PredictionIO is unable to connect to elasticsearch:
[ERROR] [Console$] Unable to connect to all storage backends successfully. The following shows the error message from the storage backend.
[ERROR] [Console$] None of the configured nodes are available: [] (org.elasticsearch.client.transport.NoNodeAvailableException)
[ERROR] [Console$] Dumping configuration of initialized storage backend sources. Please make sure they are correct.
[ERROR] [Console$] Source Name: ELASTICSEARCH; Type: elasticsearch; Configuration: HOME -> /Users/tomasz/Documents/PredictionIO/apache-predictionio-0.10.0-incubating/PredictionIO-0.10.0-incubating/vendors/elasticsearch-1.4.4, HOSTS -> localhost, PORTS -> 9200, TYPE -> elasticsearch
My pio-env.sh file is setup like so:
PIO_STORAGE_REPOSITORIES_METADATA_NAME=pio_meta
PIO_STORAGE_REPOSITORIES_METADATA_SOURCE=ELASTICSEARCH
PIO_STORAGE_REPOSITORIES_EVENTDATA_NAME=pio_event
PIO_STORAGE_REPOSITORIES_EVENTDATA_SOURCE=HBASE
PIO_STORAGE_REPOSITORIES_MODELDATA_NAME=pio_model
PIO_STORAGE_REPOSITORIES_MODELDATA_SOURCE=LOCALFS
PIO_STORAGE_SOURCES_ELASTICSEARCH_TYPE=elasticsearch
PIO_STORAGE_SOURCES_ELASTICSEARCH_HOSTS=localhost
PIO_STORAGE_SOURCES_ELASTICSEARCH_PORTS=9200
PIO_STORAGE_SOURCES_ELASTICSEARCH_HOME=$PIO_HOME/vendors/elasticsearch-1.4.4
PIO_STORAGE_SOURCES_LOCALFS_TYPE=localfs
PIO_STORAGE_SOURCES_LOCALFS_PATH=$PIO_FS_BASEDIR/models
PIO_STORAGE_SOURCES_HBASE_TYPE=hbase
PIO_STORAGE_SOURCES_HBASE_HOME=$PIO_HOME/vendors/hbase-1.0.0
Any help would be appreciated.
I encountered this when I was using Elasticsearch 5.4.x on PredictionIO version 0.11.0-incubating. It worked when I used Elasticsearch 1.7.x

How to enable dynamic scripting in ElasticSearch with its gem?

I'm getting the error nested: ScriptException[dynamic scripting for [groovy] disabled]; because of this aggregation I'm making:
agg :category_aggregation do
{
terms: {
script: "doc['categories.id'].value + '|' + doc['categories.name'].value",
size: 30
}
}
end
I'm using the official elasticsearch gem and also tried with chewy but couldn't find how to enable the dynamic_search anywhere.
ElasticSearch version in my OS X: 1.5.2 installed with homebrew.
Dynamic scripting can only be enabled from the elasticsearch.yml configuration file in your ES cluster.
Add this to the file on every node and restart your cluster:
script.disable_dynamic: false
UPDATE
Since you've installed ES via homebrew, you can find the elasticsearch.yml file in /usr/local/Cellar/elasticsearch/1.5.2/config

How to use custom analyzer in ElasticSearch?

I wanted to try Elasticsearch with Polish language support, but I have some problems with it.
I installed Stempel Analysis Plugin, I'm trying to create an index that uses Polish analyzer:
curl -XPUT localhost:9200/polisz -d '{
"mappings" : {
"_default_" : {
"properties" : {
"text_entry" : { "type": "string", "analyzer": "polish" }
}
}
}
}
'
But I get an error about not recognized analyzer:
{
"status" : 400,
"error" : "MapperParsingException[mapping [_default_]]; nested: MapperParsingException[Analyzer [polish] not found for field [text_entry]]; "
}
Should I do anything after installing the plugin and rebooting ES?
I can't find any specific instructions about using the plugin so maybe I'm just doing something obviously wrong?
Some more details on how I set up my environment:
I installed and run docker image with ES and kibana by commands:
docker pull minimum2scp/es-kibana
docker run -d -p 8080:80 -p 9200:9200 --name es minimum2scp/es-kibana
I installed the Stempel plugin by command:
host$ docker exec -it es bash
root#docker-es:/# /usr/share/elasticsearch/bin/plugin install elasticsearch/elasticsearch-analysis-stempel/2.4.2
Then I rebooted elasticsearch, by:
root#docker-es:/# service elasticsearch restart
I'll be grateful for any help!
Krzysztof
OK, I got it. It seems that my plugin didn't install correctly. Even that plugin install command doesn't return any errors, neither elasticsearch restart command, there was a Lucene version mismatch in Elasticsearch( I don't remember, but below 4.10.2) and the plugin (4.10.3).
It was enough to look into elasticsearch.log file to find it out...My bad.
BUT there is more to it: I switched to the most popular (by stars) elasticsearch docker image, which is: dockerfile/elasticsearch. It has the ES version 1.4.2 that is based on Lucene 4.10.2, still mismatching the plugin Lucene 4.10.3. That causes an error even though authors of plugin states it plugin in 2.4.2 (current stable) support 1.4 ES version(s).
Citing an error for future web searching the problem:
[2015-02-13 10:57:11,850][INFO ][node ] [Necromantra] version[1.4.2], pid[1], build[927caff/2014-12-16T14:11:12Z]
[2015-02-13 10:57:11,851][INFO ][node ] [Necromantra] initializing ...
[2015-02-13 10:57:11,884][ERROR][plugins ] [Necromantra] cannot start plugin due to incorrect Lucene version: plugin [4.10.3], node [4.10.2].
[2015-02-13 10:57:11,884][WARN ][plugins ] [Necromantra] failed to load plugin from [jar:file:/data/plugins/analysis-stempel/elasticsearch-analysi
s-stempel-2.4.2.jar!/es-plugin.properties]
Now I chose a path to downgrade the plugin to 2.4.1, which agreed with my ES 1.4.2. Although in the long term I would look for docker image that has 1.4.3 ES which, hopefully,upgraded Lucene version as well.
Dadoonet, thank you for having a closer look on my problem.

trouble with getting elasticsearch started: ClassNotFoundException[org.elasticsearch.rest.XContentRestResponse]

I've installed elastic search using homebrew on a mac and also sintalled the river-jdbc plugin. When I try to start elastic search I get the following error, any advice on how to get it running?:=
[2014-09-08 13:56:39,133][INFO ][node ] [Marius St. Croix] version[1.2.1], pid[48336], build[6c95b75/2014-06-03T15:02:52Z]
[2014-09-08 13:56:39,133][INFO ][node ] [Marius St. Croix] initializing ...
[2014-09-08 13:56:39,144][INFO ][plugins ] [Marius St. Croix] loaded [river-jdbc, marvel], sites [marvel]
{1.2.1}: Initialization Failed ...
- ExecutionError[java.lang.NoClassDefFoundError: org/elasticsearch/rest/XContentRestResponse]
NoClassDefFoundError[org/elasticsearch/rest/XContentRestResponse]
ClassNotFoundException[org.elasticsearch.rest.XContentRestResponse]
What's your elasticsearch version? Maybe they have fixed it for FS River Plugin 1.2.0 / elasticsearch 1.2.0.
References
FileSystem River for Elasticsearch
issue#67
FileSystem River for Elasticsearch
issue#68
For those using Elasticsearch 1.5.2 on Linux and receiving this error, it's best to use OpenJDK instead of Oracle's Java.
From what I've tested, it does like to use jdk1.8.0_11 or jre1.8.0_45. I haven't tried v1.7.x versions of Oracle's Java, however.

Resources