You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by "Calliess Daniel Ing." <Da...@Stadt-Salzburg.at> on 2022/06/21 09:49:17 UTC
Unable to set custom temp directory on Windows with 9.0.0
Hi,
after updating my Solr test installation from version 8.11.1 to 9.0.0 I am unable to start the Solr service when I am setting a custon temporary directory. I'm doing this by changing
-Djava.io.tmpdir="%SOLR_SERVER_DIR%\tmp"
to
-Djava.io.tmpdir="C:\Temp\Solr"
in the file 'solr.cmd'.
Regarding to the Process Monitor tool, there might be a bug with creating the path to the temporary folder, as the following output shows:
cmd.exe 7448 QueryDirectory C:\Solr\server\tmp NO SUCH FILE
cmd.exe 7448 CreateFile C:\Solr\server\tmp ACCESS DENIED
java.exe 7872 CreateFile C:\Solr\server\-Djava.io.tmpdir=C:\Temp\ NAME INVALID
java.exe 7872 CreateFile C:\Solr\server\-Djava.io.tmpdir=C:\Temp\Solr NAME INVALID
The StandardError output includes a corresponding message:
2022-06-21 09:39:20.112: java.lang.SecurityException: Unable to create temporary file or directory
When I'm creating the folder C:\Solr\server\tmp and allowing the service user write access, then the service is starting and using this folder as the temporary directory.
Am I doing something wrong or is this indeed a bug?
Best regards
Daniel
Re: Unable to set custom temp directory on Windows with 9.0.0
Posted by Paul Russell <pa...@qflow.com>.
Daniel,
You have listed "-Djava.io.tmpdir="C:\Temp\Solr" as the intended temp
directory but also indicated creating folder structure "
C:\Solr\server\tmp" if that wasnt a typo then you need to create the
"C:\Temp\SOLR" folder structure and also when passing java directives the
correct directive would be '-Djava.io.tmpdir="C:/temp/solr"
On Tue, Jun 21, 2022 at 5:49 AM Calliess Daniel Ing. <
Daniel.Calliess@stadt-salzburg.at> wrote:
> Hi,
>
> after updating my Solr test installation from version 8.11.1 to 9.0.0 I am
> unable to start the Solr service when I am setting a custon temporary
> directory. I'm doing this by changing
>
> -Djava.io.tmpdir="%SOLR_SERVER_DIR%\tmp"
>
> to
>
> -Djava.io.tmpdir="C:\Temp\Solr"
>
> in the file 'solr.cmd'.
>
> Regarding to the Process Monitor tool, there might be a bug with creating
> the path to the temporary folder, as the following output shows:
> cmd.exe 7448 QueryDirectory C:\Solr\server\tmp NO SUCH FILE
> cmd.exe 7448 CreateFile C:\Solr\server\tmp ACCESS DENIED
> java.exe 7872 CreateFile
> C:\Solr\server\-Djava.io.tmpdir=C:\Temp\ NAME INVALID
> java.exe 7872 CreateFile
> C:\Solr\server\-Djava.io.tmpdir=C:\Temp\Solr NAME INVALID
>
> The StandardError output includes a corresponding message:
> 2022-06-21 09:39:20.112: java.lang.SecurityException: Unable to create
> temporary file or directory
>
> When I'm creating the folder C:\Solr\server\tmp and allowing the service
> user write access, then the service is starting and using this folder as
> the temporary directory.
>
> Am I doing something wrong or is this indeed a bug?
>
> Best regards
> Daniel
>