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

Connections dropping #6

Open
confuser opened this issue Feb 18, 2016 · 3 comments
Open

Connections dropping #6

confuser opened this issue Feb 18, 2016 · 3 comments
Assignees

Comments

@confuser
Copy link

Just deployed this to a test server. Works great. However, noticed that the connect/disconnect events appear to be firing every 20 - 60 seconds during periods of no traffic/usage. Is this expected behaviour?

The error argument within the disconnect event as suggested in the tutorial is undefined in this case.

Is this to do with the caveat listed on the lumberjack-protocol readme?

@jwalton
Copy link
Contributor

jwalton commented Feb 18, 2016

Definitely not expected behavior. I have no disconnects across any of our production or test machines in the past 24 hours. Our test machines should be idle right now. Anything interesting in the logstash logs/console output?

@jwalton jwalton self-assigned this Feb 18, 2016
@jlsjonas
Copy link
Contributor

jlsjonas commented Apr 3, 2016

Noticed something similar while setting up a test script for my #7 pull request, the machine where the test elk-stack was set up on was partially unresponsive. elasticsearch & kibana were responding as expected, however a restart of the logstash service fixed following error (shortly after start):

WARN : Disconnected undefined
events.js:154
throw er; // Unhanded 'error' event
^

Error: socket hang up
at TLSSocket.onHangUp (_tls_wrap.js:1089:19)
at TLSSocket.g (events.js:273:16)
at emitNone (events.js:85:20)
at TLSSocket.emit (events.js:179:7)
at endReadableNT (_stream_readable.js:906:12)
at nextTickCallbackWith2Args (node.js:475:9)
at process._tickCallback (node.js:389:17)

@jlsjonas
Copy link
Contributor

jlsjonas commented Apr 7, 2016

still puzzled by this, thought it was related to unresponsiveness from log stash but just invoked the same error through the following:

  • had (testing) settings in my hosts file, redirecting the log stash domain to my router ip (instead of the server handling log stash)
  • got (expected) connection errors when starting the app
  • switched hosts file back to correct settings (just to make sure, directed host to server ip manually)
  • started app again and now everything worked as expected, except for the error as in my previous comment, crashing the app right after sending a disconnect event.

it's puzzling me at this point, especially since flaky connections should be handled, but are instead causing socket hang up errors (not much experience with actual sockets, but to me it looks like you're getting an error for something that's already handled?

Regards
Jonas

edit: The way that I got it working again this time (VERY odd!) is by switching my hosts file to a wrong ip (so that I'm getting refused connection errors back, which are handled correctly) and then (while the app is running) switch back to the correct hosts file (so that the hostname is directed to the ip of the (logstash) server again) which resulted in a "connected" message, and everything seems fine again (for now)
pesky bug!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants