Elasticsearch does not start - log4j Warning

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Elasticsearch does not start - log4j Warning

greenmang0
Hello Everyone,
I get following warning when I start elasticsearch.

$ elasticsearch -Des.config=/etc/elasticsearch/elasticsearch.yml -f

log4j:WARN No appenders could be found for logger (common.jna).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.

and "elasticsearch" doesn't start.

$ cat /etc/elasticsearch/elasticsearch.yml

# The cluster name
cluster:
    name: search.example.com

# Path Settings
path:
    conf: /etc/elasticsearch/elasticsearch.yml
    data: /var/lib/elasticsearch
    work: /tmp/elasticsearch
    logs: /var/log/elasticsearch

# Force all memory to be locked, forcing the JVM to never swap
bootstrap.mlockall: true

# Network Settings
network:
    host: odin.example.com

# Gateway Settings
gateway:
    type: fs
    fs:
        location: /mnt/elasticmnt

common:
    jna: DEBUG


$ cat /etc/elasticsearch/logging.yml


rootLogger: INFO, console, file
logger:
  # log action execution errors for easier debugging
  action: DEBUG
  com.example: WARN

  # gateway
  gateway: DEBUG

  # discovery
  discovery: TRACE

appender:
  console:
    type: console
    layout:
      type: consolePattern
      conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

  file:
    type: dailyRollingFile
    file: ${path.logs}/${cluster.name}.log
    datePattern: "'.'yyyy-MM-dd"
    layout:
      type: pattern
      conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n"

Reply | Threaded
Open this post in threaded view
|

Re: Elasticsearch does not start - log4j Warning [SOLVED]

greenmang0
Found the answer here. http://elasticsearch-users.115913.n3.nabble.com/Problem-with-Des-config-and-logging-yml-td3198254.html
But is there a way to specify location of logging.yml file? and where does elasticsearch look for logging.yml if not found in PWD?
Reply | Threaded
Open this post in threaded view
|

Re: Elasticsearch does not start - log4j Warning [SOLVED]

greenmang0
Just adjusted "path.conf", in elasticsearch.yml and problem solved.
Reply | Threaded
Open this post in threaded view
|

Re: Elasticsearch does not start - log4j Warning [SOLVED]

Nick Hoffman
Thanks for posting the solution, mate! I just built and installed the Debian package, and this problem bit me, too.

I had to specify the following settings in my elasticsearch.yml before ES would start:

path.conf: /etc/elasticsearch
path.data: /var/lib/elasticsearch
path.work: /tmp/elasticsearch
path.logs: /var/log/elasticsearch