Problem on starting elasticsearch

root@elastic:~# systemctl status elasticsearch.service
● elasticsearch.service - Elasticsearch
     Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2022-05-04 07:54:11 UTC; 16min ago
       Docs: https://www.elastic.co
    Process: 56285 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
   Main PID: 56285 (code=exited, status=1/FAILURE)

mai 04 07:54:10 elastic systemd-entrypoint[56285]:         at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
mai 04 07:54:10 elastic systemd-entrypoint[56285]:         at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
mai 04 07:54:10 elastic systemd-entrypoint[56285]:         at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
mai 04 07:54:10 elastic systemd-entrypoint[56285]:         at org.elasticsearch.node.Node.<init>(Node.java:691)
mai 04 07:54:10 elastic systemd-entrypoint[56285]:         at org.elasticsearch.node.Node.<init>(Node.java:284)
mai 04 07:54:10 elastic systemd-entrypoint[56285]:         <<<truncated>>>
mai 04 07:54:10 elastic systemd-entrypoint[56285]: For complete error details, refer to the log at /var/log/elasticsearch/elasticsearch.log
mai 04 07:54:11 elastic systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
mai 04 07:54:11 elastic systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
mai 04 07:54:11 elastic systemd[1]: Failed to start Elasticsearch.
root@elastic:~# journalctl -u elasticsearch.service
-- Logs begin at Sun 2022-05-01 09:27:10 UTC, end at Wed 2022-05-04 08:11:10 UTC. --
mai 01 10:09:48 elastic systemd[1]: Starting Elasticsearch...
mai 01 10:10:52 elastic systemd[1]: Started Elasticsearch.
mai 01 17:35:40 elastic systemd[1]: Stopping Elasticsearch...
mai 01 17:35:45 elastic systemd[1]: elasticsearch.service: Succeeded.
mai 01 17:35:45 elastic systemd[1]: Stopped Elasticsearch.
mai 01 17:35:45 elastic systemd[1]: Starting Elasticsearch...
mai 01 17:37:00 elastic systemd[1]: elasticsearch.service: start operation timed out. Terminating.
mai 01 17:37:00 elastic systemd[1]: elasticsearch.service: Failed with result 'timeout'.
mai 01 17:37:00 elastic systemd[1]: Failed to start Elasticsearch.
mai 01 17:38:07 elastic systemd[1]: Starting Elasticsearch...
mai 01 17:39:12 elastic systemd-entrypoint[11008]: uncaught exception in thread [main]
mai 01 17:39:12 elastic systemd-entrypoint[11008]: org.elasticsearch.http.BindHttpException: Failed to resolve host [[_local_, 0.0.0.0_]]
mai 01 17:39:12 elastic systemd-entrypoint[11008]: Likely root cause: java.net.UnknownHostException: 0.0.0.0_: Name or service not known
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:52)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at java.base/java.net.InetAddress$PlatformResolver.lookupByName(InetAddress.java:1048)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1638)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:997)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1628)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1494)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at org.elasticsearch.common.network.NetworkService.resolveInternal(NetworkService.java:267)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at org.elasticsearch.common.network.NetworkService.resolveInetAddresses(NetworkService.java:215)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at org.elasticsearch.common.network.NetworkService.resolveBindHostAddresses(NetworkService.java:124)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at org.elasticsearch.http.AbstractHttpServerTransport.bindServer(AbstractHttpServerTransport.java:160)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at org.elasticsearch.http.netty4.Netty4HttpServerTransport.doStart(Netty4HttpServerTransport.java:248)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at org.elasticsearch.xpack.security.transport.netty4.SecurityNetty4HttpServerTransport.doStart(SecurityNetty>
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:48)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at org.elasticsearch.node.Node.start(Node.java:1221)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:272)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:367)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:166)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:157)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at org.elasticsearch.common.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:81)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at org.elasticsearch.cli.Command.main(Command.java:77)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:122)
mai 01 17:39:12 elastic systemd-entrypoint[11008]:         at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80)
mai 01 17:39:12 elastic systemd-entrypoint[11008]: For complete error details, refer to the log at /var/log/elasticsearch/elasticsearch.log
mai 01 17:39:23 elastic systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
mai 01 17:39:23 elastic systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
mai 01 17:39:23 elastic systemd[1]: Failed to start Elasticsearch.
mai 01 17:53:09 elastic systemd[1]: Starting Elasticsearch...

Please don't just post a set of logs with no other context.

Looks like your config is wrong;

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