fluent-plugin-syslog-gobi-tls 2.1.20 → 2.1.22
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.
- checksums.yaml +4 -4
- data/fluent-plugin-syslog-tls.gemspec +1 -1
- data/lib/syslog_tls/ssl_transport.rb +23 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b62abd71ee14fcaa7a3776e147c4e8f838986b0a590061831c64b99e7da074bf
|
4
|
+
data.tar.gz: 8528e7e1de2a0a82fb79a873c33707bc3f44c22c305103d48b5d0441f621fa68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24776cb28d84a3f7ff4275c56e48e9218ecc619703b697bb2d2d087b0ab68a9ee09f182f65a4bac3322803b72c63ce8ffa0b4018ae9b65fdcb807df16d17226f
|
7
|
+
data.tar.gz: 64d9e2384473e4c055f784afc546a705c1eec8d762a455b0408a0404a5b7587c2add2b5e3c409f5c802dc05daf414c87fefd5aa0c32afe1e37b4f29665d1b9a5
|
@@ -19,7 +19,7 @@ require 'syslog_tls/version'
|
|
19
19
|
|
20
20
|
Gem::Specification.new do |s|
|
21
21
|
s.name = 'fluent-plugin-syslog-gobi-tls'
|
22
|
-
s.version = '2.1.
|
22
|
+
s.version = '2.1.22'
|
23
23
|
s.summary = %q{Fluent Syslog TLS output plugin}
|
24
24
|
s.authors = ['thomas morgan']
|
25
25
|
s.email = ['tm@iprog.com']
|
@@ -50,10 +50,16 @@ module SyslogTls
|
|
50
50
|
@socket = get_ssl_connection
|
51
51
|
begin
|
52
52
|
begin
|
53
|
+
timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
|
54
|
+
puts "[#{timestamp}] in connect doing connect_nonblock"
|
53
55
|
@socket.connect_nonblock
|
54
|
-
rescue Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitReadable
|
56
|
+
rescue Errno::EAGAIN, Errno::EWOULDBLOCK, IO::WaitReadable => e
|
57
|
+
timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
|
58
|
+
puts "[#{timestamp}] in connect EAGAIN rescue: #{e.class} exception #{e.message} "
|
55
59
|
select_with_timeout(@socket, :connect_read) && retry
|
56
|
-
rescue IO::WaitWritable
|
60
|
+
rescue IO::WaitWritable => e
|
61
|
+
timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
|
62
|
+
puts "[#{timestamp}] in connect WaitWritable rescue: #{e.class} exception #{e.message} "
|
57
63
|
select_with_timeout(@socket, :connect_write) && retry
|
58
64
|
end
|
59
65
|
rescue Errno::ETIMEDOUT
|
@@ -79,16 +85,29 @@ module SyslogTls
|
|
79
85
|
tcp.setsockopt(Socket::SOL_SOCKET, Socket::Constants::SO_REUSEPORT, true)
|
80
86
|
tcp.connect_nonblock(sock_addr)
|
81
87
|
rescue Errno::EINPROGRESS
|
88
|
+
timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
|
89
|
+
puts "[#{timestamp}] in get_tcp_connection EINPROGRESS exception during TCP connection:"
|
90
|
+
puts "[#{timestamp}] Message: #{e.message}"
|
82
91
|
select_with_timeout(tcp, :connect_write)
|
83
92
|
begin
|
93
|
+
timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
|
94
|
+
puts "[#{timestamp}] in get_tcp_connection after select_with_timeout"
|
84
95
|
tcp.connect_nonblock(sock_addr)
|
85
96
|
rescue Errno::EISCONN
|
97
|
+
timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
|
98
|
+
puts "[#{timestamp}] in get_tcp_connection in EISCONN"
|
86
99
|
# all good
|
87
100
|
rescue SystemCallError
|
101
|
+
timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
|
102
|
+
puts "[#{timestamp}] in get_tcp_connection SystemCallError exception during TCP connection:"
|
103
|
+
puts "[#{timestamp}] Message: #{e.message}"
|
88
104
|
tcp.close rescue nil
|
89
105
|
raise
|
90
106
|
end
|
91
107
|
rescue SystemCallError
|
108
|
+
timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
|
109
|
+
puts "[#{timestamp}] in get_tcp_connection SystemCallError outer exception during TCP connection:"
|
110
|
+
puts "[#{timestamp}] Message: #{e.message}"
|
92
111
|
tcp.close rescue nil
|
93
112
|
raise
|
94
113
|
end
|
@@ -98,6 +117,8 @@ module SyslogTls
|
|
98
117
|
end
|
99
118
|
|
100
119
|
def get_ssl_connection
|
120
|
+
timestamp = Time.now.strftime("%Y-%m-%d %H:%M:%S")
|
121
|
+
puts "[#{timestamp}] in get_ssl_connection"
|
101
122
|
tcp = get_tcp_connection
|
102
123
|
|
103
124
|
ctx = OpenSSL::SSL::SSLContext.new
|