Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce errors on filebeat syslog stop #8347

Merged
merged 3 commits into from Sep 20, 2018

Conversation

Projects
None yet
2 participants
@jsoriano
Copy link
Member

commented Sep 18, 2018

Fix a couple of errors seen when syslog input is stopped.

In case the input couldn't be started (e.g. port was already in use), there was a nil pointer reference when trying to stop it:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x12facac]

goroutine 81 [running]:
github.com/elastic/beats/filebeat/inputsource/udp.(*Server).Stop(0xc42008a100)
	/go/src/github.com/elastic/beats/filebeat/inputsource/udp/server.go:118 +0x7c
github.com/elastic/beats/filebeat/input/syslog.(*Input).Stop(0xc42008a140)
	/go/src/github.com/elastic/beats/filebeat/input/syslog/input.go:189 +0xeb
github.com/elastic/beats/filebeat/input.(*Runner).stop(0xc42025e2a0)
	/go/src/github.com/elastic/beats/filebeat/input/input.go:173 +0xcd
github.com/elastic/beats/filebeat/input.(*Runner).Start.func1.1(0xc420277410, 0xc42025e2a0)
	/go/src/github.com/elastic/beats/filebeat/input/input.go:128 +0x39
github.com/elastic/beats/filebeat/input.(*Runner).Start.func1(0xc420277410, 0xc42025e2a0)
	/go/src/github.com/elastic/beats/filebeat/input/input.go:133 +0x5c
created by github.com/elastic/beats/filebeat/input.(*Runner).Start
	/go/src/github.com/elastic/beats/filebeat/input/input.go:125 +0x16e

In any case, on stop, this error was logged lots of times:

2018-09-18T17:37:42.818Z	ERROR	[udp]	udp/server.go:99	Error reading from the socket *net.OpError read udp 127.0.0.1:9000: use of closed network connection	{"address": "localhost:9000"}
@ph

ph approved these changes Sep 18, 2018

@ph

This comment has been minimized.

Copy link
Member

commented Sep 18, 2018

@jsoriano Maybe add a changelog entry?

@jsoriano

This comment has been minimized.

Copy link
Member Author

commented Sep 19, 2018

Changelog entry added

@jsoriano jsoriano force-pushed the jsoriano:filebeat-syslog-stop branch from ff2be84 to 3634106 Sep 19, 2018

@jsoriano

This comment has been minimized.

Copy link
Member Author

commented Sep 19, 2018

jenkins, test this again please

@jsoriano jsoriano merged commit 9b27040 into elastic:master Sep 20, 2018

3 of 4 checks passed

beats-ci Build finished.
Details
CLA Commit author has signed the CLA
Details
Hound No violations found. Woof!
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jsoriano jsoriano deleted the jsoriano:filebeat-syslog-stop branch Sep 20, 2018

jsoriano added a commit to jsoriano/beats that referenced this pull request Sep 20, 2018

Reduce errors on filebeat syslog stop (elastic#8347)
Fix a couple of errors seen when syslog input is stopped.

In case the input couldn't be started (e.g. port was already in use),
there was a nil pointer reference error when trying to stop it.

In any case, on stop, an error about use of closed connection was logged
lots of times:

(cherry picked from commit 9b27040)

@jsoriano jsoriano added v6.5.0 and removed needs_backport labels Sep 20, 2018

jsoriano added a commit to jsoriano/beats that referenced this pull request Sep 20, 2018

Reduce errors on filebeat syslog stop (elastic#8347)
Fix a couple of errors seen when syslog input is stopped.

In case the input couldn't be started (e.g. port was already in use),
there was a nil pointer reference error when trying to stop it.

In any case, on stop, an error about use of closed connection was logged
lots of times:

(cherry picked from commit 9b27040)

@jsoriano jsoriano added the v6.4.2 label Sep 20, 2018

jsoriano added a commit to jsoriano/beats that referenced this pull request Sep 20, 2018

Reduce errors on filebeat syslog stop (elastic#8347)
Fix a couple of errors seen when syslog input is stopped.

In case the input couldn't be started (e.g. port was already in use),
there was a nil pointer reference error when trying to stop it.

In any case, on stop, an error about use of closed connection was logged
lots of times:

(cherry picked from commit 9b27040)

jsoriano added a commit that referenced this pull request Sep 24, 2018

Reduce errors on filebeat syslog stop (#8347) (#8377)
Fix a couple of errors seen when syslog input is stopped.

In case the input couldn't be started (e.g. port was already in use),
there was a nil pointer reference error when trying to stop it.

In any case, on stop, an error about use of closed connection was logged
lots of times.

(cherry picked from commit 9b27040)

jsoriano added a commit that referenced this pull request Oct 16, 2018

Reduce errors on filebeat syslog stop (#8347) (#8376)
Fix a couple of errors seen when syslog input is stopped.

In case the input couldn't be started (e.g. port was already in use),
there was a nil pointer reference error when trying to stop it.

In any case, on stop, an error about use of closed connection was logged
lots of times:

(cherry picked from commit 9b27040)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.