Hi,
I have ansible config files which was installing all elasticsearch components of 7.4 version. I have changed it to download and use 7.14 version.
I am getting below error, elasticsearch service is not getting started.
Unable to start service elasticsearch: Job for elasticsearch.service failed because the control process exited with error code. See "systemctl status elasticsearch.service" and "journalctl -xe" for details.
elasticsearch service output,
Aug 23 20:28:21 systemd-entrypoint[22215]: Error: A fatal exception has occurred. Program will exit.
Aug 23 20:28:21 systemd-entrypoint[22215]: at org.elasticsearch.tools.launchers.JvmOption.flagsFinal(JvmOpt...:119)
Aug 23 20:28:21 systemd-entrypoint[22215]: at org.elasticsearch.tools.launchers.JvmOption.findFinalOptions(...a:81)
Aug 23 20:28:21 systemd-entrypoint[22215]: at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErg...a:38)
Aug 23 20:28:21 systemd-entrypoint[22215]: at org.elasticsearch.tools.launchers.JvmOptionsParser.jvmOptions...:135)
Aug 23 20:28:21 systemd-entrypoint[22215]: at org.elasticsearch.tools.launchers.JvmOptionsParser.main(JvmOp...a:86)
Aug 23 20:28:21 systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Aug 23 20:28:21 systemd[1]: Failed to start Elasticsearch.
Aug 23 20:28:21 systemd[1]: Unit elasticsearch.service entered failed state.
Aug 23 20:28:21 systemd[1]: elasticsearch.service failed.
elasticsearch logs -
[2021-08-23T12:21:02,356][INFO ][o.e.c.m.MetaDataMappingService] [elasticsearch_1] [ping_server-2021.08.23/adVQSjVASH6NqwfTsaKMfA] create_mapping [_doc]
[2021-08-23T12:21:09,275][INFO ][o.e.c.m.MetaDataMappingService] [elasticsearch_1] [access_ping_server-2021.08.23/_rspEZtyRPqGCX4rZ4d40A] update_mapping [_doc]
[2021-08-23T12:21:09,471][INFO ][o.e.c.m.MetaDataMappingService] [elasticsearch_1] [filebeat-7.4.0-2021.08.23/I0L3_I7ZRLuEHCSrgT84ew] update_mapping [_doc]
[2021-08-23T12:21:20,043][INFO ][o.e.c.m.MetaDataMappingService] [elasticsearch_1] [ping_server-2021.08.23/adVQSjVASH6NqwfTsaKMfA] update_mapping [_doc]
[2021-08-23T12:21:20,354][INFO ][o.e.c.m.MetaDataMappingService] [elasticsearch_1] [access_ping_server-2021.08.23/_rspEZtyRPqGCX4rZ4d40A] update_mapping [_doc]
[2021-08-23T12:21:20,557][INFO ][o.e.c.m.MetaDataMappingService] [elasticsearch_1] [filebeat-7.4.0-2021.08.23/I0L3_I7ZRLuEHCSrgT84ew] update_mapping [_doc]
[2021-08-23T12:21:40,373][INFO ][o.e.c.m.MetaDataMappingService] [elasticsearch_1] [nextgenpsd2bank-api_app_server-2021.08.23/yEa9I-8zTHesLcp6b_fCVw] update_mapping [_doc]
[2021-08-23T12:21:40,718][INFO ][o.e.c.m.MetaDataMappingService] [elasticsearch_1] [filebeat-7.4.0-2021.08.23/I0L3_I7ZRLuEHCSrgT84ew] update_mapping [_doc]
[2021-08-23T12:21:54,479][INFO ][o.e.c.m.MetaDataIndexTemplateService] [elasticsearch_1] adding template [apm-7.4.0] for index patterns [apm-7.4.0*]
[2021-08-23T12:21:54,551][INFO ][o.e.x.i.a.TransportPutLifecycleAction] [elasticsearch_1] adding index lifecycle policy [apm-7.4.0-span]
[2021-08-23T12:21:54,670][INFO ][o.e.c.m.MetaDataIndexTemplateService] [elasticsearch_1] adding template [apm-7.4.0-span] for index patterns [apm-7.4.0-span*]
[2021-08-23T12:21:54,752][INFO ][o.e.c.m.MetaDataCreateIndexService] [elasticsearch_1] [apm-7.4.0-span-000001] creating index, cause [api], templates [apm-7.4.0-span, apm-7.4.0], shards [1]/[1], mappings [_doc]
[2021-08-23T12:21:54,951][INFO ][o.e.x.i.a.TransportPutLifecycleAction] [elasticsearch_1] adding index lifecycle policy [apm-7.4.0-transaction]
[2021-08-23T12:21:55,015][INFO ][o.e.c.m.MetaDataIndexTemplateService] [elasticsearch_1] adding template [apm-7.4.0-transaction] for index patterns [apm-7.4.0-transaction*]
[2021-08-23T12:21:55,093][INFO ][o.e.c.m.MetaDataCreateIndexService] [elasticsearch_1] [apm-7.4.0-transaction-000001] creating index, cause [api], templates [apm-7.4.0-transaction, apm-7.4.0], shards [1]/[1], mappings [_doc]
[2021-08-23T12:21:55,266][INFO ][o.e.x.i.a.TransportPutLifecycleAction] [elasticsearch_1] adding index lifecycle policy [apm-7.4.0-error]
[2021-08-23T12:21:55,347][INFO ][o.e.c.m.MetaDataIndexTemplateService] [elasticsearch_1] adding template [apm-7.4.0-error] for index patterns [apm-7.4.0-error*]
[2021-08-23T12:21:55,387][INFO ][o.e.c.m.MetaDataCreateIndexService] [elasticsearch_1] [apm-7.4.0-error-000001] creating index, cause [api], templates [apm-7.4.0-error, apm-7.4.0], shards [1]/[1], mappings [_doc]
[2021-08-23T12:21:55,697][INFO ][o.e.x.i.a.TransportPutLifecycleAction] [elasticsearch_1] adding index lifecycle policy [apm-7.4.0-metric]
[2021-08-23T12:21:55,785][INFO ][o.e.c.m.MetaDataIndexTemplateService] [elasticsearch_1] adding template [apm-7.4.0-metric] for index patterns [apm-7.4.0-metric*]
[2021-08-23T12:21:55,900][INFO ][o.e.c.m.MetaDataCreateIndexService] [elasticsearch_1] [apm-7.4.0-metric-000001] creating index, cause [api], templates [apm-7.4.0-metric, apm-7.4.0], shards [1]/[1], mappings [_doc]
[2021-08-23T12:21:56,485][INFO ][o.e.c.m.MetaDataCreateIndexService] [elasticsearch_1] [apm-7.4.0-onboarding-2021.08.23] creating index, cause [auto(bulk api)], templates [apm-7.4.0], shards [1]/[1], mappings [_doc]
[2021-08-23T12:22:06,833][INFO ][o.e.m.j.JvmGcMonitorService] [elasticsearch_1] [gc][458] overhead, spent [412ms] collecting in the last [1s]
[2021-08-23T12:22:33,683][INFO ][o.e.c.m.MetaDataCreateIndexService] [elasticsearch_1] [metricbeat-7.4.0-2021.08.23] creating index, cause [auto(bulk api)], templates [metricbeat-7.4.0], shards [1]/[1], mappings [_doc]
[2021-08-23T12:22:34,006][INFO ][o.e.c.m.MetaDataMappingService] [elasticsearch_1] [metricbeat-7.4.0-2021.08.23/hSXx1WScRJCFnn9gpQQ5Dw] update_mapping [_doc]
[2021-08-23T12:23:16,685][INFO ][o.e.c.m.MetaDataMappingService] [elasticsearch_1] [access_ping_server-2021.08.23/_rspEZtyRPqGCX4rZ4d40A] update_mapping [_doc]
[2021-08-23T12:23:43,682][INFO ][o.e.x.s.a.f.FileUserPasswdStore] [elasticsearch_1] users file [/etc/elasticsearch/users] changed. updating users... )
[2021-08-23T12:23:43,714][INFO ][o.e.x.s.a.f.FileUserRolesStore] [elasticsearch_1] users roles file [/etc/elasticsearch/users_roles] changed. updating users roles...
[2021-08-23T12:23:43,715][INFO ][o.e.x.s.a.s.FileRolesStore] [elasticsearch_1] parsed [0] roles from file [/etc/elasticsearch/roles.yml]
[2021-08-23T12:23:43,716][INFO ][o.e.x.s.a.s.FileRolesStore] [elasticsearch_1] updated roles (roles file [/etc/elasticsearch/roles.yml] changed)
[2021-08-23T12:34:28,534][ERROR][o.e.x.i.IndexLifecycleRunner] [elasticsearch_1] policy [heartbeat-7.4.0] for index [heartbeat-7.4.0-2021.08.23] failed on step [{"phase":"hot","action":"rollover","name":"check-rollover-ready"}]. Moving to ERROR step
java.lang.IllegalArgumentException: index.lifecycle.rollover_alias [heartbeat-7.4.0] does not point to index [heartbeat-7.4.0-2021.08.23]
at org.elasticsearch.xpack.core.ilm.WaitForRolloverReadyStep.evaluateCondition(WaitForRolloverReadyStep.java:92) [x-pack-core-7.4.0.jar:7.4.0]
at org.elasticsearch.xpack.ilm.IndexLifecycleRunner.runPeriodicStep(IndexLifecycleRunner.java:133) [x-pack-ilm-7.4.0.jar:7.4.0]
at org.elasticsearch.xpack.ilm.IndexLifecycleService.triggerPolicies(IndexLifecycleService.java:274) [x-pack-ilm-7.4.0.jar:7.4.0]
at org.elasticsearch.xpack.ilm.IndexLifecycleService.triggered(IndexLifecycleService.java:213) [x-pack-ilm-7.4.0.jar:7.4.0]
at org.elasticsearch.xpack.core.scheduler.SchedulerEngine.notifyListeners(SchedulerEngine.java:175) [x-pack-core-7.4.0.jar:7.4.0]
at org.elasticsearch.xpack.core.scheduler.SchedulerEngine$ActiveSchedule.run(SchedulerEngine.java:203) [x-pack-core-7.4.0.jar:7.4.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:830) [?:?]
[2021-08-23T12:34:28,652][ERROR][o.e.x.i.IndexLifecycleRunner] [elasticsearch_1] policy [metricbeat-7.4.0] for index [metricbeat-7.4.0-2021.08.23] failed on step [{"phase":"hot","action":"rollover","name":"check-rollover-ready"}]. Moving to ERROR step
java.lang.IllegalArgumentException: index.lifecycle.rollover_alias [metricbeat-7.4.0] does not point to index [metricbeat-7.4.0-2021.08.23]
at org.elasticsearch.xpack.core.ilm.WaitForRolloverReadyStep.evaluateCondition(WaitForRolloverReadyStep.java:92) [x-pack-core-7.4.0.jar:7.4.0]
at org.elasticsearch.xpack.ilm.IndexLifecycleRunner.runPeriodicStep(IndexLifecycleRunner.java:133) [x-pack-ilm-7.4.0.jar:7.4.0]
at org.elasticsearch.xpack.ilm.IndexLifecycleService.triggerPolicies(IndexLifecycleService.java:274) [x-pack-ilm-7.4.0.jar:7.4.0]
at org.elasticsearch.xpack.ilm.IndexLifecycleService.triggered(IndexLifecycleService.java:213) [x-pack-ilm-7.4.0.jar:7.4.0]
at org.elasticsearch.xpack.core.scheduler.SchedulerEngine.notifyListeners(SchedulerEngine.java:175) [x-pack-core-7.4.0.jar:7.4.0]
at org.elasticsearch.xpack.core.scheduler.SchedulerEngine$ActiveSchedule.run(SchedulerEngine.java:203) [x-pack-core-7.4.0.jar:7.4.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:830) [?:?]
[2021-08-23T12:51:41,712][INFO ][o.e.n.Node ] [elasticsearch_1] stopping ...
[2021-08-23T12:51:41,740][INFO ][o.e.x.w.WatcherService ] [elasticsearch_1] stopping watch service, reason [shutdown initiated]
[2021-08-23T12:51:41,741][INFO ][o.e.x.w.WatcherLifeCycleService] [elasticsearch_1] watcher has stopped and shutdown
[2021-08-23T12:51:41,864][INFO ][o.e.x.m.p.l.CppLogMessageHandler] [elasticsearch_1] [controller/7651] [Main.cc@150] Ml controller exiting
[2021-08-23T12:51:41,868][INFO ][o.e.x.m.p.NativeController] [elasticsearch_1] Native controller process has stopped - no new native processes can be started
[2021-08-23T12:51:44,621][INFO ][o.e.n.Node ] [elasticsearch_1] stopped
[2021-08-23T12:51:44,621][INFO ][o.e.n.Node ] [elasticsearch_1] closing ...
[2021-08-23T12:51:44,652][INFO ][o.e.n.Node ] [elasticsearch_1] closed
As can see above custom index are getting created along with filebeat
, metricbeat
etc.. index but they are getting created with version 7.4.0
and not 7.14.0
version.
Not sure from where it is picking up version as 7.4.0
and not 7.14.0
Below is the logstash
file,
input {
beats {
port => 5044
}
}
if [log_type] == "admin_app_server" and [app_id] == "node"
{
grok { match => { "message" => "%{SYSLOGBASE} %{GREEDYDATA:json_message}" } } json { source => "json_message" }
mutate {
replace => {
"[type]" => "admin_app_server"
}
}
}
output {
if [log_type] == "admin_app_server" {
elasticsearch {
hosts => ['http://10.10.10.242:9200']
index => "%{type}-%{+YYYY.MM.dd}"
user => elastic
password => XXX
}
}
elasticsearch {
hosts => ['http://10.10.10.242:9200']
index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
user => elastic
password => XXX
}
}
I think its because of the above line in elasticsearch output i.e index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
which is causing issue.
Can someone please tell from where version is picking value as 7.4.0
and not 7.14.0
Thanks,