Unable to run Logstash 8.3.1 (not even to check plugins): Errno::EACCES: Permission denied - NUL

I'm seeing an issue after installing Logstash 8.3.1 on Windows 10 (as part of an upgrade from Logstash 8.1.2 which has been running perfectly fine).

All I've done is unpack the Logstash 8.3.1 zip file into a suitable folder and then run the logstash-plugin.bat file to list the installed plugins. This results in the same failure as @CarlosD has reported in an earlier thread.

C:\Apps\ELASTIC\logstash-8.3.1\bin>logstash-plugin list
"Using bundled JDK: C:\Apps\ELASTIC\logstash-8.3.1\jdk\bin\java.exe"
Errno::EACCES: Permission denied - NUL
                    sysopen at org/jruby/RubyIO.java:1237
                 initialize at org/jruby/RubyFile.java:365
                       open at org/jruby/RubyIO.java:1156
                 initialize at C:/Apps/ELASTIC/logstash-8.3.1/vendor/jruby/lib/ruby/stdlib/rubygems/user_interaction.rb:645
                 initialize at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/bundler-2.3.17/lib/bundler/ui/rg_proxy.rb:11
                        ui= at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/bundler-2.3.17/lib/bundler.rb:91
                         ui at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/bundler-2.3.17/lib/bundler.rb:87
                   validate at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/bundler-2.3.17/lib/bundler/rubygems_integration.rb:68
              validate_spec at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/bundler-2.3.17/lib/bundler/source/path.rb:168
            load_spec_files at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/bundler-2.3.17/lib/bundler/source/path.rb:182
                       each at org/jruby/RubyArray.java:1821
            load_spec_files at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/bundler-2.3.17/lib/bundler/source/path.rb:176
                local_specs at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/bundler-2.3.17/lib/bundler/source/path.rb:107
                      specs at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/bundler-2.3.17/lib/bundler/source/path.rb:115
  specs_for_source_changed? at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/bundler-2.3.17/lib/bundler/definition.rb:562
             specs_changed? at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/bundler-2.3.17/lib/bundler/definition.rb:547
             converge_paths at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/bundler-2.3.17/lib/bundler/definition.rb:591
                       any? at org/jruby/RubyArray.java:4553
             converge_paths at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/bundler-2.3.17/lib/bundler/definition.rb:590
                 initialize at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/bundler-2.3.17/lib/bundler/definition.rb:134
              to_definition at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/bundler-2.3.17/lib/bundler/dsl.rb:219
                   evaluate at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/bundler-2.3.17/lib/bundler/dsl.rb:13
                      build at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/bundler-2.3.17/lib/bundler/definition.rb:38
                 definition at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/bundler-2.3.17/lib/bundler.rb:208
                      setup at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/bundler-2.3.17/lib/bundler.rb:156
                     setup! at C:/Apps/ELASTIC/logstash-8.3.1/lib/bootstrap/bundler.rb:83
                    execute at C:/Apps/ELASTIC/logstash-8.3.1/lib/pluginmanager/list.rb:33
                        run at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/clamp-1.0.1/lib/clamp/command.rb:68
                    execute at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/clamp-1.0.1/lib/clamp/subcommand/execution.rb:11
                        run at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/clamp-1.0.1/lib/clamp/command.rb:68
                        run at C:/Apps/ELASTIC/logstash-8.3.1/vendor/bundle/jruby/2.5.0/gems/clamp-1.0.1/lib/clamp/command.rb:133
                     <main> at C:\Apps\ELASTIC\logstash-8.3.1\lib\pluginmanager\main.rb:64

I still see the error even after following the instructions to add the following line to the logstash config jvm.options file (this was provided as the solution when this issue occurred for some users running earlier versions of Logstash on Windows):

-Djdk.io.File.enableADS=true

Apologies for the slightly duplicate post with the one that Carlos created, but I'm surprised others have not had this issue.

Thanks,
Steve

hi, does this problem solved in your side?
I also puzzled by the same problem with new version 8.3.2.

--》update:problem gone after I set LS_JAVA_HOME.

Hi @rainbow ,

Thanks for the update. I'll try setting LS_JAVA_HOME on my side and see if that fixes it too.
I did think that that parameter had been deprecated/was no longer required though...? Will check up on that too!

OK....just checked the documentation and the parameter hasn't been deprecated, but it's pretty clearly stated that you should only need to set it if you want to use a different JDK than the one bundled with Logstash.

Given I'm happy to use the bundled JDK, I shouldn't need to set LS_JAVA_HOME I don't believe....

Cheers,
Steve

Thanks to robbavey for pointing out that the Java option can be passed to JRuby using

set JRUBY_OPTS=-J-Djdk.io.File.enableADS=true

There is also now an open issue to get this fixed in the .bat files

Thanks for the update @Badger . I'll keep an eye out for the fix being released in a later version.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.