log4j:WARN No appenders could be found for logger

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 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

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.

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.

Thanks Shawn. I'll give it a go.

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.