When trying to start Apache Solr 9.7.0 on Windows using either basic start command or cloud example, you might encounter these errors:
.\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.
.\solr.cmd start -e cloud
):Invalid command-line option: --cloud
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.
bin\solr.cmd
bin\solr.cmd
in a text editor (like Notepad++ or VS Code)--max-wait-secs
and replace with -maxWaitSecs
-cloud
and replace with --cloud
Important Notes:
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
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
OpenJDK 64-Bit Server VM warning: JVM cannot use large page memory because it does not have enough privilege to lock pages in memory.