solrstartup

Fix for Apache Solr 9.7.0 Windows Start-up Issues


Problem

When trying to start Apache Solr 9.7.0 on Windows using either basic start command or cloud example, you might encounter these errors:

  1. With basic start (.\solr.cmd start):
Failed to parse command-line arguments due to: Unrecognized option: --max-wait-secs
ERROR: Solr did not start or was not reachable.
  1. With cloud example (.\solr.cmd start -e cloud):
Invalid command-line option: --cloud

Environment


Solution

  • Root Cause

    The Windows binary script (solr.cmd) contains inconsistent command switches that don't match what the parser expects. This appears to be a maintenance issue with the Windows scripts in Solr 9.7.0.

    Solution

    1. Navigate to your Solr installation directory
    2. Create a backup of bin\solr.cmd
    3. Open bin\solr.cmd in a text editor (like Notepad++ or VS Code)
    4. Make these changes:
      • Find --max-wait-secs and replace with -maxWaitSecs
      • Find -cloud and replace with --cloud

    Important Notes:

    After Fix

    After applying these fixes, you might see these warnings which can be safely ignored:

    WARNING: URLs provided to this tool needn't include Solr's context-root (e.g. "/solr"). 
    Such URLs are deprecated and support for them will be removed in a future release. 
    Correcting from [http://localhost:8983/solr] to [http://localhost:8983/].
    
    WARNING: A command line option has enabled the Security Manager
    WARNING: The Security Manager is deprecated and will be removed in a future release
    

    Verification

    After applying the fixes, verify that these commands work:

    .\solr.cmd start          # Basic start
    .\solr.cmd start -e cloud # Cloud example
    .\solr.cmd status         # Status check
    

    Additional Notes

    References