lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <paul.d...@ub.unibe.ch>
Subject AW: %solr_logs_dir% does not like spaces
Date Tue, 26 Feb 2019 14:03:03 GMT
Looks like a bug in solr.cmd. You could try eliminating the spaces and/or opening an issue.



Instead of ‘Program Files (x86)’ use ‘PROGRA~2’

And don’t have spaces in your subdirectory…



NB: Depending on your Windows Version you may Have another alias for ‘Program Files (x86)’;
use «dir /X» to view the aliases.



Gesendet von Mail<https://go.microsoft.com/fwlink/?LinkId=550986> für Windows 10



Von: Arturas Mazeika<mailto:mazeika@gmail.com>
Gesendet: Dienstag, 26. Februar 2019 14:41
An: solr-user@lucene.apache.org<mailto:solr-user@lucene.apache.org>
Betreff: %solr_logs_dir% does not like spaces



Hi All,

I am testing solr 7.7 (and 7.6) under windows. My aim is to set logging
into a subdirectory that contains spaces of a directory that contains
spaces.

If I set on windows:

setx /m SOLR_LOGS_DIR "f:\solr_deployment\logs"

and start a solr instance:

F:\solr_deployment\solr-7.7.0\bin\solr.cmd start -h localhost -p 8983 -s
F:\solr_deployment\solr_data -m 1g

this goes smoothly.

However If I set the logging directory to:

setx /m SOLR_LOGS_DIR  "C:\Program Files (x86)\My Directory\Another
Directory\logs\solr"

then I get a cryptic error:

F:\solr_deployment\solr-7.7.0\bin\solr.cmd start -h localhost -p 8983 -s
F:\solr_deployment\solr_data -m 1g
Files was unexpected at this time.

If I comment "@echo off" in both solr.cmd and solr.cmd.in, it shows that it
dies around those lines in solr.cmd:

F:\solr_deployment\solr-7.7.0\bin>IF "" == "" set STOP_KEY=solrrocks
Files was unexpected at this time.

In the solr.cmd the following block is shown:

IF "%STOP_KEY%"=="" set STOP_KEY=solrrocks

@REM This is quite hacky, but examples rely on a different log4j2.xml
@REM so that we can write logs for examples to %SOLR_HOME%\..\logs
IF [%SOLR_LOGS_DIR%] == [] (
  set "SOLR_LOGS_DIR=%SOLR_SERVER_DIR%\logs"
) ELSE (
  set SOLR_LOGS_DIR=%SOLR_LOGS_DIR:"=%
)

comments?

Cheers,
Arturas

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message