-1

操作系统:Fedora 25 ELK 堆栈版本:5.2(仅适用于 kibanaa+logstash+elasticsearch+filebeat)

注意:我的网络中没有配置代理。所以以下已知问题和解决方案不适用: 已知错误

尝试安装 logstash-filter-translate 如下:

DEBUG=1 bin/logstash-plugin install logstash-filter-translate

我收到以下错误:

0:  ruby-maven (3.3.12) from /usr/share/logstash/vendor/bundle/jruby/1.9/specifications/ruby-maven-3.3.12.gemspec
  jar dependencies for logstash-core-event-java-5.2.2-java.gemspec . . .

Errno::EPERM: Operation not permitted - Operation not permitted
org/jruby/RubyFile.java:1102:in `utime'
/usr/share/logstash/vendor/jruby/lib/ruby/1.9/fileutils.rb:1389:in `copy_metadata'
/usr/share/logstash/vendor/jruby/lib/ruby/1.9/fileutils.rb:466:in `copy_entry'
/usr/share/logstash/vendor/jruby/lib/ruby/1.9/fileutils.rb:1443:in `preorder_traverse'
/usr/share/logstash/vendor/jruby/lib/ruby/1.9/fileutils.rb:462:in `copy_entry'
/usr/share/logstash/vendor/jruby/lib/ruby/1.9/fileutils.rb:521:in `mv'
/usr/share/logstash/vendor/jruby/lib/ruby/1.9/fileutils.rb:1525:in `fu_each_src_dest'
/usr/share/logstash/vendor/jruby/lib/ruby/1.9/fileutils.rb:1541:in `fu_each_src_dest0'
/usr/share/logstash/vendor/jruby/lib/ruby/1.9/fileutils.rb:1523:in `fu_each_src_dest'
/usr/share/logstash/vendor/jruby/lib/ruby/1.9/fileutils.rb:508:in `mv'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/ruby-maven-3.3.12/lib/ruby_maven.rb:84:in `launch'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/ruby-maven-3.3.12/lib/ruby_maven.rb:39:in `exec'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler.rb:245:in `with_clean_env'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler.rb:232:in `with_original_env'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler.rb:238:in `with_clean_env'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/ruby-maven-3.3.12/lib/ruby_maven.rb:38:in `exec'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/ruby-maven-3.3.12/lib/maven/ruby/maven.rb:112:in `exec'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/jar-dependencies-0.3.10/lib/jars/maven_exec.rb:79:in `resolve_dependencies_list'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/jar-dependencies-0.3.10/lib/jars/installer.rb:237:in `install_dependencies'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/jar-dependencies-0.3.10/lib/jars/installer.rb:226:in `do_install'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/jar-dependencies-0.3.10/lib/jars/installer.rb:172:in `vendor_jars'
/usr/share/logstash/vendor/jruby/lib/ruby/shared/jars/post_install_hook.rb:28:in `(root)'
org/jruby/RubyProc.java:281:in `call'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/source/path.rb:215:in `run_hooks'
org/jruby/RubyArray.java:1613:in `each'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/source/path.rb:214:in `run_hooks'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/source/path.rb:195:in `generate_bin'
org/jruby/RubyDir.java:341:in `chdir'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/shared_helpers.rb:53:in `chdir'
/usr/share/logstash/vendor/jruby/lib/ruby/1.9/monitor.rb:211:in `mon_synchronize'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/shared_helpers.rb:52:in `chdir'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/source/path.rb:189:in `generate_bin'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/source/path.rb:73:in `install'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/installer.rb:107:in `install_gem_from_spec'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/installer.rb:269:in `install_sequentially'
org/jruby/RubyArray.java:1613:in `each'
/usr/share/logstash/vendor/jruby/lib/ruby/1.9/forwardable.rb:201:in `each'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/installer.rb:268:in `install_sequentially'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/installer.rb:90:in `run'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/installer.rb:18:in `install'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/cli/install.rb:80:in `run'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/cli.rb:155:in `install'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/cli.rb:10:in `start'
/usr/share/logstash/lib/bootstrap/bundler.rb:152:in `execute_bundler'
/usr/share/logstash/lib/bootstrap/bundler.rb:113:in `invoke!'
/usr/share/logstash/lib/pluginmanager/install.rb:142:in `install_gems_list!'
/usr/share/logstash/lib/pluginmanager/install.rb:61:in `execute'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/subcommand/execution.rb:11:in `execute'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67:in `run'
/usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132:in `run'
/usr/share/logstash/lib/pluginmanager/main.rb:46:in `(root)'
Bundler::InstallError: An error occurred while installing logstash-core-event-java (5.2.2), and Bundler cannot continue.
Make sure that `gem install logstash-core-event-java -v '5.2.2'` succeeds before bundling.
  install_gem_from_spec at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/installer.rb:145
   install_sequentially at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/installer.rb:269
                   each at org/jruby/RubyArray.java:1613
                   each at /usr/share/logstash/vendor/jruby/lib/ruby/1.9/forwardable.rb:201
   install_sequentially at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/installer.rb:268
                    run at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/installer.rb:90
                install at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/installer.rb:18
                    run at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/cli/install.rb:80
                install at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/cli.rb:155
                    run at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/vendor/thor/lib/thor/command.rb:27
         invoke_command at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/vendor/thor/lib/thor/invocation.rb:126
               dispatch at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/vendor/thor/lib/thor.rb:359
                  start at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/vendor/thor/lib/thor/base.rb:440
                  start at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/bundler-1.9.10/lib/bundler/cli.rb:10
        execute_bundler at /usr/share/logstash/lib/bootstrap/bundler.rb:152
                invoke! at /usr/share/logstash/lib/bootstrap/bundler.rb:113
     install_gems_list! at /usr/share/logstash/lib/pluginmanager/install.rb:142
                execute at /usr/share/logstash/lib/pluginmanager/install.rb:61
                    run at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67
                execute at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/subcommand/execution.rb:11
                    run at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:67
                    run at /usr/share/logstash/vendor/bundle/jruby/1.9/gems/clamp-0.6.5/lib/clamp/command.rb:132
                 (root) at /usr/share/logstash/lib/pluginmanager/main.rb:46
4

1 回答 1

0

我会建议你不同的方式。转到此插件的 github 存储库。然后将其拉到您的本地计算机上。然后在您的 logstash 目录中编辑 .gem 文件。修改下面的命令并在那里添加。

gem "logstash-type-pluginname", :path => "the_path_of_plugin"

然后运行以下命令。

bin/logstash-plugin install --no-verify

使用此插件后。这种方式也让您有机会根据您的目的改进插件代码。

于 2021-02-25T17:24:04.190 回答