Unit elasticsearch.service has failed to start on centos 7

Can you please help?

rpm -qa|grep elasticsearch
elasticsearch-7.15.2-1.x86_64

Nov 25 23:20:01 vps.ovh.net crond[2260]: WARNING: RunAsUser for MSP ignored, check group ids (egid=48, want=51)
Nov 25 23:20:01 vps.ovh.net crond[2260]: Program mode requires special privileges, e.g., root or TrustedUser.
Nov 25 23:20:01 vps.ovh.net CROND[14236]: (apache) MAIL (mailed 92 bytes of output but got status 0x004e
                                                       )
Nov 25 23:20:02 vps.ovh.net systemd-entrypoint[14098]: Exception in thread "main" java.nio.file.AccessDeniedException: /etc/elasticsearch/elasticsearch.keystore
Nov 25 23:20:02 vps.ovh.net systemd-entrypoint[14098]: at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
Nov 25 23:20:02 vps.ovh.net systemd-entrypoint[14098]: at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
Nov 25 23:20:02 .vps.ovh.net systemd-entrypoint[14098]: at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
Nov 25 23:20:02 vps.ovh.net systemd-entrypoint[14098]: at java.base/sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:182)
Nov 25 23:20:02 .vps.ovh.net systemd-entrypoint[14098]: at java.base/java.nio.channels.FileChannel.open(FileChannel.java:298)
Nov 25 23:20:02 vps.ovh.net systemd-entrypoint[14098]: at java.base/java.nio.channels.FileChannel.open(FileChannel.java:357)
Nov 25 23:20:02 vps.ovh.net systemd-entrypoint[14098]: at org.apache.lucene.store.NIOFSDirectory.openInput(NIOFSDirectory.java:83)
Nov 25 23:20:02 vps.ovh.net systemd-entrypoint[14098]: at org.elasticsearch.common.settings.KeyStoreWrapper.load(KeyStoreWrapper.java:210)
Nov 25 23:20:02 vps.ovh.net systemd-entrypoint[14098]: at org.elasticsearch.common.settings.HasPasswordKeyStoreCommand.execute(HasPasswordKeyStoreCommand.java:32)
Nov 25 23:20:02 ]vps.ovh.net systemd-entrypoint[14098]: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75)
Nov 25 23:20:02 .vps.ovh.net systemd-entrypoint[14098]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:114)
Nov 25 23:20:02 vps.ovh.net systemd-entrypoint[14098]: at org.elasticsearch.cli.MultiCommand.execute(MultiCommand.java:95)
Nov 25 23:20:02 vps.ovh.net systemd-entrypoint[14098]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:114)
Nov 25 23:20:02 vps.ovh.net systemd-entrypoint[14098]: at org.elasticsearch.cli.Command.main(Command.java:79)
Nov 25 23:20:02 vps.ovh.net systemd-entrypoint[14098]: at org.elasticsearch.common.settings.KeyStoreCli.main(KeyStoreCli.java:32)
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: WARNING: A terminally deprecated method in java.lang.System has been called
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: WARNING: System::setSecurityManager has been called by org.elasticsearch.bootstrap.Elasticsearch (file:/usr/share/elasticsearch/lib/elasticsearch-7.15.2.jar)
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: WARNING: Please consider reporting this to the maintainers of org.elasticsearch.bootstrap.Elasticsearch
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: WARNING: System::setSecurityManager will be removed in a future release
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: Exception in thread "main" org.elasticsearch.bootstrap.BootstrapException: java.nio.file.AccessDeniedException: /etc/elasticsearch/elasticsearch.keystore
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: Likely root cause: java.nio.file.AccessDeniedException: /etc/elasticsearch/elasticsearch.keystore
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: at java.base/sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:182)
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: at java.base/java.nio.channels.FileChannel.open(FileChannel.java:298)
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: at java.base/java.nio.channels.FileChannel.open(FileChannel.java:357)
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: at org.apache.lucene.store.NIOFSDirectory.openInput(NIOFSDirectory.java:83)
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: at org.elasticsearch.common.settings.KeyStoreWrapper.load(KeyStoreWrapper.java:210)
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: at org.elasticsearch.bootstrap.Bootstrap.loadSecureSettings(Bootstrap.java:236)
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: at org.elasticsearch.bootstrap.Bootstrap.loadSecureSettings(Bootstrap.java:230)
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:345)
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:167)
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:158)
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75)
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:114)
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: at org.elasticsearch.cli.Command.main(Command.java:79)
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:123)
Nov 25 23:20:06 vps.ovh.net systemd-entrypoint[14098]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81)
Nov 25 23:20:07 vps.ovh.net systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Nov 25 23:20:07 vps.ovh.net systemd[1]: Failed to start Elasticsearch.
-- Subject: Unit elasticsearch.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit elasticsearch.service has failed.
--
-- The result is failed.
Nov 25 23:20:07 vps.ovh.net systemd[1]: Unit elasticsearch.service entered failed state.
Nov 25 23:20:07 vps.ovh.net systemd[1]: elasticsearch.service failed.
Nov 25 23:20:07 vps.ovh.net polkitd[601]: Unregistered Authentication Agent for unix-process:14092:608728813 (system bus name :1.849772, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disco
l

can you please help ?

Welcome to our community! :smiley:

Can you check that?