fix #88 and many others with Failed to handshake #89
+12
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello! Please merge this pull request because this issue prevents the use of this plugin already for two years!!! There are many issues related to this problem but no one fixed it. The fix is elementary.
Error: MONGODB | Failed to handshake with test-mongo: 27017, wrong number of arguments (given 2, expected 1)
Backtrace :
"/usr/share/logstash/vendor/logstash-output-mongodb/lib/logstash/outputs/bson/logstash_timestamp.rb:37:in
from_bson'", "/usr/share/logstash/vendor/bundle/jruby/2.5.0/gems/bson-4.15.0-java/lib/bson/hash.rb:123:in
from_bson'"File: bson-4.15.0-java/lib/bson/hash.rb:123 ^
115 while (type = buffer.get_byte) != NULL_BYTE
116 field = buffer.get_cstring
117 cls = BSON::Registry.get(type, field)
118 value = if options.empty?
119 # Compatibility with the older Ruby driver versions which define
120 # a DBRef class with from_bson accepting a single argument.
121 cls.from_bson(buffer)
122 else
123 cls.from_bson(buffer, **options) <<- the call here with 2 arguments, but all definitions were done for single arg
124 end
125 hash.store(field, value)
126 end