startup - Fix for Apache Solr 9.7.0 Windows Start-up Issues - Stack Overflow

ProblemWhen trying to start Apache Solr 9.7.0 on Windows using either basic start command or cloud exa

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

  • 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:

  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

  • Apache Solr: 9.7.0
  • OS: Windows 11
  • Java: JDK 17
  • Shell: PowerShell (as Administrator)
Share Improve this question edited Nov 19, 2024 at 11:00 Olaf Kock 48.2k9 gold badges62 silver badges91 bronze badges asked Nov 19, 2024 at 8:51 404rorre404rorre 1372 silver badges9 bronze badges 1
  • 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
Add a comment  | 

1 Answer 1

Reset to default 3

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:

  • 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

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745572079a4633739.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信