On 7/3/2018 2:53 AM, ja...@jafurrer.ch wrote:
> I was intending to open an Issue in Jira when I read that I'm supposed
> to first contact this mailinglist.
>
> Problem description
> ==================
>
> System: Microsoft Windows 10 Enterprise Version 10.0.16299 Build 16299
>
> Steps to reproduce the problem:
> 1) Download solr-7.4.0.tgz
> 2) Unzip to C:\solr-7.4.0
> 3) No changes (configuration or otherwise) whatsoever
> 4) Open cmd.exe
> 5) Execute the following command: cd c:\solr-7.4.0\bin
> 6) Execute the following command: solr.cmd start -p 8983
> 7) The following console output appears:
>
> c:\solr-7.4.0\bin>solr.cmd start -p 8983
> ERROR StatusLogger Unable to access
> file:/c:/solr-7.4.0/server/file:c:/solr-7.4.0/server/scripts/cloud-scripts/log4j2.xml

I'm seeing the same behavior on Windows 7.  I started with the .zip
download, so the fact that you have the .tgz download is likely not a
factor.  The .zip is a better option for Windows -- it has correct line
endings for Windows in most files, and Windows knows how to extract it
without installing additional software.

This is looking to me like a probable windows-specific bug in log4j2.  I
have asked the log4j mailing list about it.  The solr.cmd script appears
to be functioning correctly and not producing the strange pathname shown
in the error, and the same parameter syntax (with the file: prefix) is
working correctly on Linux.

Erick, the config in cloud-scripts logs to stderr rather than files. 
I'm all for moving it to resources so we don't have to keep track of
logging config files in multiple locations, but it does need to be a
different config file specifically for command-line tools.  Perhaps
log4j2-cli.xml as the filename?

This is the first version of Solr that includes log4j2.  All previous
releases used log4j 1.2.x.  Operating systems like Linux and MacOS get a
lot more testing than Windows does.  It's not good that this problem
exists.  Thank you for finding a workaround.

Solr 7.4 is using the most current version of log4j that is currently
available.

If you would like to proceed, please feel free to open an issue in
Jira.  A suggested title for the issue would be "log4j exceptions during
startup on Windows".  Even though I think this is a bug in software
other than Solr, it is a problem that Solr is experiencing, so we need
to track it and make sure we fix it.  It might end up being a two-part
fix, where we initially apply your workaround and then later revert that
change and upgrade log4j.

Thanks,
Shawn

Reply via email to