admin管理员组文章数量:1023251
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:
- 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.
- With cloud example (
.\solr.cmd start -e cloud
):
Invalid command-line option: --cloud
Environment
- Apache Solr: 9.7.0
- OS: Windows 11
- Java: JDK 17
- Shell: PowerShell (as Administrator)
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:
- 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.
- With cloud example (
.\solr.cmd start -e cloud
):
Invalid command-line option: --cloud
Environment
- Apache Solr: 9.7.0
- OS: Windows 11
- Java: JDK 17
- Shell: PowerShell (as Administrator)
- 2 And yet another solr startup bug on Windows... Are there no tests ran on Windows before release ? – Olivier Masseau Commented Nov 30, 2024 at 17:41
1 Answer
Reset to default 3Root 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
- Navigate to your Solr installation directory
- Create a backup of
bin\solr.cmd
- Open
bin\solr.cmd
in a text editor (like Notepad++ or VS Code) - Make these changes:
- Find
--max-wait-secs
and replace with-maxWaitSecs
- Find
-cloud
and replace with--cloud
- Find
Important Notes:
- Only change one occurrence of each parameter
- Don't use "Replace All" as it might affect other correct instances
- Make sure you have backup before editing
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
- These fixes are needed even when running PowerShell as Administrator
- The JVM warning about large page memory can be ignored:
OpenJDK 64-Bit Server VM warning: JVM cannot use large page memory because it does not have enough privilege to lock pages in memory.
- This appears to be a Windows-specific issue and doesn't affect Linux/Unix installations
References
- Solr Control Script Reference
- Getting Started Tutorial
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:
- 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.
- With cloud example (
.\solr.cmd start -e cloud
):
Invalid command-line option: --cloud
Environment
- Apache Solr: 9.7.0
- OS: Windows 11
- Java: JDK 17
- Shell: PowerShell (as Administrator)
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:
- 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.
- With cloud example (
.\solr.cmd start -e cloud
):
Invalid command-line option: --cloud
Environment
- Apache Solr: 9.7.0
- OS: Windows 11
- Java: JDK 17
- Shell: PowerShell (as Administrator)
- 2 And yet another solr startup bug on Windows... Are there no tests ran on Windows before release ? – Olivier Masseau Commented Nov 30, 2024 at 17:41
1 Answer
Reset to default 3Root 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
- Navigate to your Solr installation directory
- Create a backup of
bin\solr.cmd
- Open
bin\solr.cmd
in a text editor (like Notepad++ or VS Code) - Make these changes:
- Find
--max-wait-secs
and replace with-maxWaitSecs
- Find
-cloud
and replace with--cloud
- Find
Important Notes:
- Only change one occurrence of each parameter
- Don't use "Replace All" as it might affect other correct instances
- Make sure you have backup before editing
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
- These fixes are needed even when running PowerShell as Administrator
- The JVM warning about large page memory can be ignored:
OpenJDK 64-Bit Server VM warning: JVM cannot use large page memory because it does not have enough privilege to lock pages in memory.
- This appears to be a Windows-specific issue and doesn't affect Linux/Unix installations
References
- Solr Control Script Reference
- Getting Started Tutorial
本文标签: startupFix for Apache Solr 970 Windows Startup IssuesStack Overflow
版权声明:本文标题:startup - Fix for Apache Solr 9.7.0 Windows Start-up Issues - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745572078a2156794.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论