logstash-input-tcp 7.0.6-java → 7.0.9-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (16) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/lib/logstash/inputs/tcp.rb +6 -2
  4. data/lib/logstash-input-tcp_jars.rb +8 -8
  5. data/spec/inputs/tcp_spec.rb +34 -15
  6. data/vendor/jar-dependencies/io/netty/netty-buffer/{4.1.131.Final/netty-buffer-4.1.131.Final.jar → 4.1.133.Final/netty-buffer-4.1.133.Final.jar} +0 -0
  7. data/vendor/jar-dependencies/io/netty/netty-codec/{4.1.131.Final/netty-codec-4.1.131.Final.jar → 4.1.133.Final/netty-codec-4.1.133.Final.jar} +0 -0
  8. data/vendor/jar-dependencies/io/netty/netty-common/{4.1.131.Final/netty-common-4.1.131.Final.jar → 4.1.133.Final/netty-common-4.1.133.Final.jar} +0 -0
  9. data/vendor/jar-dependencies/io/netty/netty-handler/{4.1.131.Final/netty-handler-4.1.131.Final.jar → 4.1.133.Final/netty-handler-4.1.133.Final.jar} +0 -0
  10. data/vendor/jar-dependencies/io/netty/netty-resolver/{4.1.131.Final/netty-resolver-4.1.131.Final.jar → 4.1.133.Final/netty-resolver-4.1.133.Final.jar} +0 -0
  11. data/vendor/jar-dependencies/io/netty/netty-transport/{4.1.131.Final/netty-transport-4.1.131.Final.jar → 4.1.133.Final/netty-transport-4.1.133.Final.jar} +0 -0
  12. data/vendor/jar-dependencies/io/netty/netty-transport-native-unix-common/{4.1.131.Final/netty-transport-native-unix-common-4.1.131.Final.jar → 4.1.133.Final/netty-transport-native-unix-common-4.1.133.Final.jar} +0 -0
  13. data/vendor/jar-dependencies/org/logstash/inputs/logstash-input-tcp/7.0.9/logstash-input-tcp-7.0.9.jar +0 -0
  14. data/version +1 -1
  15. metadata +10 -10
  16. data/vendor/jar-dependencies/org/logstash/inputs/logstash-input-tcp/7.0.6/logstash-input-tcp-7.0.6.jar +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 299cabfde56cf894cf26672447a5e658376c98b912637973c06bd3fcc44b6fd3
4
- data.tar.gz: bca3e534d02e529237d748608b1c1cde28ddcfe96f40c7bb2da12405e74dcf11
3
+ metadata.gz: e7cd142522b1805fdc83d5a910c2b825103e87746194ad5a1bbca35076ff8b46
4
+ data.tar.gz: bfba36ff5d780899e4eb4f75931e97042f6c125b8ce9b023b9930cb836e0b239
5
5
  SHA512:
6
- metadata.gz: 7465a17b4196b1220098f186d9d97fc02ba400e67d604d9f31cdbdcd49d2bb9ccefde76309b1cb7f73c0ae533ca131a7317f64cce1dec98f1732683e22612eb7
7
- data.tar.gz: 239ff939a0fb48938ddcd1e1158e62ec1c0b7de93d700b4e076d3e8057fc3bf8d239e2e7c09608afe3769a2333640743ab8ffb9dd8afd2f407306b2c7042a766
6
+ metadata.gz: 2e7731159abda49c8ddd34368c4d4d090eef43e0903195cc295c9539cc7391ab9709428192dd55405e78894e6fa656ec32ca04bcd317898223ce7c1305cc2716
7
+ data.tar.gz: ee960d94e42139449e91192f6a031c1bb9f2e641fd5e68b8681f93b17b715c12b14d00855bcb48edd178976ea1e4b8c8cb1a7520539dafb3236d0f6d73aeeaac
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 7.0.9
2
+ - Update Netty dependency to 4.1.133.Final [#256](https://github.com/logstash-plugins/logstash-input-tcp/pull/256)
3
+
4
+ ## 7.0.8
5
+ - When configured to use a port that is already in use, the failure is now propagated to the pipeline [#250](https://github.com/logstash-plugins/logstash-input-tcp/pull/250)
6
+ This fixes an issue where a misconfigured input could retry indefinitely while Logstash's health report continued to report the pipeline as healthy.
7
+
8
+ ## 7.0.7
9
+ - Update Netty dependency to 4.1.132.Final [#249](https://github.com/logstash-plugins/logstash-input-tcp/pull/249)
10
+
1
11
  ## 7.0.6
2
12
  - Upgrade netty to 4.1.131 [#246](https://github.com/logstash-plugins/logstash-input-tcp/pull/246)
3
13
 
@@ -177,7 +177,12 @@ class LogStash::Inputs::Tcp < LogStash::Inputs::Base
177
177
  validate_ssl_config!
178
178
 
179
179
  if server?
180
- @loop = InputLoop.new(@id, @host, @port, DecoderImpl.new(@codec, self), @tcp_keep_alive, java_ssl_context)
180
+ begin
181
+ @logger.info("Binding tcp input listener", :address => "#{@host}:#{@port}", :ssl_enabled => @ssl_enabled)
182
+ @loop = InputLoop.new(@id, @host, @port, DecoderImpl.new(@codec, self), @tcp_keep_alive, java_ssl_context)
183
+ rescue java.net.BindException => bind_exception
184
+ fail LogStash::ConfigurationError, "could not bind to #{@host}:#{@port}; #{bind_exception.message}"
185
+ end
181
186
  end
182
187
  end
183
188
 
@@ -503,5 +508,4 @@ class LogStash::Inputs::Tcp < LogStash::Inputs::Base
503
508
  end
504
509
  error_details
505
510
  end
506
-
507
511
  end
@@ -1,12 +1,12 @@
1
1
  # AUTOGENERATED BY THE GRADLE SCRIPT. DO NOT EDIT.
2
2
 
3
3
  require 'jar_dependencies'
4
- require_jar('io.netty', 'netty-handler', '4.1.131.Final')
4
+ require_jar('io.netty', 'netty-handler', '4.1.133.Final')
5
5
  require_jar('commons-io', 'commons-io', '2.17.0')
6
- require_jar('io.netty', 'netty-transport-native-unix-common', '4.1.131.Final')
7
- require_jar('io.netty', 'netty-codec', '4.1.131.Final')
8
- require_jar('io.netty', 'netty-transport', '4.1.131.Final')
9
- require_jar('io.netty', 'netty-resolver', '4.1.131.Final')
10
- require_jar('io.netty', 'netty-buffer', '4.1.131.Final')
11
- require_jar('io.netty', 'netty-common', '4.1.131.Final')
12
- require_jar('org.logstash.inputs', 'logstash-input-tcp', '7.0.6')
6
+ require_jar('io.netty', 'netty-transport-native-unix-common', '4.1.133.Final')
7
+ require_jar('io.netty', 'netty-codec', '4.1.133.Final')
8
+ require_jar('io.netty', 'netty-transport', '4.1.133.Final')
9
+ require_jar('io.netty', 'netty-resolver', '4.1.133.Final')
10
+ require_jar('io.netty', 'netty-buffer', '4.1.133.Final')
11
+ require_jar('io.netty', 'netty-common', '4.1.133.Final')
12
+ require_jar('org.logstash.inputs', 'logstash-input-tcp', '7.0.9')
@@ -21,19 +21,27 @@ require 'logstash/plugin_mixins/ecs_compatibility_support/spec_helper'
21
21
  #Cabin::Channel.get(LogStash).level = :debug
22
22
  describe LogStash::Inputs::Tcp, :ecs_compatibility_support do
23
23
 
24
- def get_port
25
- begin
26
- # Start high to better avoid common services
27
- port = rand(10000..65535)
28
- s = TCPServer.new("127.0.0.1", port)
29
- s.close
30
- return port
31
- rescue Errno::EADDRINUSE
32
- retry
33
- end
24
+ ##
25
+ # yield the block with a port that is available
26
+ # @return [Integer]: a port that is available
27
+ def find_available_port(host)
28
+ with_bound_port(host: host, &:itself)
29
+ end
30
+
31
+ ##
32
+ # Yields block with a port that is unavailable
33
+ # @yieldparam port [Integer]
34
+ # @yieldreturn [Object]
35
+ # @return [Object]
36
+ def with_bound_port(host:"::", port:0, &block)
37
+ server = TCPServer.new(host, port)
38
+
39
+ return yield(server.local_address.ip_port)
40
+ ensure
41
+ server.close
34
42
  end
35
43
 
36
- let(:port) { get_port }
44
+ let(:port) { find_available_port("127.0.0.1") }
37
45
 
38
46
  context "codec (PR #1372)" do
39
47
  it "switches from plain to line" do
@@ -373,6 +381,17 @@ describe LogStash::Inputs::Tcp, :ecs_compatibility_support do
373
381
  expect { subject.register }.to_not raise_error
374
382
  end
375
383
 
384
+ context "when the port is unavailable" do
385
+ it 'raises a helpful exception' do
386
+ with_bound_port(host: "127.0.0.1", port: port) do |unavailable_port|
387
+ expect do
388
+ subject.register
389
+ end.to raise_error(LogStash::ConfigurationError)
390
+ .with_message(a_string_including("could not bind to #{subject.host}:#{subject.port}"))
391
+ end
392
+ end
393
+ end
394
+
376
395
  context "when using ssl" do
377
396
  let(:config) do
378
397
  {
@@ -859,7 +878,7 @@ describe LogStash::Inputs::Tcp, :ecs_compatibility_support do
859
878
  base_config.merge 'ssl_cipher_suites' => [ cipher_suite ]
860
879
  end
861
880
 
862
- let(:cipher_suite) { 'TLS_RSA_WITH_AES_128_GCM_SHA256' }
881
+ let(:cipher_suite) { 'TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256' }
863
882
 
864
883
  it "should be able to connect and write data" do
865
884
  used_cipher_suite = nil
@@ -878,7 +897,7 @@ describe LogStash::Inputs::Tcp, :ecs_compatibility_support do
878
897
 
879
898
  context "with unsupported client cipher" do
880
899
  let(:config) do
881
- base_config.merge 'ssl_cipher_suites' => [ 'TLS_RSA_WITH_AES_128_GCM_SHA256', 'TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256' ]
900
+ base_config.merge 'ssl_cipher_suites' => [ 'TLS_DHE_RSA_WITH_AES_128_GCM_SHA256', 'TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256' ]
882
901
  end
883
902
 
884
903
  let(:sslcontext) do
@@ -994,11 +1013,11 @@ describe LogStash::Inputs::Tcp, :ecs_compatibility_support do
994
1013
  super().merge 'ssl_cipher_suites' => [ cipher_suite ]
995
1014
  end
996
1015
 
997
- let(:cipher_suite) { 'TLS_RSA_WITH_AES_128_GCM_SHA256' }
1016
+ let(:cipher_suite) { 'TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256' }
998
1017
 
999
1018
  it "sets ciphers" do
1000
1019
  cipher_ary = ssl_context.ciphers.first
1001
- expect( cipher_ary[0] ).to eql 'AES128-GCM-SHA256'
1020
+ expect( cipher_ary[0] ).to eql 'ECDHE-RSA-AES128-GCM-SHA256'
1002
1021
  end
1003
1022
 
1004
1023
  end
data/version CHANGED
@@ -1 +1 @@
1
- 7.0.6
1
+ 7.0.9
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-tcp
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.6
4
+ version: 7.0.9
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-02-10 00:00:00.000000000 Z
10
+ date: 2026-05-06 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: logstash-core-plugin-api
@@ -231,14 +231,14 @@ files:
231
231
  - spec/inputs/tcp_spec.rb
232
232
  - spec/spec_helper.rb
233
233
  - vendor/jar-dependencies/commons-io/commons-io/2.17.0/commons-io-2.17.0.jar
234
- - vendor/jar-dependencies/io/netty/netty-buffer/4.1.131.Final/netty-buffer-4.1.131.Final.jar
235
- - vendor/jar-dependencies/io/netty/netty-codec/4.1.131.Final/netty-codec-4.1.131.Final.jar
236
- - vendor/jar-dependencies/io/netty/netty-common/4.1.131.Final/netty-common-4.1.131.Final.jar
237
- - vendor/jar-dependencies/io/netty/netty-handler/4.1.131.Final/netty-handler-4.1.131.Final.jar
238
- - vendor/jar-dependencies/io/netty/netty-resolver/4.1.131.Final/netty-resolver-4.1.131.Final.jar
239
- - vendor/jar-dependencies/io/netty/netty-transport-native-unix-common/4.1.131.Final/netty-transport-native-unix-common-4.1.131.Final.jar
240
- - vendor/jar-dependencies/io/netty/netty-transport/4.1.131.Final/netty-transport-4.1.131.Final.jar
241
- - vendor/jar-dependencies/org/logstash/inputs/logstash-input-tcp/7.0.6/logstash-input-tcp-7.0.6.jar
234
+ - vendor/jar-dependencies/io/netty/netty-buffer/4.1.133.Final/netty-buffer-4.1.133.Final.jar
235
+ - vendor/jar-dependencies/io/netty/netty-codec/4.1.133.Final/netty-codec-4.1.133.Final.jar
236
+ - vendor/jar-dependencies/io/netty/netty-common/4.1.133.Final/netty-common-4.1.133.Final.jar
237
+ - vendor/jar-dependencies/io/netty/netty-handler/4.1.133.Final/netty-handler-4.1.133.Final.jar
238
+ - vendor/jar-dependencies/io/netty/netty-resolver/4.1.133.Final/netty-resolver-4.1.133.Final.jar
239
+ - vendor/jar-dependencies/io/netty/netty-transport-native-unix-common/4.1.133.Final/netty-transport-native-unix-common-4.1.133.Final.jar
240
+ - vendor/jar-dependencies/io/netty/netty-transport/4.1.133.Final/netty-transport-4.1.133.Final.jar
241
+ - vendor/jar-dependencies/org/logstash/inputs/logstash-input-tcp/7.0.9/logstash-input-tcp-7.0.9.jar
242
242
  - version
243
243
  homepage: https://elastic.co/logstash
244
244
  licenses: