Perhaps the instances of %SOLR_LOGS_DIR% in the solr.cmd files should be quoted 
i.e. "%SOLR_LOGS_DIR%" ??



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



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



Hi Paul,

getting rid of space in "program files" is doable, you are right. One way
to do it is through

   - echo %programfiles% ==> C:\Program Files
   - echo %programfiles(x86)% ==> C:\Program Files (x86)

Getting rid of spaces in sub directories is very difficult as we use tons
of those for different components of our suite.

Any other options to set it in some XML file or something?

Cheers,
Arturas


On Tue, Feb 26, 2019 at 3:03 PM <paul.d...@ub.unibe.ch> wrote:

> 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:maze...@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
>

Reply via email to