Elasticsearch.service

Hello;
I install Elasticsearch on my Azure VM and I tried to start the service but it failed to start I only edit the network host and enable the port in elasticsearch.yml file nothing more so please find below the logs ;
"elasticsearch status"

root@soc:/etc/elasticsearch# systemctl status elasticsearch.service
× elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Mon 2024-11-04 21:54:00 UTC; 1min 33s ago
Docs: https://www.elastic.co
Process: 1966 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
Main PID: 1966 (code=exited, status=1/FAILURE)
CPU: 1min 10.456s

Nov 04 21:53:21 soc systemd[1]: Starting elasticsearch.service - Elasticsearch...
Nov 04 21:53:27 soc systemd-entrypoint[1966]: Nov 04, 2024 9:53:27 PM sun.util.locale.provider.LocaleProviderAdapter
Nov 04 21:53:27 soc systemd-entrypoint[1966]: WARNING: COMPAT locale provider will be removed in a future release
Nov 04 21:53:57 soc systemd-entrypoint[1966]: ERROR: Elasticsearch did not exit normally - check the logs at /var/log/elasticsearch/elasticsearch.log
Nov 04 21:54:00 soc systemd-entrypoint[1966]: ERROR: Elasticsearch died while starting up, with exit code 1
Nov 04 21:54:00 soc systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE
Nov 04 21:54:00 soc systemd[1]: elasticsearch.service: Failed with result 'exit-code'.
Nov 04 21:54:00 soc systemd[1]: Failed to start elasticsearch.service - Elasticsearch.
Nov 04 21:54:00 soc systemd[1]: elasticsearch.service: Consumed 1min 10.456s CPU time.

And I run this command: journalctl -u elasticsearch.service

Nov 04 21:53:21 soc systemd[1]: Starting elasticsearch.service - Elasticsearch...

Nov 04 21:53:27 soc systemd-entrypoint[1966]: Nov 04, 2024 9:53:27 PM sun.util.locale.provider.LocaleProviderAdapter

Nov 04 21:53:27 soc systemd-entrypoint[1966]: WARNING: COMPAT locale provider will be removed in a future release

Nov 04 21:53:57 soc systemd-entrypoint[1966]: ERROR: Elasticsearch did not exit normally - check the logs at /var/log/elasticsearch/elasticsearch.log

Nov 04 21:54:00 soc systemd-entrypoint[1966]: ERROR: Elasticsearch died while starting up, with exit code 1

Nov 04 21:54:00 soc systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE

Nov 04 21:54:00 soc systemd[1]: elasticsearch.service: Failed with result 'exit-code'.

Nov 04 21:54:00 soc systemd[1]: Failed to start elasticsearch.service - Elasticsearch.

Nov 04 21:54:00 soc systemd[1]: elasticsearch.service: Consumed 1min 10.456s CPU time.

-- Boot 1dab423ab8f84b5caa6e676fc5296020 --

Nov 05 06:03:11 soc systemd[1]: Starting elasticsearch.service - Elasticsearch...

Nov 05 06:03:23 soc systemd-entrypoint[774]: Nov 05, 2024 6:03:23 AM sun.util.locale.provider.LocaleProviderAdapter

Nov 05 06:03:23 soc systemd-entrypoint[774]: WARNING: COMPAT locale provider will be removed in a future release

Nov 05 06:03:56 soc systemd-entrypoint[774]: ERROR: Elasticsearch did not exit normally - check the logs at /var/log/elasticsearch/elasticsearch.log

Nov 05 06:03:59 soc systemd-entrypoint[774]: ERROR: Elasticsearch died while starting up, with exit code 1

Nov 05 06:03:59 soc systemd[1]: elasticsearch.service: Main process exited, code=exited, status=1/FAILURE

Nov 05 06:03:59 soc systemd[1]: elasticsearch.service: Failed with result 'exit-code'.

Nov 05 06:03:59 soc systemd[1]: Failed to start elasticsearch.service - Elasticsearch.

Nov 05 06:03:59 soc systemd[1]: elasticsearch.service: Consumed 1min 6.865s CPU time.
/

please note that I only have one node also I didn't enable it from elasticsearch.yml file.

thanks in advance for your help because I am new in elasticsearch.

From Elastic Search to Elasticsearch

Welcome!

I think you need to share also the Elasticsearch logs.

Thanks a lot for your quick reply but I changed the IP address in configuration file to local IP not the public IP and it started normally

Now I will continue my installation and I hope I can reach the server from outside with local IP