You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在Windows系统中运行Logstash遇启动问题求助

Fixing "could not find jruby in C:\ELK\logstash-6.1.3\vendor\jruby" Error in Logstash 6.1.3

Let’s work through this issue step by step—this error usually boils down to a missing/corrupted JRuby directory, environment misconfiguration, or permission issues. Here are the solutions to try:

1. Verify the JRuby directory exists

First, double-check that the vendor/jruby folder is actually present in your Logstash installation. Navigate to C:\ELK\logstash-6.1.3\vendor—if there’s no jruby folder here, your download or extraction process went wrong:

  • Download the Logstash 6.1.3 zip again from the official source (avoid third-party mirrors to prevent corruption)
  • Use a reliable extraction tool like 7-Zip instead of Windows’ built-in extractor, as it can sometimes fail with large archives
  • Make sure the extraction completes without any error messages

2. Validate your JDK environment variables

Even if you set up a 64-bit JDK, small misconfigurations can break Logstash’s ability to find JRuby:

  • Open Command Prompt and run echo %JAVA_HOME%—it should point directly to your JDK root folder (e.g., C:\Program Files\Java\jdk1.8.0_301), not the jre subfolder
  • Check that %JAVA_HOME%\bin is added to your PATH environment variable, and that it appears before any other Java-related paths (this ensures the correct JDK is used)
  • Confirm you’re running a 64-bit JDK by running java -version—the output should include "64-Bit"

3. Launch Logstash from the correct working directory

Sometimes starting Logstash from a different folder can cause path resolution issues:

  • Open Command Prompt and navigate to Logstash’s bin directory with:
    cd C:\ELK\logstash-6.1.3\bin
    
  • Then run Logstash directly with:
    logstash.bat
    

Avoid using shortcuts or launching from a different directory, as this can confuse the path lookups.

4. Check folder permissions

Windows permissions can block Logstash from accessing the JRuby files:

  • Right-click the logstash-6.1.3 folder, go to Properties > Security
  • Ensure your user account has Read & Execute (or Full Control) permissions for the folder and all its subfolders
  • If permissions look off, click Advanced and enable permission inheritance to reset permissions for all subdirectories

5. Confirm JRuby file integrity

If the vendor/jruby folder exists but you still get the error, check for missing core files:

  • Navigate to C:\ELK\logstash-6.1.3\vendor\jruby\bin—you should see jruby.bat and other executable files here
  • If any files are missing, re-extract the Logstash zip (using the steps from solution 1) to replace the corrupted or missing files

内容的提问来源于stack exchange,提问作者vinSan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 03:30:31