java.io.FileNotFoundException: /var/log/elasticsearch/elasticsearch_deprecation.log (Permission denied)

I'm trying to follow this getting started guide on WSL running Debian but I'm receiving the following error on sudo -i service elasticsearch start:

mdepouw@blah:/$ sudo -i service elasticsearch start
[....] Starting Elasticsearch Server:OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2019-12-06 13:35:01,917 main ERROR RollingFileManager (/var/log/elasticsearch/elasticsearch_deprecation.log) java.io.FileNotFoundException: /var/log/elasticsearch/elasticsearch_deprecation.log (Permission denied) java.io.FileNotFoundException: /var/log/elasticsearch/elasticsearch_deprecation.log (Permission denied)
at java.base/java.io.FileOutputStream.open0(Native Method)
at java.base/java.io.FileOutputStream.open(FileOutputStream.java:292)
at java.base/java.io.FileOutputStream.(FileOutputStream.java:235)
at java.base/java.io.FileOutputStream.(FileOutputStream.java:156)
at org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory.createManager(RollingFileManager.java:640)
at org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory.createManager(RollingFileManager.java:608)

It proceeds to print a bunch of other errors...

The guide had me install Elastic Search via apt-get. I'm running SysV.

Did I miss a step? Is WSL somehow different in this instance?

How do I fix this? :grinning:

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