Just installed ElasticSearch 7.10 in a virtual machine this morning, and I noticed that when rebooting every time, ElasticSearch service was failed due to timeout.
Screenshot:
Full log:
Warning: The unit file, source configuration file or drop-ins of elasticsearch.service changed on disk. Run 'systemctl daemon-reload' to reload units.
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: enabled)
Active: failed (Result: timeout) since Tue 2020-12-08 09:18:55 CST; 24min ago
Docs: https://www.elastic.co
Process: 889 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet (code=killed, signal=TERM)
Main PID: 889 (code=killed, signal=TERM)
Tasks: 0 (limit: 3570)
CGroup: /system.slice/elasticsearch.service
Dec 08 09:17:40 terrylin systemd[1]: Starting Elasticsearch...
Dec 08 09:18:55 terrylin systemd[1]: elasticsearch.service: Start operation timed out. Terminating.
Dec 08 09:18:55 terrylin systemd[1]: elasticsearch.service: Failed with result 'timeout'.
Dec 08 09:18:55 terrylin systemd[1]: Failed to start Elasticsearch.
Edit the configuation file of the ElasticSearch service.
$ vi /usr/lib/systemd/system/elasticsearch.service
TimeoutStartSec
configures the time to wait for start-up. The default is 90 seconds, increase this value to a proper value, in my case, I set it to 500.
Save the file and then reload systemd manager configuration.
$ systemctl daemon-reload
Check the timeout value for start-up.
$ systemctl show elasticsearch | grep ^Timeout
TimeoutStartUSec=8min 20s
TimeoutStopUSec=infinity
Now, problem is solved.
Comments