logstash-input-beats 3.1.1-java → 3.1.2-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 768ccce03701a2fe20bcdefafe058fb754cfa00a
4
- data.tar.gz: e28accad116b6b3e4feed499963e335cb7ce156c
3
+ metadata.gz: 8339387a4908bb5c514cd12af2227e9d973807e2
4
+ data.tar.gz: 6884b50706bc767c102e9a687302a4e603f05929
5
5
  SHA512:
6
- metadata.gz: b3323df3ca381add52492e2162950cad4179f40b06d96d8eaceac395e0dfacb2011b50784e1d705241ad047f2d89086030065093623728fb4a365d364ea8da51
7
- data.tar.gz: 79b695fa6f4f9c4316df81b7cbbdea25435358917e6eb32a53ed097a138dcd19bed249ae44b40738e226c4fdcb9a95b7886dc4463caabe87fa53833bbaaed2fa
6
+ metadata.gz: c7db638b764af26e2390244839e73fafee784ec4befccca389c74cddda368bdcb6c498d183b819295d3581380b807ab7dd69b0099bb6f3778e8dc7b8f4f91e41
7
+ data.tar.gz: 9c0885a173b525c2776af339f9c5b87e1bf065e7ff1f1d24492d5de3a5f3d3ae46d071e16fb7d11c3945e27023d6af9477d5ad4b5a351f4acb93a4d1216b1447
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 3.1.2
2
+ - Propagate SSL handshake error correctly
3
+ - Move back to log4j 1, to make it work better under logstash 2.4
4
+
1
5
  ## 3.1.1
2
6
  - Remove the SSL Converter, Private Key must be in the PKCS8 format, which is the default of any newer OpenSSL library
3
7
  - Replace FileInputStream with File reference to let netty handle correctly the certificates
@@ -6,8 +10,6 @@
6
10
  - Fix an issue when the input could hang forever when stopping Logstash
7
11
  - [Doc changes] Add Logstash config example and clarify use of the `type` config option
8
12
 
9
-
10
-
11
13
  ## 3.1.0
12
14
  - Fix a NullPointer Exception https://github.com/elastic/logstash/issues/5756
13
15
  - Log4j ERROR will now be propagated upstream, IE: InvalidCertificate OR InvalidFrameType.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.1
1
+ 3.1.2
@@ -1,15 +1,12 @@
1
1
  # AUTOGENERATED BY THE GRADLE SCRIPT. DO NOT EDIT.
2
2
 
3
3
  require 'jar_dependencies'
4
- require_jar('org.apache.logging.log4j', 'log4j-1.2-api', '2.6.1')
5
- require_jar('org.apache.logging.log4j', 'log4j-slf4j-impl', '2.6.1')
6
4
  require_jar('io.netty', 'netty-all', '4.1.3.Final')
7
5
  require_jar('io.netty', 'netty-tcnative-boringssl-static', '1.1.33.Fork17')
8
- require_jar('org.apache.logging.log4j', 'log4j-api', '2.6.1')
9
- require_jar('org.apache.logging.log4j', 'log4j-core', '2.6.1')
10
6
  require_jar('org.javassist', 'javassist', '3.20.0-GA')
11
7
  require_jar('com.fasterxml.jackson.core', 'jackson-core', '2.7.5')
12
8
  require_jar('com.fasterxml.jackson.core', 'jackson-annotations', '2.7.5')
13
9
  require_jar('com.fasterxml.jackson.core', 'jackson-databind', '2.7.5')
14
10
  require_jar('com.fasterxml.jackson.module', 'jackson-module-afterburner', '2.7.5')
15
- require_jar('org.logstash.beats', 'logstash-input-beats', '3.1.1')
11
+ require_jar('log4j', 'log4j', '1.2.17')
12
+ require_jar('org.logstash.beats', 'logstash-input-beats', '3.1.2')
@@ -6,7 +6,6 @@ require "logstash/codecs/identity_map_codec"
6
6
  require "logstash/codecs/multiline"
7
7
  require "logstash/util"
8
8
  require "logstash-input-beats_jars"
9
- require "logstash/logging" rescue nil # removed in logstash 5
10
9
 
11
10
  import "org.logstash.beats.Server"
12
11
  import "org.logstash.netty.SslSimpleBuilder"
@@ -139,7 +138,7 @@ class LogStash::Inputs::Beats < LogStash::Inputs::Base
139
138
  config :client_inactivity_timeout, :validate => :number, :default => 15
140
139
 
141
140
  def register
142
- # Compatibilty with logstash < 5 and pre Log4j integration
141
+ # Logstash 2.4
143
142
  if defined?(LogStash::Logging) && LogStash::Logging.respond_to?(:setup_log4j)
144
143
  LogStash::Logging.setup_log4j(@logger)
145
144
  end
@@ -50,12 +50,26 @@ module LogStash module Inputs class Beats
50
50
  unregister_connection(ctx)
51
51
  end
52
52
 
53
- def onException(ctx)
54
- unregister_connection(ctx)
53
+ def onChannelInitializeException(ctx, cause)
54
+ # This is mostly due to a bad certificate or keys, running Logstash in debug mode will show more information
55
+ if cause.is_a?(Java::JavaLang::IllegalArgumentException)
56
+ if input.logger.debug?
57
+ input.logger.error("Looks like you either have an invalid key or your private key was not in PKCS8 format.")
58
+ else
59
+ input.logger.error("Looks like you either have an invalid key or your private key was not in PKCS8 format.", :exception => cause)
60
+ end
61
+ else
62
+ input.logger.warn("Error when creating a connection", :exception => cause.to_s)
63
+ end
64
+ end
65
+
66
+ def onException(ctx, cause)
67
+ unregister_connection(ctx) unless connections_list[ctx].nil?
55
68
  end
56
69
 
57
70
  private
58
71
  def codec(ctx)
72
+ return if connections_list[ctx].nil?
59
73
  connections_list[ctx].codec
60
74
  end
61
75
 
@@ -69,8 +83,9 @@ module LogStash module Inputs class Beats
69
83
  end
70
84
 
71
85
  def flush_buffer(ctx)
72
- transformer = EventTransformCommon.new(@input)
86
+ return if codec(ctx).nil?
73
87
 
88
+ transformer = EventTransformCommon.new(@input)
74
89
  codec(ctx).flush do |event|
75
90
  transformer.transform(event)
76
91
  @queue << event
@@ -86,7 +86,7 @@ describe LogStash::Inputs::Beats::MessageListener do
86
86
 
87
87
  context "onException" do
88
88
  it "remove the connection to the connection list" do
89
- expect { subject.onException(ctx) }.to change { subject.connections_list.count }.by(-1)
89
+ expect { subject.onException(ctx, double("Exception")) }.to change { subject.connections_list.count }.by(-1)
90
90
  end
91
91
 
92
92
  it "calls flush on codec" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-beats
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.1.2
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-25 00:00:00.000000000 Z
11
+ date: 2016-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -266,12 +266,9 @@ files:
266
266
  - vendor/jar-dependencies/com/fasterxml/jackson/module/jackson-module-afterburner/2.7.5/jackson-module-afterburner-2.7.5.jar
267
267
  - vendor/jar-dependencies/io/netty/netty-all/4.1.3.Final/netty-all-4.1.3.Final.jar
268
268
  - vendor/jar-dependencies/io/netty/netty-tcnative-boringssl-static/1.1.33.Fork17/netty-tcnative-boringssl-static-1.1.33.Fork17.jar
269
- - vendor/jar-dependencies/org/apache/logging/log4j/log4j-1.2-api/2.6.1/log4j-1.2-api-2.6.1.jar
270
- - vendor/jar-dependencies/org/apache/logging/log4j/log4j-api/2.6.1/log4j-api-2.6.1.jar
271
- - vendor/jar-dependencies/org/apache/logging/log4j/log4j-core/2.6.1/log4j-core-2.6.1.jar
272
- - vendor/jar-dependencies/org/apache/logging/log4j/log4j-slf4j-impl/2.6.1/log4j-slf4j-impl-2.6.1.jar
269
+ - vendor/jar-dependencies/log4j/log4j/1.2.17/log4j-1.2.17.jar
273
270
  - vendor/jar-dependencies/org/javassist/javassist/3.20.0-GA/javassist-3.20.0-GA.jar
274
- - vendor/jar-dependencies/org/logstash/beats/logstash-input-beats/3.1.1/logstash-input-beats-3.1.1.jar
271
+ - vendor/jar-dependencies/org/logstash/beats/logstash-input-beats/3.1.2/logstash-input-beats-3.1.2.jar
275
272
  homepage: http://www.elastic.co/guide/en/logstash/current/index.html
276
273
  licenses:
277
274
  - Apache License (2.0)