Elasticsearch 5.2 service don't start

Hello,
I need some help, and please excuse my english it's not my monther tongue.

I installed Elasticsearch 5.2 on Redhat 7 and after installation the service started.
I then turned it off to modify the configuration files /etc/elasticsearch/elasticsearch.yml and /etc/sysconfig/elasticsearch

Then I restarted it and I get this error:
[root@machine]# systemctl status elasticsearch.service
elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; disabled)
Active: failed (Result: exit-code) since Thu 2017-02-02 17:23:48 CET; 4s ago
Docs: http://www.elastic.co
Process: 4932 ExecStart=/usr/share/elasticsearch/bin/elasticsearch -p ${PID_DIR}/elasticsearch.pid --quiet -Edefault.path.logs=${LOG_DIR} -Edefault.path.data=${DATA_DIR} -Edefault.path.conf=${CONF_DIR} (code=exited, status=1/FAILURE)
Process: 4930 ExecStartPre=/usr/share/elasticsearch/bin/elasticsearch-systemd-pre-exec (code=exited, status=0/SUCCESS)
Main PID: 4932 (code=exited, status=1/FAILURE)

Feb 02 17:23:48 vmc8f9ab50.dev.sopra.asip.hst.fluxus.net elasticsearch[4932]: at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121)
Feb 02 17:23:48 vmc8f9ab50.dev.sopra.asip.hst.fluxus.net elasticsearch[4932]: at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112)
Feb 02 17:23:48 vmc8f9ab50.dev.sopra.asip.hst.fluxus.net elasticsearch[4932]: at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54)
Feb 02 17:23:48 vmc8f9ab50.dev.sopra.asip.hst.fluxus.net elasticsearch[4932]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122)
Feb 02 17:23:48 vmc8f9ab50.dev.sopra.asip.hst.fluxus.net elasticsearch[4932]: at org.elasticsearch.cli.Command.main(Command.java:88)
Feb 02 17:23:48 vmc8f9ab50.dev.sopra.asip.hst.fluxus.net elasticsearch[4932]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89)
Feb 02 17:23:48 vmc8f9ab50.dev.sopra.asip.hst.fluxus.net elasticsearch[4932]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82)
Feb 02 17:23:48 vmc8f9ab50.dev.sopra.asip.hst.fluxus.net elasticsearch[4932]: Refer to the log for complete error details.
Feb 02 17:23:48 vmc8f9ab50.dev.sopra.asip.hst.fluxus.net systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Feb 02 17:23:48 vmc8f9ab50.dev.sopra.asip.hst.fluxus.net systemd[1]: Unit elasticsearch.service entered failed state.

I read several topics concerning not start but none solved my problem.

Thank you for reading and help ^_^.

Check the actual ES log rather than this one, usually under /var/log/elasticsearch.

this is the log file
[2017-02-02T15:08:43,594][INFO ][o.e.n.Node ] [node-1] initializing ...
[2017-02-02T15:08:43,649][INFO ][o.e.e.NodeEnvironment ] [node-1] using [1] data paths, mounts [[/var (/dev/mapper/vg_root-lv_var)]], net usable_space [590.9mb], net total_space [975.8mb], spins? [possibly], types [ext4]
[2017-02-02T15:08:43,649][INFO ][o.e.e.NodeEnvironment ] [node-1] heap size [1.9gb], compressed ordinary object pointers [true]
[2017-02-02T15:08:43,650][INFO ][o.e.n.Node ] [node-1] node name [node-1], node ID [45YU-ETaR82DhoEfzcFs1A]
[2017-02-02T15:08:43,651][INFO ][o.e.n.Node ] [node-1] version[5.2.0], pid[2831], build[24e05b9/2017-01-24T19:52:35.800Z], OS[Linux/3.10.0-229.7.2.el7.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_31/25.31-b07]
[2017-02-02T15:08:44,459][ERROR][o.e.b.Bootstrap ] Exception
java.lang.IllegalStateException: Could not load plugin descriptor for existing plugin [head]. Was the plugin built before 2.0?
at org.elasticsearch.plugins.PluginsService.getPluginBundles(PluginsService.java:295) ~[elasticsearch-5.2.0.jar:5.2.0]
at org.elasticsearch.plugins.PluginsService.(PluginsService.java:131) ~[elasticsearch-5.2.0.jar:5.2.0]
at org.elasticsearch.node.Node.(Node.java:297) ~[elasticsearch-5.2.0.jar:5.2.0]
at org.elasticsearch.node.Node.(Node.java:232) ~[elasticsearch-5.2.0.jar:5.2.0]
at org.elasticsearch.bootstrap.Bootstrap$6.(Bootstrap.java:241) ~[elasticsearch-5.2.0.jar:5.2.0]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:241) ~[elasticsearch-5.2.0.jar:5.2.0]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) [elasticsearch-5.2.0.jar:5.2.0]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:121) [elasticsearch-5.2.0.jar:5.2.0]
at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:112) [elasticsearch-5.2.0.jar:5.2.0]
at org.elasticsearch.cli.SettingCommand.execute(SettingCommand.java:54) [elasticsearch-5.2.0.jar:5.2.0]
at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) [elasticsearch-5.2.0.jar:5.2.0]
at org.elasticsearch.cli.Command.main(Command.java:88) [elasticsearch-5.2.0.jar:5.2.0]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:89) [elasticsearch-5.2.0.jar:5.2.0]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:82) [elasticsearch-5.2.0.jar:5.2.0]
Caused by: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/plugins/head/plugin-descriptor.properties
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[?:?]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[?:?]
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214) ~[?:?]
at java.nio.file.Files.newByteChannel(Files.java:361) ~[?:1.8.0_31]
at java.nio.file.Files.newByteChannel(Files.java:407) ~[?:1.8.0_31]
at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:384) ~[?:1.8.0_31]
at java.nio.file.Files.newInputStream(Files.java:152) ~[?:1.8.0_31]
at org.elasticsearch.plugins.PluginInfo.readFromProperties(PluginInfo.java:86) ~[elasticsearch-5.2.0.jar:5.2.0]
at org.elasticsearch.plugins.PluginsService.getPluginBundles(PluginsService.java:292) ~[elasticsearch-5.2.0.jar:5.2.0]
... 13 more
[2017-02-02T15:08:44,465][WARN ][o.e.b.ElasticsearchUncaughtExceptionHandler] [node-1] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: Could not load plugin descriptor for existing plugin [head]. Was the plugin built before 2.0?

But it's a 16:32 and the starting failed was at 17:23:48 (Even if I tried several times to start it).
I will remove the plugin that looks badly installed and start again

That's why.

Adding that you can't install site plugins in elasticsearch: https://www.elastic.co/blog/running-site-plugins-with-elasticsearch-5-0

1 Like

Thank you all for your support. I fixed it.

After removing the plugin, it still does not start.
Being user root, the elasticsearch service starts with the elasticsearch user in default and the /etc/elasticsearch folder did not have sufficient rights. So I did a chmod 777 on /etc/elasticserach and this solved the problem.

I'm not sure that's such a great idea: you have given all users all rights on your ES settings. As far as I know chmod 777 is almost never a solution.

I doubt there is write-access needed? You could either chown the stuff that needs to be written, but better would be to just give some read access to users, or maybe something like 755 ?

Ok, i will follow your advise in the futtur. Thank

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.