Bug 1413657

Summary: Doesnt start
Product: [Fedora] Fedora Reporter: sergiypavlichenko
Component: elasticsearchAssignee: Zbigniew Jędrzejewski-Szmek <zbyszek>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: bobjensen, box_psx, illtud, java-sig-commits, jpopelka, jvanek, me, pahan, stephane.rapin, tudorvasinca, zbyszek
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-30 23:19:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description sergiypavlichenko 2017-01-16 15:59:13 UTC
Description of problem:


Version-Release number of selected component (if applicable):

elasticsearch-1.7.1-3.fc24.noarch

java version "1.8.0_111"
Java(TM) SE Runtime Environment (build 1.8.0_111-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)


How reproducible:


Steps to Reproduce:
1. dnf install elasticsearch
2. systemctl start elasticsearch


Actual results:
elasticsearch.service - ElasticSearch search engine
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2017-01-16 17:54:09 EET; 38s ago
     Docs: https://www.elasticsearch.org/guide/en/elasticsearch/guide/current/index.html
  Process: 9679 ExecStart=/usr/libexec/elasticsearch (code=exited, status=1/FAILURE)
 Main PID: 9679 (code=exited, status=1/FAILURE)

Jan 16 17:54:09 localhost.localdomain elasticsearch[9679]:         at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)
Jan 16 17:54:09 localhost.localdomain elasticsearch[9679]: Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.databind.JsonMappingException
Jan 16 17:54:09 localhost.localdomain elasticsearch[9679]:         at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
Jan 16 17:54:09 localhost.localdomain elasticsearch[9679]:         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
Jan 16 17:54:09 localhost.localdomain elasticsearch[9679]:         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
Jan 16 17:54:09 localhost.localdomain elasticsearch[9679]:         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Jan 16 17:54:09 localhost.localdomain elasticsearch[9679]:         ... 11 more
Jan 16 17:54:09 localhost.localdomain systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Jan 16 17:54:09 localhost.localdomain systemd[1]: elasticsearch.service: Unit entered failed state.
Jan 16 17:54:09 localhost.localdomain systemd[1]: elasticsearch.service: Failed with result 'exit-code'.

Comment 1 Illtud Daniel 2017-01-30 13:13:21 UTC
Me too.

Comment 2 Stéphane RAPIN 2017-10-02 20:44:31 UTC
same issue for F26:

[Stephane@fedorastephane conf]$ systemctl status elasticsearch.service
● elasticsearch.service - ElasticSearch search engine
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2017-10-02 22:36:25 CEST; 6s ago
     Docs: https://www.elasticsearch.org/guide/en/elasticsearch/guide/current/index.html
  Process: 12929 ExecStart=/usr/libexec/elasticsearch (code=exited, status=1/FAILURE)
 Main PID: 12929 (code=exited, status=1/FAILURE)

oct. 02 22:36:25 fedorastephane elasticsearch[12929]:         at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)
oct. 02 22:36:25 fedorastephane elasticsearch[12929]: Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.databind.JsonMappingException
oct. 02 22:36:25 fedorastephane elasticsearch[12929]:         at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
oct. 02 22:36:25 fedorastephane elasticsearch[12929]:         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
oct. 02 22:36:25 fedorastephane elasticsearch[12929]:         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
oct. 02 22:36:25 fedorastephane elasticsearch[12929]:         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
oct. 02 22:36:25 fedorastephane elasticsearch[12929]:         ... 11 more
oct. 02 22:36:25 fedorastephane systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
oct. 02 22:36:25 fedorastephane systemd[1]: elasticsearch.service: Unit entered failed state.
oct. 02 22:36:25 fedorastephane systemd[1]: elasticsearch.service: Failed with result 'exit-code'.

Comment 3 Fedora End Of Life 2017-11-16 19:40:32 UTC
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '25'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 25 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 4 Fedora End Of Life 2017-12-12 10:55:08 UTC
Fedora 25 changed to end-of-life (EOL) status on 2017-12-12. Fedora 25 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 5 Jiri Popelka 2018-01-24 14:44:51 UTC
Still seeing the problem on F27:

$ /usr/libexec/elasticsearch

/usr/bin/build-classpath: Could not find netty3-3.9.3 Java extension for this JVM
/usr/bin/build-classpath: error: Some specified jars were not found
Exception in thread "main" java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/JsonMappingException
	at com.fasterxml.jackson.dataformat.yaml.YAMLFactory._createParser(YAMLFactory.java:426)
	at com.fasterxml.jackson.dataformat.yaml.YAMLFactory.createParser(YAMLFactory.java:327)
	at org.elasticsearch.common.xcontent.yaml.YamlXContent.createParser(YamlXContent.java:90)
	at org.elasticsearch.common.settings.loader.XContentSettingsLoader.load(XContentSettingsLoader.java:45)
	at org.elasticsearch.common.settings.loader.YamlSettingsLoader.load(YamlSettingsLoader.java:46)
	at org.elasticsearch.common.settings.ImmutableSettings$Builder.loadFromStream(ImmutableSettings.java:982)
	at org.elasticsearch.common.settings.ImmutableSettings$Builder.loadFromUrl(ImmutableSettings.java:969)
	at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareSettings(InternalSettingsPreparer.java:95)
	at org.elasticsearch.bootstrap.Bootstrap.initialSettings(Bootstrap.java:144)
	at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:215)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.databind.JsonMappingException
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 11 more

Comment 6 Jiri Popelka 2018-01-24 14:52:20 UTC
Installing netty3-3.9.3 does not help.

Comment 7 Richard Harman 2018-02-15 04:37:31 UTC
Ooohhhhhh gggoooooddddd.  This was a nightmare to fix.

1) Downgrade HPPC and versionlock it to 0.6.1 from fedora23.
2) Fix hardcoded (and wrong) classpath in /usr/libexec/elasticsearch:

-BASE_JARS="elasticsearch netty3-3.9.3 lucene4-sandbox hppc jackson-core jackson-dataformat-cbor jackson-dataformat-smile jackson-dataformat-yaml snakeyaml guava compress-lzf t-digest commons-cli joda-time antlr3-runtime apache-commons-lang3 lucene4-core lucene4-highlighter lucene4-join lucene4-memory lucene4-queries lucene4-queryparser lucene4-spatial lucene4-suggest joda-convert java-base64"
+BASE_JARS="elasticsearch netty3-3.10.6 lucene4-sandbox hppc jackson-core jackson-dataformat-cbor jackson-databind jackson-dataformat-smile jackson-dataformat-yaml jackson-annotations commons-codec snakeyaml guava compress-lzf t-digest commons-cli joda-time antlr3-runtime apache-commons-lang3 lucene4-core lucene4-highlighter lucene4-join lucene4-memory lucene4-queries lucene4-queryparser lucene4-spatial lucene4-suggest joda-convert java-base64"

Comment 8 raisen 2018-03-07 16:33:23 UTC
(In reply to Richard Harman from comment #7)
> Ooohhhhhh gggoooooddddd.  This was a nightmare to fix.
> 
> 1) Downgrade HPPC and versionlock it to 0.6.1 from fedora23.
> 2) Fix hardcoded (and wrong) classpath in /usr/libexec/elasticsearch:
> 
> -BASE_JARS="elasticsearch netty3-3.9.3 lucene4-sandbox hppc jackson-core
> jackson-dataformat-cbor jackson-dataformat-smile jackson-dataformat-yaml
> snakeyaml guava compress-lzf t-digest commons-cli joda-time antlr3-runtime
> apache-commons-lang3 lucene4-core lucene4-highlighter lucene4-join
> lucene4-memory lucene4-queries lucene4-queryparser lucene4-spatial
> lucene4-suggest joda-convert java-base64"
> +BASE_JARS="elasticsearch netty3-3.10.6 lucene4-sandbox hppc jackson-core
> jackson-dataformat-cbor jackson-databind jackson-dataformat-smile
> jackson-dataformat-yaml jackson-annotations commons-codec snakeyaml guava
> compress-lzf t-digest commons-cli joda-time antlr3-runtime
> apache-commons-lang3 lucene4-core lucene4-highlighter lucene4-join
> lucene4-memory lucene4-queries lucene4-queryparser lucene4-spatial
> lucene4-suggest joda-convert java-base64"

thx, it worked for me :)

Comment 9 Richard Harman 2018-04-21 18:05:45 UTC
So, more problems.

1) It can't MLOCKALL because JNA isn't a dependency, nor is it listed in the BASE_JARS.
2) It can't log anything to disk because log4j isn't a dependency, nor is it listed in BASE_JARS.

I got this working, as a terrible terrible hack.  The package as-is in Fedora is a disservice to those trying to use it.

Can you please remove the package from Fedora?

Comment 10 Basil Mohamed Gohar 2018-08-04 15:50:28 UTC
I encountered this same issue in F28:

$ /usr/libexec/elasticsearch
/usr/bin/build-classpath: Could not find netty3-3.9.3 Java extension for this JVM
/usr/bin/build-classpath: Could not find jackson-dataformat-cbor Java extension for this JVM
/usr/bin/build-classpath: Could not find jackson-dataformat-smile Java extension for this JVM
/usr/bin/build-classpath: Could not find jackson-dataformat-yaml Java extension for this JVM
/usr/bin/build-classpath: error: Some specified jars were not found
Exception in thread "main" java.lang.NoClassDefFoundError: com/fasterxml/jackson/dataformat/yaml/YAMLParser
        at org.elasticsearch.common.xcontent.XContentType$3.xContent(XContentType.java:86)
        at org.elasticsearch.common.xcontent.XContentFactory.xContent(XContentFactory.java:137)
        at org.elasticsearch.common.settings.loader.XContentSettingsLoader.load(XContentSettingsLoader.java:45)
        at org.elasticsearch.common.settings.loader.YamlSettingsLoader.load(YamlSettingsLoader.java:46)
        at org.elasticsearch.common.settings.ImmutableSettings$Builder.loadFromStream(ImmutableSettings.java:982)
        at org.elasticsearch.common.settings.ImmutableSettings$Builder.loadFromUrl(ImmutableSettings.java:969)
        at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareSettings(InternalSettingsPreparer.java:95)
        at org.elasticsearch.bootstrap.Bootstrap.initialSettings(Bootstrap.java:144)
        at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:215)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.dataformat.yaml.YAMLParser
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 10 more

Comment 11 Tudor 2018-10-25 15:28:15 UTC
Try this installation instead:
https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html

Comment 12 Ben Cotton 2018-11-27 13:55:47 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 13 Ben Cotton 2018-11-30 23:19:11 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.