-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On Windows, bugfix_jruby_2558.rb breaks plugins using peeraddr with a parameter #3364
Comments
Nice catch @driskell, changing the method definition and delegation from: def peeraddr
orig_peeraddr.map do |v| to def peeraddr(*args)
orig_peeraddr(*args).map do |v| Seems to address the problem. I'll submit a PR to fix |
I couldn't find RubyIPSocket.java in logstash 1.5.0 |
@Rajeshkumar123 You'll be looking for lib/logstash/patches/bugfix_jruby_2558.rb See here for the change details: |
@driskell Awesome Its working fine. |
Closed #3365 |
wrong number of arguments calling 'peeraddr' (1 for 0)
Following file is the cause:
https://github.com/elastic/logstash/blob/f97c01da0631566e0ec07c9a076286e22a8f43a9/lib/logstash/patches/bugfix_jruby_2558.rb
Seems to be a very old patch that re-implements
peeraddr
, albeit not allowing any parameter.TCPSocket.peeraddr
andUDPSocket.peeraddr
have allowed a parameter in MRI since at least 1.9.3 (http://ruby-doc.org/stdlib-1.9.3/libdoc/socket/rdoc/IPSocket.html#method-i-peeraddr), and in JRuby since 1.7.0 (jruby/jruby@d835b3c). This parameter allows reverse lookup to be disabled.MRI allows :numeric symbol as well as boolean value, but JRuby only supports the boolean value.
However, using either when using Logstash breaks the plugin.
The text was updated successfully, but these errors were encountered: