尝试使用基本启动命令或云示例在 Windows 上启动 Apache Solr 9.7.0 时,您可能会遇到以下错误:
.\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
Windows 二进制脚本 (
solr.cmd
) 包含不一致的命令开关,与解析器的期望不匹配。这似乎是 Solr 9.7.0 中 Windows 脚本的维护问题。
bin\solr.cmd
bin\solr.cmd
--max-wait-secs
并替换为 -maxWaitSecs
-cloud
并替换为 --cloud
重要提示:
应用这些修复后,您可能会看到这些警告,可以安全地忽略这些警告:
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
应用修复后,验证这些命令是否有效:
.\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.