[
https://issues.apache.org/jira/browse/SOLR-10095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15852116#comment-15852116
]
Jan Høydahl commented on SOLR-10095:
------------------------------------
I suggest that if {{SOLR_HOME}} is explicitly defined, either in {{solr.in.sh}}
or in the environment, then the examples should respect that and place the
index files there, and the log files in {{SOLR_HOME/../logs}}. If
{{SOLR_LOGS_DIR}} is also explicitly defined, then that should also be
respected.
Users just unpacking the tarball and running {{bin/solr -e <example>}} will
still default to {{<install-dir>/example/<ex>/...}}.
A challenge is of course that we have no way of separating conf and data using
config as of today (see SOLR-6671). So our story that it should be possible to
separate code/conf and data 100% is not really possible.
> Examples do not respect SOLR_HOME and SOLR_LOGS_DIR
> ---------------------------------------------------
>
> Key: SOLR-10095
> URL: https://issues.apache.org/jira/browse/SOLR-10095
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: scripts and tools
> Reporter: Jan Høydahl
>
> The examples do not respect {{SOLR_HOME}} or {{SOLR_LOGS_DIR}} env, but
> always try to write index and logs to {{SOLR_HOME/../logs}}. Problem is when
> Solr is installed using the installer script, then {{/opt/solr}} is not
> supposed to be writable, and starting the examples fail.
> h3. Reproduce
> {noformat}
> sudo install_solr_service.sh solr-6.4.0.tgz
> sudo su solr
> export SOLR_INCLUDE="/etc/default/solr.in.sh"
> /opt/solr/bin/solr -e dih
> Starting up Solr on port 8983 using command:
> /opt/solr/bin/solr start -p 8983 -s "/opt/solr/example/example-DIH/solr"
> Exception in thread "main" java.nio.file.AccessDeniedException:
> /opt/solr/example/example-DIH/solr/../logs
> at
> sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
> at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
> at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
> at
> sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384)
> at java.nio.file.Files.createDirectory(Files.java:674)
> at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)
> at java.nio.file.Files.createDirectories(Files.java:767)
> at
> org.apache.solr.util.SolrCLI$UtilsTool.archiveGcLogs(SolrCLI.java:3604)
> at org.apache.solr.util.SolrCLI$UtilsTool.runTool(SolrCLI.java:3587)
> at org.apache.solr.util.SolrCLI.main(SolrCLI.java:256)
> Failed archiving old GC logs
> Exception in thread "main" java.nio.file.AccessDeniedException:
> /opt/solr/example/example-DIH/solr/../logs
> at
> sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
> at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
> at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
> at
> sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384)
> at java.nio.file.Files.createDirectory(Files.java:674)
> at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)
> at java.nio.file.Files.createDirectories(Files.java:767)
> at
> org.apache.solr.util.SolrCLI$UtilsTool.archiveConsoleLogs(SolrCLI.java:3633)
> at org.apache.solr.util.SolrCLI$UtilsTool.runTool(SolrCLI.java:3590)
> at org.apache.solr.util.SolrCLI.main(SolrCLI.java:256)
> Failed archiving old console logs
> ERROR: Logs directory /opt/solr/example/example-DIH/solr/../logs could not be
> created. Exiting
> ERROR: Process exited with an error: 1 (Exit value: 1)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]