Will elasticsearch create logs directory if not exist?

Hi

Will elasticsearch create logs directory I have given in path.logs, if not exist?
It seems like service not starting up if log directory is not there.
Is there anyway I can tell elasticsearch to create the directory if not exist

How are you installing it as I think the RPM at least does that, plus sets ownership, etc. It's not just about creating, but also ownership/rights - for example, you often can't just randomly create directories in /var/log as a non-root user.

I think you must pre-create the logs folder,
because the Elasticsearch boot script need it

java Elasticsearch
...
-XX:ErrorFile=logs/hs_err_pid%p.log
-Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m
...

It will throw exception if it does not exist.

note, the boot scrpt don't need the "path.data", so the ES process will create the folder if can't find it.

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