Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-10095

Examples do not respect SOLR_HOME and SOLR_LOGS_DIR

Agile BoardAttach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • scripts and tools
    • None

    Description

      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.

      Reproduce

      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)
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            janhoy Jan Høydahl

            Dates

              Created:
              Updated:

              Slack

                Issue deployment