When i use "systemctl start elasticsearch.service", don't work

Hello, i can't start elasticsearch in a ubuntu 22.04 vm in azure, there is the output of comands, thank you.

systemctl status elasticsearch.service

hive@TheHiveVM:~$ systemctl status elasticsearch.service
Γ— elasticsearch.service - Elasticsearch
     Loaded: loaded (/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Sat 2024-03-16 04:40:59 UTC; 38s ago
       Docs: https://www.elastic.co
    Process: 10619 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
   Main PID: 10619 (code=exited, status=1/FAILURE)
        CPU: 45.612s

Mar 16 04:40:58 TheHiveVM systemd-entrypoint[10619]:         at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
Mar 16 04:40:58 TheHiveVM systemd-entrypoint[10619]:         at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
Mar 16 04:40:58 TheHiveVM systemd-entrypoint[10619]:         at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
Mar 16 04:40:58 TheHiveVM systemd-entrypoint[10619]:         at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
Mar 16 04:40:58 TheHiveVM systemd-entrypoint[10619]:         at java.base/java.lang.Thread.run(Thread.java:1583)
Mar 16 04:40:58 TheHiveVM systemd-entrypoint[10619]: For complete error details, refer to the log at /var/log/elasticsearch/thehive.log
Mar 16 04:40:59 TheHiveVM systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 04:40:59 TheHiveVM systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Mar 16 04:40:59 TheHiveVM systemd[1]: Failed to start Elasticsearch.
Mar 16 04:40:59 TheHiveVM systemd[1]: elasticsearch.service: Consumed 45.612s CPU time.

journalctl -xeu elasticsearch.service :

hive@TheHiveVM:~$ journalctl -xeu elasticsearch.service
Mar 16 04:40:58 TheHiveVM systemd-entrypoint[10619]:         at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:260)
Mar 16 04:40:58 TheHiveVM systemd-entrypoint[10619]:         at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:356)
Mar 16 04:40:58 TheHiveVM systemd-entrypoint[10619]:         at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
Mar 16 04:40:58 TheHiveVM systemd-entrypoint[10619]:         at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
Mar 16 04:40:58 TheHiveVM systemd-entrypoint[10619]:         at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
Mar 16 04:40:58 TheHiveVM systemd-entrypoint[10619]:         at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
Mar 16 04:40:58 TheHiveVM systemd-entrypoint[10619]:         at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
Mar 16 04:40:58 TheHiveVM systemd-entrypoint[10619]:         at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
Mar 16 04:40:58 TheHiveVM systemd-entrypoint[10619]:         at java.base/java.lang.Thread.run(Thread.java:1583)
Mar 16 04:40:58 TheHiveVM systemd-entrypoint[10619]: For complete error details, refer to the log at /var/log/elasticsearch/thehive.log
Mar 16 04:40:59 TheHiveVM systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
β–‘β–‘ Subject: Unit process exited
β–‘β–‘ Defined-By: systemd
β–‘β–‘ Support: http://www.ubuntu.com/support
β–‘β–‘ 
β–‘β–‘ An ExecStart= process belonging to unit elasticsearch.service has exited.
β–‘β–‘ 
β–‘β–‘ The process' exit code is 'exited' and its exit status is 1.
Mar 16 04:40:59 TheHiveVM systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
β–‘β–‘ Subject: Unit failed
β–‘β–‘ Defined-By: systemd
β–‘β–‘ Support: http://www.ubuntu.com/support
β–‘β–‘ 
β–‘β–‘ The unit elasticsearch.service has entered the 'failed' state with result 'exit-code'.
Mar 16 04:40:59 TheHiveVM systemd[1]: Failed to start Elasticsearch.
β–‘β–‘ Subject: A start job for unit elasticsearch.service has failed
β–‘β–‘ Defined-By: systemd
β–‘β–‘ Support: http://www.ubuntu.com/support
β–‘β–‘ 
β–‘β–‘ A start job for unit elasticsearch.service has finished with a failure.
β–‘β–‘ 
β–‘β–‘ The job identifier is 5191 and the job result is failed.
Mar 16 04:40:59 TheHiveVM systemd[1]: elasticsearch.service: Consumed 45.612s CPU time.
β–‘β–‘ Subject: Resources consumed by unit runtime
β–‘β–‘ Defined-By: systemd
β–‘β–‘ Support: http://www.ubuntu.com/support
β–‘β–‘ 
β–‘β–‘ The unit elasticsearch.service completed and consumed the indicated resources.
lines 574-611/611 (END)

Hi @nperez51 Welcome to the community.

What version of the elasticsearch search?

As the error stated, you're going to need to look at the actual log file

/var/log/elasticsearch/thehive.log

Look for the start of the error and provide

You can also tail -f That log at startup

Also, it would help if you shared your elasticsearch.yml

Hello and welcome,

From the logs you shared it seems that systemd is not able to start the elasticsearch service, you need to check the reason directly on the /var/log/syslog file, you won't get this information using journalctl -xeu elasticsearch.service and probably you will also not have the reason on elasticsearch log.

You need to check the system log.

hello, thanks for help me, here is the info.

tail -f /var/log/elasticsearch/thehive.log :

hive@TheHiveVM:~$ sudo tail -f /var/log/elasticsearch/thehive.log
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[?:?]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) ~[?:?]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[?:?]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) [?:?]
[2024-03-16T16:52:03,959][INFO ][o.e.n.Node               ] [node-1] stopping ...
[2024-03-16T16:52:03,970][INFO ][o.e.n.Node               ] [node-1] stopped
[2024-03-16T16:52:03,970][INFO ][o.e.n.Node               ] [node-1] closing ...
[2024-03-16T16:52:03,988][INFO ][o.e.n.Node               ] [node-1] closed
[2024-03-16T16:52:03,990][INFO ][o.e.x.m.p.NativeController] [node-1] Native controller process has stopped - no new native processes can be started

elasticsearch.yml:

# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
#       Before you set out to tweak and tune the configuration, make sure you
#       understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
cluster.name: thehive
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
path.data: /var/lib/elasticsearch
#
# Path to log files:
#
path.logs: /var/log/elasticsearch
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# By default Elasticsearch is only accessible on localhost. Set a different
# address here to expose this node on the network:
#
network.host: 172.174.136.239
#
# By default Elasticsearch listens for HTTP traffic on the first free port it
# finds starting at 9200. Set a specific HTTP port here:
#
http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
#discovery.seed_hosts: ["host1", "host2"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
cluster.initial_master_nodes: ["node-1"]
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
#
# ---------------------------------- Security ----------------------------------
#
#                                 *** WARNING ***
#
# Elasticsearch security features are not enabled by default.
# These features are free, but require configuration changes to enable them.
# This means that users don’t have to provide credentials and can get full access
# to the cluster. Network connections are also not encrypted.
#
# To protect your data, we strongly encourage you to enable the Elasticsearch security features. 
# Refer to the following documentation for instructions.
#
# https://www.elastic.co/guide/en/elasticsearch/reference/7.16/configuring-stack-security.html

Hello, thanks, here is the syslog, i used grep to filter.

Mar 16 03:43:05 TheHiveVM systemd-entrypoint[7497]: For complete error details, refer to the log at /var/log/elasticsearch/thehive.log
Mar 16 03:43:06 TheHiveVM systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 03:43:06 TheHiveVM systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Mar 16 03:43:06 TheHiveVM systemd[1]: elasticsearch.service: Consumed 43.899s CPU time.
Mar 16 03:45:31 TheHiveVM systemd-entrypoint[8591]: For complete error details, refer to the log at /var/log/elasticsearch/thehive.log
Mar 16 03:45:32 TheHiveVM systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 03:45:32 TheHiveVM systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Mar 16 03:45:32 TheHiveVM systemd[1]: elasticsearch.service: Consumed 43.721s CPU time.
Mar 16 03:51:38 TheHiveVM systemd-entrypoint[9723]: For complete error details, refer to the log at /var/log/elasticsearch/thehive.log
Mar 16 03:51:39 TheHiveVM systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 03:51:39 TheHiveVM systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Mar 16 03:51:39 TheHiveVM systemd[1]: elasticsearch.service: Consumed 43.685s CPU time.
Mar 16 03:55:37 TheHiveVM systemd-entrypoint[10161]: For complete error details, refer to the log at /var/log/elasticsearch/thehive.log
Mar 16 03:55:38 TheHiveVM systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 03:55:38 TheHiveVM systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Mar 16 03:55:38 TheHiveVM systemd[1]: elasticsearch.service: Consumed 43.666s CPU time.
Mar 16 03:59:05 TheHiveVM systemd-entrypoint[526]: For complete error details, refer to the log at /var/log/elasticsearch/thehive.log
Mar 16 03:59:06 TheHiveVM systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 03:59:06 TheHiveVM systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Mar 16 03:59:06 TheHiveVM systemd[1]: elasticsearch.service: Consumed 44.610s CPU time.
Mar 16 04:01:49 TheHiveVM systemd-entrypoint[1709]: For complete error details, refer to the log at /var/log/elasticsearch/thehive.log
Mar 16 04:01:50 TheHiveVM systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 04:01:50 TheHiveVM systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Mar 16 04:01:50 TheHiveVM systemd[1]: elasticsearch.service: Consumed 43.860s CPU time.
Mar 16 04:06:39 TheHiveVM systemd-entrypoint[1953]: For complete error details, refer to the log at /var/log/elasticsearch/thehive.log
Mar 16 04:06:40 TheHiveVM systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 04:06:40 TheHiveVM systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Mar 16 04:06:40 TheHiveVM systemd[1]: elasticsearch.service: Consumed 43.017s CPU time.
Mar 16 04:21:51 TheHiveVM systemd-entrypoint[7803]: For complete error details, refer to the log at /var/log/elasticsearch/thehive.log
Mar 16 04:21:52 TheHiveVM systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 04:21:52 TheHiveVM systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Mar 16 04:21:52 TheHiveVM systemd[1]: elasticsearch.service: Consumed 43.896s CPU time.
Mar 16 04:29:50 TheHiveVM systemd-entrypoint[9620]: For complete error details, refer to the log at /var/log/elasticsearch/thehive.log
Mar 16 04:29:51 TheHiveVM systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 04:29:51 TheHiveVM systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Mar 16 04:29:51 TheHiveVM systemd[1]: elasticsearch.service: Consumed 43.791s CPU time.
Mar 16 04:40:58 TheHiveVM systemd-entrypoint[10619]: For complete error details, refer to the log at /var/log/elasticsearch/thehive.log
Mar 16 04:40:59 TheHiveVM systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 04:40:59 TheHiveVM systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Mar 16 04:40:59 TheHiveVM systemd[1]: elasticsearch.service: Consumed 45.612s CPU time.
Mar 16 04:52:29 TheHiveVM systemd-entrypoint[11516]: For complete error details, refer to the log at /var/log/elasticsearch/thehive.log
Mar 16 04:52:30 TheHiveVM systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 04:52:30 TheHiveVM systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Mar 16 04:52:30 TheHiveVM systemd[1]: elasticsearch.service: Consumed 44.001s CPU time.
Mar 16 05:04:41 TheHiveVM systemd-entrypoint[13169]: For complete error details, refer to the log at /var/log/elasticsearch/thehive.log
Mar 16 05:04:42 TheHiveVM systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 05:04:42 TheHiveVM systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Mar 16 05:04:42 TheHiveVM systemd[1]: elasticsearch.service: Consumed 43.715s CPU time.
Mar 16 16:48:59 TheHiveVM systemd-entrypoint[595]: For complete error details, refer to the log at /var/log/elasticsearch/thehive.log
Mar 16 16:49:00 TheHiveVM systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 16:49:00 TheHiveVM systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Mar 16 16:49:00 TheHiveVM systemd[1]: elasticsearch.service: Consumed 42.828s CPU time.
Mar 16 16:52:03 TheHiveVM systemd-entrypoint[2630]: For complete error details, refer to the log at /var/log/elasticsearch/thehive.log
Mar 16 16:52:04 TheHiveVM systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 16:52:04 TheHiveVM systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Mar 16 16:52:04 TheHiveVM systemd[1]: elasticsearch.service: Consumed 43.189s CPU time.

Do not use grep, the error may not mention elasticsearch and you may not get it.

Try to start it again to generate fresh logs and then look at the system logs for the logs that happened on the same time interval and share the recent logs.

Also check the /var/log/elasticsearch/thehive.log file, depending on the issue it may be there.

It really depends on where the initialization is failing, sometimes it is failing before elasticsearch can log and you will only have the issue on the system log.

Leonardo, thanks, this is fresh logs.

this is from syslog

Mar 16 17:59:36 TheHiveVM systemd[1]: Starting Elasticsearch...
Mar 16 17:59:41 TheHiveVM systemd-entrypoint[10693]: Mar 16, 2024 5:59:41 PM sun.util.locale.provider.LocaleProviderAdapter <clinit>
Mar 16 17:59:41 TheHiveVM systemd-entrypoint[10693]: WARNING: COMPAT locale provider will be removed in a future release
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: uncaught exception in thread [main]
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: BindTransportException[Failed to bind to 20.121.135.119:[9300-9400]]; nested: BindException[Cannot assign requested address];
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: Likely root cause: java.net.BindException: Cannot assign requested address
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: #011at java.base/sun.nio.ch.Net.bind0(Native Method)
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: #011at java.base/sun.nio.ch.Net.bind(Net.java:565)
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: #011at java.base/sun.nio.ch.ServerSocketChannelImpl.netBind(ServerSocketChannelImpl.java:344)
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: #011at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:301)
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: #011at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:141)
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: #011at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:562)
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: #011at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334)
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: #011at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:600)
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: #011at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:579)
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: #011at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973)
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: #011at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:260)
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: #011at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:356)
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: #011at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: #011at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: #011at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: #011at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: #011at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: #011at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: #011at java.base/java.lang.Thread.run(Thread.java:1583)
Mar 16 18:00:00 TheHiveVM systemd-entrypoint[10693]: For complete error details, refer to the log at /var/log/elasticsearch/thehive.log
Mar 16 18:00:01 TheHiveVM systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 18:00:01 TheHiveVM systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Mar 16 18:00:01 TheHiveVM systemd[1]: Failed to start Elasticsearch.
Mar 16 18:00:01 TheHiveVM systemd[1]: elasticsearch.service: Consumed 45.227s CPU time.
Mar 16 18:07:21 TheHiveVM systemd[1]: Starting Elasticsearch...
Mar 16 18:07:25 TheHiveVM systemd-entrypoint[11037]: Mar 16, 2024 6:07:25 PM sun.util.locale.provider.LocaleProviderAdapter <clinit>
Mar 16 18:07:25 TheHiveVM systemd-entrypoint[11037]: WARNING: COMPAT locale provider will be removed in a future release
Mar 16 18:07:42 TheHiveVM systemd-entrypoint[11037]: uncaught exception in thread [main]
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: BindTransportException[Failed to bind to 20.121.135.119:[9300-9400]]; nested: BindException[Cannot assign requested address];
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: Likely root cause: java.net.BindException: Cannot assign requested address
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: #011at java.base/sun.nio.ch.Net.bind0(Native Method)
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: #011at java.base/sun.nio.ch.Net.bind(Net.java:565)
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: #011at java.base/sun.nio.ch.ServerSocketChannelImpl.netBind(ServerSocketChannelImpl.java:344)
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: #011at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:301)
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: #011at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:141)
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: #011at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:562)
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: #011at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334)
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: #011at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:600)
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: #011at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:579)
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: #011at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973)
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: #011at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:260)
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: #011at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:356)
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: #011at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: #011at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: #011at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: #011at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: #011at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: #011at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: #011at java.base/java.lang.Thread.run(Thread.java:1583)
Mar 16 18:07:43 TheHiveVM systemd-entrypoint[11037]: For complete error details, refer to the log at /var/log/elasticsearch/thehive.log
Mar 16 18:07:43 TheHiveVM systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Mar 16 18:07:43 TheHiveVM systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Mar 16 18:07:43 TheHiveVM systemd[1]: Failed to start Elasticsearch.
Mar 16 18:07:43 TheHiveVM systemd[1]: elasticsearch.service: Consumed 42.417s CPU time.

this is from thehive.log :

[2024-03-16T18:00:00,906][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [node-1] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: BindTransportException[Failed to bind to 20.121.135.119:[9300-9400]]; nested: BindException[Cannot assign requested address];
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:173) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:160) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112) ~[elasticsearch-cli-7.17.18.jar:7.17.18]
        at org.elasticsearch.cli.Command.main(Command.java:77) ~[elasticsearch-cli-7.17.18.jar:7.17.18]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:125) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80) ~[elasticsearch-7.17.18.jar:7.17.18]
Caused by: org.elasticsearch.transport.BindTransportException: Failed to bind to 20.121.135.119:[9300-9400]
        at org.elasticsearch.transport.TcpTransport.bindToPort(TcpTransport.java:453) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.transport.TcpTransport.bindServer(TcpTransport.java:414) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.transport.netty4.Netty4Transport.doStart(Netty4Transport.java:141) ~[?:?]
        at org.elasticsearch.xpack.core.security.transport.netty4.SecurityNetty4Transport.doStart(SecurityNetty4Transport.java:96) ~[?:?]
        at org.elasticsearch.xpack.security.transport.netty4.SecurityNetty4ServerTransport.doStart(SecurityNetty4ServerTransport.java:59) ~[?:?]
        at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:48) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.transport.TransportService.doStart(TransportService.java:318) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:48) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.node.Node.start(Node.java:1176) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:335) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:443) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:169) ~[elasticsearch-7.17.18.jar:7.17.18]
        ... 6 more
Caused by: java.net.BindException: Cannot assign requested address
        at sun.nio.ch.Net.bind0(Native Method) ~[?:?]
        at sun.nio.ch.Net.bind(Net.java:565) ~[?:?]
        at sun.nio.ch.ServerSocketChannelImpl.netBind(ServerSocketChannelImpl.java:344) ~[?:?]
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:301) ~[?:?]
        at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:141) ~[?:?]
        at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:562) ~[?:?]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334) ~[?:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:600) ~[?:?]
        at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:579) ~[?:?]
        at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973) ~[?:?]
        at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:260) ~[?:?]
        at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:356) ~[?:?]
        at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[?:?]
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[?:?]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[?:?]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) ~[?:?]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[?:?]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) [?:?]
[2024-03-16T18:00:01,735][INFO ][o.e.n.Node               ] [node-1] stopping ...
[2024-03-16T18:00:01,749][INFO ][o.e.n.Node               ] [node-1] stopped
[2024-03-16T18:00:01,749][INFO ][o.e.n.Node               ] [node-1] closing ...
[2024-03-16T18:00:01,770][INFO ][o.e.n.Node               ] [node-1] closed
[2024-03-16T18:00:01,773][INFO ][o.e.x.m.p.NativeController] [node-1] Native controller process has stopped - no new native processes can be started
[2024-03-16T18:07:27,345][INFO ][o.e.n.Node               ] [node-1] version[7.17.18], pid[11037], build[default/deb/8682172c2130b9a411b1bd5ff37c9792367de6b0/2024-02-02T12:04:59.691750271Z], OS[Linux/6.5.0-1016-azure/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/21.0.2/21.0.2+13-58]
[2024-03-16T18:07:27,351][INFO ][o.e.n.Node               ] [node-1] JVM home [/usr/share/elasticsearch/jdk], using bundled JDK [true]
[2024-03-16T18:07:27,352][INFO ][o.e.n.Node               ] [node-1] JVM arguments [-Xshare:auto, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -XX:+ShowCodeDetailsInExceptionMessages, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j2.formatMsgNoLookups=true, -Djava.locale.providers=SPI,COMPAT, --add-opens=java.base/java.io=ALL-UNNAMED, -Djava.security.manager=allow, -XX:+UseG1GC, -Djava.io.tmpdir=/tmp/elasticsearch-5437591012355248053, -XX:+HeapDumpOnOutOfMemoryError, -XX:+ExitOnOutOfMemoryError, -XX:HeapDumpPath=/var/lib/elasticsearch, -XX:ErrorFile=/var/log/elasticsearch/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=/var/log/elasticsearch/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Xms7965m, -Xmx7965m, -XX:MaxDirectMemorySize=4177526784, -XX:G1HeapRegionSize=4m, -XX:InitiatingHeapOccupancyPercent=30, -XX:G1ReservePercent=15, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/etc/elasticsearch, -Des.distribution.flavor=default, -Des.distribution.type=deb, -Des.bundled_jdk=true]
[2024-03-16T18:07:30,818][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [aggs-matrix-stats]
[2024-03-16T18:07:30,819][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [analysis-common]
[2024-03-16T18:07:30,819][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [constant-keyword]
[2024-03-16T18:07:30,820][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [frozen-indices]
[2024-03-16T18:07:30,822][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [ingest-common]
[2024-03-16T18:07:30,822][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [ingest-geoip]
[2024-03-16T18:07:30,822][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [ingest-user-agent]
[2024-03-16T18:07:30,822][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [kibana]
[2024-03-16T18:07:30,823][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [lang-expression]
[2024-03-16T18:07:30,824][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [lang-mustache]
[2024-03-16T18:07:30,824][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [lang-painless]
[2024-03-16T18:07:30,825][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [legacy-geo]
[2024-03-16T18:07:30,825][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [mapper-extras]
[2024-03-16T18:07:30,826][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [mapper-version]
[2024-03-16T18:07:30,826][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [parent-join]
[2024-03-16T18:07:30,827][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [percolator]
[2024-03-16T18:07:30,827][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [rank-eval]
[2024-03-16T18:07:30,828][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [reindex]
[2024-03-16T18:07:30,828][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [repositories-metering-api]
[2024-03-16T18:07:30,828][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [repository-encrypted]
[2024-03-16T18:07:30,829][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [repository-url]
[2024-03-16T18:07:30,829][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [runtime-fields-common]
[2024-03-16T18:07:30,829][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [search-business-rules]
[2024-03-16T18:07:30,830][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [searchable-snapshots]
[2024-03-16T18:07:30,830][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [snapshot-repo-test-kit]
[2024-03-16T18:07:30,830][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [spatial]
[2024-03-16T18:07:30,830][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [systemd]
[2024-03-16T18:07:30,831][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [transform]
[2024-03-16T18:07:30,831][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [transport-netty4]
[2024-03-16T18:07:30,832][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [unsigned-long]
[2024-03-16T18:07:30,833][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [vector-tile]
[2024-03-16T18:07:30,833][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [vectors]
[2024-03-16T18:07:30,833][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [wildcard]
[2024-03-16T18:07:30,834][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-aggregate-metric]
[2024-03-16T18:07:30,834][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-analytics]
[2024-03-16T18:07:30,834][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-async]
[2024-03-16T18:07:30,834][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-async-search]
[2024-03-16T18:07:30,835][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-autoscaling]
[2024-03-16T18:07:30,835][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-ccr]
[2024-03-16T18:07:30,835][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-core]
[2024-03-16T18:07:30,836][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-data-streams]
[2024-03-16T18:07:30,836][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-deprecation]
[2024-03-16T18:07:30,837][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-enrich]
[2024-03-16T18:07:30,837][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-eql]
[2024-03-16T18:07:30,838][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-fleet]
[2024-03-16T18:07:30,838][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-graph]
[2024-03-16T18:07:30,838][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-identity-provider]
[2024-03-16T18:07:30,839][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-ilm]
[2024-03-16T18:07:30,839][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-logstash]
[2024-03-16T18:07:30,840][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-ml]
[2024-03-16T18:07:30,840][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-monitoring]
[2024-03-16T18:07:30,841][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-ql]
[2024-03-16T18:07:30,842][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-rollup]
[2024-03-16T18:07:30,843][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-security]
[2024-03-16T18:07:30,843][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-shutdown]
[2024-03-16T18:07:30,844][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-sql]
[2024-03-16T18:07:30,845][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-stack]
[2024-03-16T18:07:30,846][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-text-structure]
[2024-03-16T18:07:30,846][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-voting-only-node]
[2024-03-16T18:07:30,847][INFO ][o.e.p.PluginsService     ] [node-1] loaded module [x-pack-watcher]
[2024-03-16T18:07:30,848][INFO ][o.e.p.PluginsService     ] [node-1] no plugins loaded
[2024-03-16T18:07:30,907][INFO ][o.e.e.NodeEnvironment    ] [node-1] using [1] data paths, mounts [[/ (/dev/root)]], net usable_space [24.9gb], net total_space [28.8gb], types [ext4]
[2024-03-16T18:07:30,908][INFO ][o.e.e.NodeEnvironment    ] [node-1] heap size [7.7gb], compressed ordinary object pointers [true]
[2024-03-16T18:07:30,938][INFO ][o.e.n.Node               ] [node-1] node name [node-1], node ID [x47zJfPiQyqzrZYOq1QHFw], cluster name [thehive], roles [transform, data_frozen, master, remote_cluster_client, data, ml, data_content, data_hot, data_warm, data_cold, ingest]
[2024-03-16T18:07:38,022][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [node-1] [controller/11219] [Main.cc@122] controller (64 bit): Version 7.17.18 (Build a1014b051a9d63) Copyright (c) 2024 Elasticsearch BV
[2024-03-16T18:07:38,832][INFO ][o.e.x.s.a.s.FileRolesStore] [node-1] parsed [0] roles from file [/etc/elasticsearch/roles.yml]
[2024-03-16T18:07:39,990][INFO ][o.e.i.g.ConfigDatabases  ] [node-1] initialized default databases [[GeoLite2-Country.mmdb, GeoLite2-City.mmdb, GeoLite2-ASN.mmdb]], config databases [[]] and watching [/etc/elasticsearch/ingest-geoip] for changes
[2024-03-16T18:07:39,991][INFO ][o.e.i.g.DatabaseNodeService] [node-1] initialized database registry, using geoip-databases directory [/tmp/elasticsearch-5437591012355248053/geoip-databases/x47zJfPiQyqzrZYOq1QHFw]
[2024-03-16T18:07:40,834][INFO ][o.e.t.NettyAllocator     ] [node-1] creating NettyAllocator with the following configs: [name=elasticsearch_configured, chunk_size=1mb, suggested_max_allocation_size=1mb, factors={es.unsafe.use_netty_default_chunk_and_page_size=false, g1gc_enabled=true, g1gc_region_size=4mb}]
[2024-03-16T18:07:40,881][INFO ][o.e.i.r.RecoverySettings ] [node-1] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]
[2024-03-16T18:07:40,942][INFO ][o.e.d.DiscoveryModule    ] [node-1] using discovery type [zen] and seed hosts providers [settings]
[2024-03-16T18:07:41,718][INFO ][o.e.g.DanglingIndicesState] [node-1] gateway.auto_import_dangling_indices is disabled, dangling indices will not be automatically detected or imported and must be managed manually
[2024-03-16T18:07:42,749][INFO ][o.e.n.Node               ] [node-1] initialized
[2024-03-16T18:07:42,750][INFO ][o.e.n.Node               ] [node-1] starting ...
[2024-03-16T18:07:42,771][INFO ][o.e.x.s.c.f.PersistentCache] [node-1] persistent cache index loaded
[2024-03-16T18:07:42,772][INFO ][o.e.x.d.l.DeprecationIndexingComponent] [node-1] deprecation component started
[2024-03-16T18:07:42,988][ERROR][o.e.b.Bootstrap          ] [node-1] Exception
org.elasticsearch.transport.BindTransportException: Failed to bind to 20.121.135.119:[9300-9400]
        at org.elasticsearch.transport.TcpTransport.bindToPort(TcpTransport.java:453) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.transport.TcpTransport.bindServer(TcpTransport.java:414) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.transport.netty4.Netty4Transport.doStart(Netty4Transport.java:141) ~[?:?]
        at org.elasticsearch.xpack.core.security.transport.netty4.SecurityNetty4Transport.doStart(SecurityNetty4Transport.java:96) ~[?:?]
        at org.elasticsearch.xpack.security.transport.netty4.SecurityNetty4ServerTransport.doStart(SecurityNetty4ServerTransport.java:59) ~[?:?]
        at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:48) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.transport.TransportService.doStart(TransportService.java:318) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:48) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.node.Node.start(Node.java:1176) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:335) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:443) [elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:169) [elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:160) [elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77) [elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112) [elasticsearch-cli-7.17.18.jar:7.17.18]
        at org.elasticsearch.cli.Command.main(Command.java:77) [elasticsearch-cli-7.17.18.jar:7.17.18]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:125) [elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80) [elasticsearch-7.17.18.jar:7.17.18]
Caused by: java.net.BindException: Cannot assign requested address
        at sun.nio.ch.Net.bind0(Native Method) ~[?:?]
        at sun.nio.ch.Net.bind(Net.java:565) ~[?:?]
        at sun.nio.ch.ServerSocketChannelImpl.netBind(ServerSocketChannelImpl.java:344) ~[?:?]
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:301) ~[?:?]
        at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:141) ~[?:?]
        at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:562) ~[?:?]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334) ~[?:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:600) ~[?:?]
        at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:579) ~[?:?]
        at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973) ~[?:?]
        at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:260) ~[?:?]
        at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:356) ~[?:?]
        at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[?:?]
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[?:?]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[?:?]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) ~[?:?]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[?:?]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) ~[?:?]
[2024-03-16T18:07:42,996][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [node-1] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: BindTransportException[Failed to bind to 20.121.135.119:[9300-9400]]; nested: BindException[Cannot assign requested address];
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:173) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:160) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112) ~[elasticsearch-cli-7.17.18.jar:7.17.18]
        at org.elasticsearch.cli.Command.main(Command.java:77) ~[elasticsearch-cli-7.17.18.jar:7.17.18]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:125) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80) ~[elasticsearch-7.17.18.jar:7.17.18]
Caused by: org.elasticsearch.transport.BindTransportException: Failed to bind to 20.121.135.119:[9300-9400]
        at org.elasticsearch.transport.TcpTransport.bindToPort(TcpTransport.java:453) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.transport.TcpTransport.bindServer(TcpTransport.java:414) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.transport.netty4.Netty4Transport.doStart(Netty4Transport.java:141) ~[?:?]
        at org.elasticsearch.xpack.core.security.transport.netty4.SecurityNetty4Transport.doStart(SecurityNetty4Transport.java:96) ~[?:?]
        at org.elasticsearch.xpack.security.transport.netty4.SecurityNetty4ServerTransport.doStart(SecurityNetty4ServerTransport.java:59) ~[?:?]
        at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:48) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.transport.TransportService.doStart(TransportService.java:318) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.common.component.AbstractLifecycleComponent.start(AbstractLifecycleComponent.java:48) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.node.Node.start(Node.java:1176) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:335) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:443) ~[elasticsearch-7.17.18.jar:7.17.18]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:169) ~[elasticsearch-7.17.18.jar:7.17.18]
        ... 6 more
Caused by: java.net.BindException: Cannot assign requested address
        at sun.nio.ch.Net.bind0(Native Method) ~[?:?]
        at sun.nio.ch.Net.bind(Net.java:565) ~[?:?]
        at sun.nio.ch.ServerSocketChannelImpl.netBind(ServerSocketChannelImpl.java:344) ~[?:?]
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:301) ~[?:?]
        at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:141) ~[?:?]
        at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:562) ~[?:?]
        at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1334) ~[?:?]
        at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:600) ~[?:?]
        at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:579) ~[?:?]
        at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:973) ~[?:?]
        at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:260) ~[?:?]
        at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:356) ~[?:?]
        at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[?:?]
        at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[?:?]
        at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[?:?]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) ~[?:?]
        at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[?:?]
        at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) [?:?]
[2024-03-16T18:07:43,802][INFO ][o.e.n.Node               ] [node-1] stopping ...
[2024-03-16T18:07:43,812][INFO ][o.e.n.Node               ] [node-1] stopped
[2024-03-16T18:07:43,813][INFO ][o.e.n.Node               ] [node-1] closing ...
[2024-03-16T18:07:43,832][INFO ][o.e.n.Node               ] [node-1] closed
[2024-03-16T18:07:43,834][INFO ][o.e.x.m.p.NativeController] [node-1] Native controller process has stopped - no new native processes can be started

This is your error.

This is a public address, for elasticsearch to try to bind to this address you would need to put it into the elasticsearch.yml, but the file you shared does not have this IP address.

Did you share the correct file or did you change it?

To be able to bind to an IP address, the elasticsearch service needs that the IP address is available on some network interface in the server, which is not the case here.

You need to check your elasticsearch.yml to validate if you are using only internal ip address available on your server, or just set network.host as 0.0.0.0 to bind to any IP available on the host.

2 Likes

Leandro and Stephen, thank you very much for your help, check the configuration of elasticsearch.yml, the IP was different, since I removed the VM and make a new installation, in the network host part I left it as 0.0.0.0, and so I can access through the internet, thanks.

Keep in mind that if you expose your cluster to the public internet without security enable your data can be acessed by anyone.

2 Likes

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