WESTZERO115 / EoI

Experts of Infra
1 stars 1 forks source link

systemctl start elasticsearch 오류 #7

Open HYERIN0718 opened 2 years ago

HYERIN0718 commented 2 years ago

elasticsearch이 재시작하지 않는 문제 생겼음


VMware Cent0S elasticsearch 7.x version logstash 7.x version kibana 7.x version


[root@localhost ~]# systemctl start elasticsearch
Job for elasticsearch.service failed because a fatal signal was delivered to the control process. See "systemctl status elasticsearch.service" and "journalctl -xe" for details.

[root@localhost ~]# systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
   Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since 목 2022-06-30 19:46:07 KST; 1h 32min ago
     Docs: https://www.elastic.co
  Process: 2795 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID_DIR}/elasticsearch.pid --quiet (code=exited, status=1/FAILURE)
 Main PID: 2795 (code=exited, status=1/FAILURE)

 6월 30 19:46:07 localhost.localdomain systemd-entrypoint[2795]: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)
 6월 30 19:46:07 localhost.localdomain systemd-entrypoint[2795]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112)
 6월 30 19:46:07 localhost.localdomain systemd-entrypoint[2795]: at org.elasticsearch.cli.Command.main(Command.java:77)
 6월 30 19:46:07 localhost.localdomain systemd-entrypoint[2795]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:125)
 6월 30 19:46:07 localhost.localdomain systemd-entrypoint[2795]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80)
 6월 30 19:46:07 localhost.localdomain systemd-entrypoint[2795]: For complete error details, refer to the log at /var/log/elasticsearch/elasticsearch.log
 6월 30 19:46:07 localhost.localdomain systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
 6월 30 19:46:07 localhost.localdomain systemd[1]: Failed to start Elasticsearch.
 6월 30 19:46:07 localhost.localdomain systemd[1]: Unit elasticsearch.service entered failed state.
 6월 30 19:46:07 localhost.localdomain systemd[1]: elasticsearch.service failed.

[root@localhost ~]# journalctl -xe
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit elasticsearch.service has failed.
--
-- The result is failed.
 6월 30 21:19:37 localhost.localdomain systemd[1]: Unit elasticsearch.service entered failed state.
 6월 30 21:19:37 localhost.localdomain systemd[1]: elasticsearch.service failed.
 6월 30 21:19:37 localhost.localdomain polkitd[653]: Unregistered Authentication Agent for unix-process:8845:650441 (system bus name :1.45, object path /org/freedesktop/PolicyKit1/Auth
 6월 30 21:19:40 localhost.localdomain logstash[8793]: [2022-06-30T21:19:38,931][INFO ][logstash.agent           ] Successfully started Logstash API endpoint {:port=>9600, :ssl_enabled
 6월 30 21:19:48 localhost.localdomain logstash[8793]: [2022-06-30T21:19:48,430][ERROR][logstash.agent           ] Failed to execute action {:action=>LogStash::PipelineAction::Create/p
 6월 30 21:19:48 localhost.localdomain logstash[8793]: [2022-06-30T21:19:48,891][INFO ][logstash.runner          ] Logstash shut down.
 6월 30 21:19:49 localhost.localdomain logstash[8793]: [2022-06-30T21:19:48,932][FATAL][org.logstash.Logstash    ] Logstash stopped processing because of an error: (SystemExit) exit
 6월 30 21:19:49 localhost.localdomain logstash[8793]: org.jruby.exceptions.SystemExit: (SystemExit) exit
 6월 30 21:19:49 localhost.localdomain logstash[8793]: at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:747) ~[jruby-complete-9.2.20.1.jar:?]
 6월 30 21:19:49 localhost.localdomain logstash[8793]: at org.jruby.RubyKernel.exit(org/jruby/RubyKernel.java:710) ~[jruby-complete-9.2.20.1.jar:?]
 6월 30 21:19:49 localhost.localdomain logstash[8793]: at usr.share.logstash.lib.bootstrap.environment.<main>(/usr/share/logstash/lib/bootstrap/environment.rb:94) ~[?:?]
 6월 30 21:19:49 localhost.localdomain systemd[1]: logstash.service: main process exited, code=exited, status=1/FAILURE
 6월 30 21:19:49 localhost.localdomain systemd[1]: Unit logstash.service entered failed state.
 6월 30 21:19:49 localhost.localdomain systemd[1]: logstash.service failed.
 6월 30 21:19:49 localhost.localdomain systemd[1]: logstash.service holdoff time over, scheduling restart.
 6월 30 21:19:49 localhost.localdomain systemd[1]: Stopped logstash.
-- Subject: Unit logstash.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit logstash.service has finished shutting down.
 6월 30 21:19:49 localhost.localdomain systemd[1]: Started logstash.
-- Subject: Unit logstash.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit logstash.service has finished starting up.
--
-- The start-up result is done.
 6월 30 21:19:49 localhost.localdomain logstash[9044]: Using bundled JDK: /usr/share/logstash/jdk
 6월 30 21:19:49 localhost.localdomain logstash[9044]: OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future
 6월 30 21:19:49 localhost.localdomain filebeat[1023]: 2022-06-30T21:19:49.917+0900        ERROR        [publisher_pipeline_output]        pipeline/output.go:154        Failed to conne
 6월 30 21:19:49 localhost.localdomain filebeat[1023]: 2022-06-30T21:19:49.921+0900        INFO        [publisher_pipeline_output]        pipeline/output.go:145        Attempting to re
 6월 30 21:19:49 localhost.localdomain filebeat[1023]: 2022-06-30T21:19:49.930+0900        INFO        [publisher]        pipeline/retry.go:219        retryer: send unwait signal to co
 6월 30 21:19:49 localhost.localdomain filebeat[1023]: 2022-06-30T21:19:49.931+0900        INFO        [publisher]        pipeline/retry.go:223          done
 6월 30 21:19:49 localhost.localdomain filebeat[1023]: 2022-06-30T21:19:49.953+0900        ERROR        [esclientleg]        transport/logging.go:37        Error dialing dial tcp 127.0
HYERIN0718 commented 2 years ago

elasticsearch 설치한 후 바로 systemct start elasticsearch 하지말고 kibana, logstash부터 설치하고 실행시킨다. 그 후에 elasticsearch를 실행하면 systemctl start/status elasticsearch 성공


root@ubuntu:~# systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
     Loaded: loaded (/lib/systemd/system/elasticsearch.service; disabled; vendor preset>
     Active: active (running) since Fri 2022-07-01 08:21:57 UTC; 3min 50s ago
       Docs: https://www.elastic.co
   Main PID: 30936 (java)
      Tasks: 68 (limit: 4538)
     Memory: 2.1G
        CPU: 1min 48.575s
     CGroup: /system.slice/elasticsearch.service
             ├─30936 /usr/share/elasticsearch/jdk/bin/java -Xshare:auto -Des.networkadd>
             └─31126 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/b>

Jul 01 08:21:01 ubuntu systemd[1]: Starting Elasticsearch...
Jul 01 08:21:57 ubuntu systemd[1]: Started Elasticsearch.

root@ubuntu:~# curl localhost:9200
{
  "name" : "ubuntu",
  "cluster_name" : "elasticsearch",
  "cluster_uuid" : "CnmNRBvRS42q47uWTo1v1Q",
  "version" : {
    "number" : "7.17.5",
    "build_flavor" : "default",
    "build_type" : "deb",
    "build_hash" : "8d61b4f7ddf931f219e3745f295ed2bbc50c8e84",
    "build_date" : "2022-06-23T21:57:28.736740635Z",
    "build_snapshot" : false,
    "lucene_version" : "8.11.1",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}