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

Add bin/solr args for specifying PID and LOGS dirs



    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 7.3.1
    • None
    • scripts and tools
    • None


      When starting solr, an optional -d parameter can be provided.  This specifies the "Solr server directory" which needs to be the server directory from the raw distribution.  This clearly contains the program files, so as per common practice should not be writable by the user running the program.  However, when specified, an error results because it tries to create a log directory within the program directory! This is really really bad practice. One should be able to specify a directory for the runtime files and log files on the command line. It would be even better if the defaults conformed to the filesystem hierarchy standard when run on a Linux system. I understand that you want to make it easy for developers to use your software, but when deploying on actual production systems, these things are really important. It's also important to understand that the people deploying your software to production are different to the ones who develop with your software, and a deep understanding of your software shouldn't be necessary for the former to be able to deploy it.

      A wholly-unsatisfactory workaround is to set the pid and log directories by environment variable before starting the server:

      $ export SOLR_PID_DIR=/var/lib/celum-search
      $ export SOLR_LOGS_DIR=/var/log/celum-search

      This can also be done in /etc/default/solr.in.sh.




            Unassigned Unassigned
            pdr Pete Ryland
            0 Vote for this issue
            3 Start watching this issue