From a10a59e277fb1e2b6bdbb234f16dc5311b148639 Mon Sep 17 00:00:00 2001 From: urso Date: Wed, 27 Apr 2016 15:07:17 +0200 Subject: [PATCH] Fix output plugins blocking startup if remote is not reachable. Resolves #1213 --- CHANGELOG.asciidoc | 1 + libbeat/outputs/mode/single.go | 1 - libbeat/outputs/mode/single_test.go | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index 44892cb3e755..dc379b95061c 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -48,6 +48,7 @@ https://github.com/elastic/beats/compare/v5.0.0-alpha1...master[Check the HEAD d - Fix bug affecting -cpuprofile, -memprofile, and -httpprof CLI flags {pull}1415[1415] - Fix race when multiple outputs access the same event with logstash output manipulating event {issue}1410[1410] {pull}1428[1428] - Seed random number generator using crypto.rand package. {pull}1503{1503] +- Fix beats hanging in -configtest {issue}1213[1213] *Packetbeat* diff --git a/libbeat/outputs/mode/single.go b/libbeat/outputs/mode/single.go index 5500a34d779a..c4ae33c0a0c6 100644 --- a/libbeat/outputs/mode/single.go +++ b/libbeat/outputs/mode/single.go @@ -45,7 +45,6 @@ func NewSingleConnectionMode( maxAttempts: maxAttempts, } - _ = s.connect() // try to connect, but ignore errors for now return s, nil } diff --git a/libbeat/outputs/mode/single_test.go b/libbeat/outputs/mode/single_test.go index bfe14c7116ac..4d49f1bc85dd 100644 --- a/libbeat/outputs/mode/single_test.go +++ b/libbeat/outputs/mode/single_test.go @@ -46,7 +46,7 @@ func testSingleConnectFailConnectAndSend(t *testing.T, events []eventInfo) { &mockClient{ connected: false, close: closeOK, - connect: failConnect(4, errFail), // 3 fails + 1 on create + connect: failConnect(3, errFail), // 3 fails publish: collectPublish(&collected), }, },