OS : CentOS7.9
타임아웃으로 실행이 안되는 상황
sudo service elasticsearch start
Starting elasticsearch (via systemctl): Job for elasticsearch.service failed because a timeout was exceeded. See "systemctl status elasticsearch.service" and "journalctl -xe" for details.
[FAILED]
[root@oracloud opc]# journalctl -xe
12월 17 08:30:01 oracloud CROND[21293]: (root) CMD (/usr/lib64/sa/sa1 1 1)
12월 17 08:30:01 oracloud CROND[21294]: (root) CMD (export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:
12월 17 08:38:10 oracloud polkitd[1276]: Registered Authentication Agent for unix-process:23365:15921172 (system bus nam
12월 17 08:38:10 oracloud systemd[1]: Starting Elasticsearch...
-- Subject: Unit elasticsearch.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit elasticsearch.service has begun starting up.
12월 17 08:38:10 oracloud kernel: xfs filesystem being remounted at /tmp supports timestamps until 2038 (0x7fffffff)
12월 17 08:38:10 oracloud kernel: xfs filesystem being remounted at /var/tmp supports timestamps until 2038 (0x7fffffff)
12월 17 08:39:25 oracloud systemd[1]: elasticsearch.service start operation timed out. Terminating.
12월 17 08:39:25 oracloud systemd[1]: Failed to start Elasticsearch.
-- Subject: Unit elasticsearch.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
타임아웃 시간을 늘리는 방법
1. sudo systemctl show elasticsearch | grep ^Timeout
TimeoutStartUSec=1min 15s
TimeoutStopUSec=0
2. sudo mkdir /etc/systemd/system/elasticsearch.service.d
3. echo -e "[Service]\nTimeoutStartSec=180" | sudo tee /etc/systemd/system/elasticsearch.service.d/startup-timeout.conf
[Service]
TimeoutStartSec=180
4. sudo systemctl daemon-reload
5. sudo systemctl show elasticsearch | grep ^Timeout
TimeoutStartUSec=3min
TimeoutStopUSec=0
6. sudo service elasticsearch start
Starting elasticsearch (via systemctl): [ OK ]
'DevOpt' 카테고리의 다른 글
Tomcat Deploy Script on Jenkins (0) | 2021.12.17 |
---|---|
Tomcat Log (0) | 2021.12.17 |