# Elasticsearch 7.16.2 not getting started after upgrading Log4j to 2.20 version

**URL:** https://discuss.elastic.co/t/elasticsearch-7-16-2-not-getting-started-after-upgrading-log4j-to-2-20-version/327799
**Category:** Elasticsearch
**Created:** [March 16, 2023, 4:24am UTC](https://discuss.elastic.co/t/elasticsearch-7-16-2-not-getting-started-after-upgrading-log4j-to-2-20-version/327799 "2023-03-16T04:24:11Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![kgpbharathi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kgpbharathi/32/118503_2.png) [@kgpbharathi](https://discuss.elastic.co/u/kgpbharathi)
#### Post date: [March 16, 2023, 4:24am UTC](https://discuss.elastic.co/t/elasticsearch-7-16-2-not-getting-started-after-upgrading-log4j-to-2-20-version/327799/1 "2023-03-16T04:24:11Z")

</div>

We are using elasticsearch with version": {  
"number": "7.16.2","build\_type": "rpm","lucene\_version": "8.10.1"  
}

We have upgraded elasticsearch log4j files from 2.17 to 2.20 and elasticsearch is failing to start . Once i put back old version 2.17 log4j file, it started working.

It gives below error ,not able to fetch more details.  
[appsadm@gcpdvapcfess02 lib]$ sudo service elasticsearch -l status  
Usage: /etc/init.d/elasticsearch {start|stop|status|restart|condrestart|try-restart|reload|force-reload}  
[appsadm@gcpdvapcfess02 lib]$ sudo service elasticsearch status  
● elasticsearch.service - Elasticsearch  
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)  
Active: failed (Result: exit-code) since Wed 2023-03-15 09:18:04 MDT; 8min ago  
Docs: [https://www.elastic.co](https://www.elastic.co)  
Process: 1282 ExecStart=/usr/share/elasticsearch/bin/systemd-entrypoint -p ${PID\_DIR}/elasticsearch.pid --quiet (code=exited , status=1/FAILURE)  
Main PID: 1282 (code=exited, status=1/FAILURE)

Mar 15 09:18:03 gcpdvapcfess02 systemd-entrypoint[1282]: at org.elasticsearch.common.logging.LogConfigurator.configureS...251)  
Mar 15 09:18:03 gcpdvapcfess02 systemd-entrypoint[1282]: at org.elasticsearch.common.logging.LogConfigurator.configure(...157)  
Mar 15 09:18:03 gcpdvapcfess02 systemd-entrypoint[1282]: at org.elasticsearch.common.logging.LogConfigurator.configure(...118)  
Mar 15 09:18:03 gcpdvapcfess02 systemd-entrypoint[1282]: at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:369)  
Mar 15 09:18:03 gcpdvapcfess02 systemd-entrypoint[1282]: at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearc...166)  
Mar 15 09:18:03 gcpdvapcfess02 systemd-entrypoint[1282]: at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticse...157)  
Mar 15 09:18:04 gcpdvapcfess02 systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE  
Mar 15 09:18:04 gcpdvapcfess02 systemd[1]: Failed to start Elasticsearch.  
Mar 15 09:18:04 gcpdvapcfess02 systemd[1]: Unit elasticsearch.service entered failed state.  
Mar 15 09:18:04 gcpdvapcfess02 systemd[1]: elasticsearch.service failed.  
Hint: Some lines were ellipsized, use -l to show in full.

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [March 16, 2023, 5:32am UTC](https://discuss.elastic.co/t/elasticsearch-7-16-2-not-getting-started-after-upgrading-log4j-to-2-20-version/327799/2 "2023-03-16T05:32:59Z")

</div>

What is the problem you are trying to solve? Elasticsearch 7.16 has as far as I know never been teted with that version, so who would you expect it to work, especially since it is a new major version?

---

<div class="post-metadata">

### Author: ![kgpbharathi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kgpbharathi/32/118503_2.png) [@kgpbharathi](https://discuss.elastic.co/u/kgpbharathi)
#### Post date: [March 16, 2023, 8:03am UTC](https://discuss.elastic.co/t/elasticsearch-7-16-2-not-getting-started-after-upgrading-log4j-to-2-20-version/327799/3 "2023-03-16T08:03:14Z")

</div>

I am expecting Elasticsearch 7.16 to run with log4j 2.20 .Is with compatible? or should i upgrade elastic?

---

<div class="post-metadata">

### Author: ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)
#### Post date: [March 16, 2023, 8:09am UTC](https://discuss.elastic.co/t/elasticsearch-7-16-2-not-getting-started-after-upgrading-log4j-to-2-20-version/327799/4 "2023-03-16T08:09:56Z")

</div>

> [@kgpbharathi](#):
>
> I am expecting Elasticsearch 7.16 to run with log4j 2.20 .

What makes you expect this? It doesn't look like it does.

---

<div class="post-metadata">

### Author: ![kgpbharathi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kgpbharathi/32/118503_2.png) [@kgpbharathi](https://discuss.elastic.co/u/kgpbharathi)
#### Post date: [March 16, 2023, 9:01am UTC](https://discuss.elastic.co/t/elasticsearch-7-16-2-not-getting-started-after-upgrading-log4j-to-2-20-version/327799/5 "2023-03-16T09:01:48Z")

</div>

we currently use log4j 2.17.0 which has some vulnerability issue raised by our internal security team, so we are supposed to upgrade log4j to 2.20 version which is not working

---

<div class="post-metadata">

### Author: ![xeraa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xeraa/32/48181_2.png) [@xeraa](https://discuss.elastic.co/u/xeraa)
#### Post date: [March 17, 2023, 11:50pm UTC](https://discuss.elastic.co/t/elasticsearch-7-16-2-not-getting-started-after-upgrading-log4j-to-2-20-version/327799/6 "2023-03-17T23:50:25Z")

</div>

With the Java Security Manager in the mix, this is more complex and just will generally not work. If you need updates, update Elasticsearch in full. Replacing JARs is not the way to go.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [April 14, 2023, 11:50pm UTC](https://discuss.elastic.co/t/elasticsearch-7-16-2-not-getting-started-after-upgrading-log4j-to-2-20-version/327799/7 "2023-04-14T23:50:42Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
