# log4j:WARN No appenders could be found for logger

**URL:** https://discuss.elastic.co/t/log4j-warn-no-appenders-could-be-found-for-logger/44578
**Category:** Elasticsearch
**Created:** [March 16, 2016, 3:22pm UTC](https://discuss.elastic.co/t/log4j-warn-no-appenders-could-be-found-for-logger/44578 "2016-03-16T15:22:50Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![steveh](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@steveh](https://discuss.elastic.co/u/steveh)
#### Post date: [March 16, 2016, 3:22pm UTC](https://discuss.elastic.co/t/log4j-warn-no-appenders-could-be-found-for-logger/44578/1 "2016-03-16T15:22:50Z")

</div>

So. I finally decided it was time to set up my production server.  
New install using yum as per the instructions. I did an uninstall and re-install just now to make sure my fiddling hadn't messed things up.  
Version 2.2.1 on Centos 6.7  
I had to set MAX\_MAP\_COUNT= as I am running an a Parrallels VPS.  
I now get:  
Starting elasticsearch: log4j:WARN No appenders could be found for logger (common).  
log4j:WARN Please initialize the log4j system properly.  
log4j:WARN See [http://logging.apache.org/log4j/1.2/faq.html#noconfig](http://logging.apache.org/log4j/1.2/faq.html#noconfig) for more info.  
[OK]  
The [OK] is a lie. ps -A reveals no elasticsearch running.  
The /var/lib/elasticsearch directory has elasticsearch as user and goup and I am running a fresh install of Java 1.8.0\_71

Any ideas how to get things working? I hope so as I have run out of homebrew to drown any sorrows in.

Steve

---

<div class="post-metadata">

### Author: ![steveh](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@steveh](https://discuss.elastic.co/u/steveh)
#### Post date: [March 17, 2016, 11:50am UTC](https://discuss.elastic.co/t/log4j-warn-no-appenders-could-be-found-for-logger/44578/2 "2016-03-17T11:50:56Z")

</div>

Nobody any idea? The log4J issue seems to have dogged elasticsearch from early on judging by the number of hits on google. I have tried various "fixes" but to no avail.

Maybe someone knows how to get a better error message beyond the utterly useless generic message.

---

<div class="post-metadata">

### Author: ![Shawn\_Johnson](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@Shawn\_Johnson](https://discuss.elastic.co/u/Shawn_Johnson)
#### Post date: [March 17, 2016, 4:07pm UTC](https://discuss.elastic.co/t/log4j-warn-no-appenders-could-be-found-for-logger/44578/3 "2016-03-17T16:07:20Z")

</div>

Hi Steve - I fought with this problem recently for an Elasticsearch java client. I found it best in our case to pass the location for the log4j.properties as a java property. Also, some OS's differ and require "file:" as a prefix to the location.

Example:  
`-Dlog4j.configuration=file:%ESHOME%/config/log4j.properties`

I didn't notice this same error for the server, neither for the .zip install or an RPM install.

---

<div class="post-metadata">

### Author: ![steveh](https://avatars.discourse-cdn.com/v4/letter/s/5fc32e/32.png) [@steveh](https://discuss.elastic.co/u/steveh)
#### Post date: [March 17, 2016, 7:39pm UTC](https://discuss.elastic.co/t/log4j-warn-no-appenders-could-be-found-for-logger/44578/4 "2016-03-17T19:39:48Z")

</div>

Thanks Shawn. I'll give it a go.

---

<div class="post-metadata">

### Author: ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)
#### Post date: [March 17, 2016, 8:23pm UTC](https://discuss.elastic.co/t/log4j-warn-no-appenders-could-be-found-for-logger/44578/5 "2016-03-17T20:23:12Z")

</div>

It sounds like the logging configuration is missing or not readable by the Elasticsearch user. On your system with a fresh RPM install, there should be a logging config file in `/etc/elasticsearch/logging.yml`. You should check for the existence of this file, and that it is readable by the elasticsearch user. Have you made changes to the configuration? Are you not running as the `elasticsearch` user?

Also, note that if you try to check for the existence of Elasticsearch via `ps -A`, it's not `elasticsearch` that you should be looking for; instead it is `java`. It's probably better to do `ps -A x` and check for `elasticsearch` that way.

---

<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: [July 5, 2017, 11:07pm UTC](https://discuss.elastic.co/t/log4j-warn-no-appenders-could-be-found-for-logger/44578/6 "2017-07-05T23:07:28Z")

</div>


