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

[logging] Corrects intercept of ECONNRESET #31742

Merged
merged 4 commits into from
Feb 23, 2019

Conversation

tylersmalley
Copy link
Contributor

@tylersmalley tylersmalley commented Feb 21, 2019

errno is not set for ECONNRESET

https://github.com/hapijs/wreck/blob/29d8f4b5eaa12c5d44c642130cd6002c1d83ffd2/lib/index.js#L290

Closes #22225

Testing:

  • Start Kibana with SSL: yarn start --ssl
  • Refresh the page before the page has fully loaded.

Example:

{ Error: socket hang up
  at TLSSocket.onSocketClose (_tls_wrap.js:761:23)
  at TLSSocket.emit (events.js:194:15)
  at _handle.close (net.js:600:12)
  at Socket.done (_tls_wrap.js:388:7)
  at Object.onceWrapper (events.js:277:13)
  at Socket.emit (events.js:189:13)
  at TCP._handle.close (net.js:600:12) code: 'ECONNRESET'

errno is not set for ECONNRESET

https://github.com/hapijs/wreck/blob/29d8f4b5eaa12c5d44c642130cd6002c1d83ffd2/lib/index.js#L290

Closes elastic#22225

Example:

{ Error: socket hang up
  at TLSSocket.onSocketClose (_tls_wrap.js:761:23)
  at TLSSocket.emit (events.js:194:15)
  at _handle.close (net.js:600:12)
  at Socket.done (_tls_wrap.js:388:7)
  at Object.onceWrapper (events.js:277:13)
  at Socket.emit (events.js:189:13)
  at TCP._handle.close (net.js:600:12) code: 'ECONNRESET'

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations

@tylersmalley
Copy link
Contributor Author

@joshdover do you know if we would ever expect a ECONNRESET for errno where code was also not supplied?

@tylersmalley
Copy link
Contributor Author

@jbudz, you might also have some thoughts on this.

@tylersmalley
Copy link
Contributor Author

Actually wondering if we should just be checking for both errno and code

@elasticmachine

This comment has been minimized.

@tylersmalley
Copy link
Contributor Author

retest

@mistic
Copy link
Member

mistic commented Feb 21, 2019

I think errno is a special property only available for NodeJS SystemError (which inherits from Error). Maybe we can just checking for code on errors, or at least if we want to be cautious, maybe implement what you suggested of checking both for errno and code but maybe giving priority to the code property. What do u think @tylersmalley ?

@jbudz
Copy link
Member

jbudz commented Feb 21, 2019

Yea I think we'll want both - I believe the other scenario that @mistic mentioned is https://github.com/hapijs/hapi/blob/v16/lib/connection.js#L94.

@elasticmachine

This comment has been minimized.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
@tylersmalley
Copy link
Contributor Author

Updated to check both code and errno.

@elasticmachine

This comment has been minimized.

@mistic
Copy link
Member

mistic commented Feb 22, 2019

retest

@elasticmachine

This comment has been minimized.

@tylersmalley
Copy link
Contributor Author

Failed test should be fixed with: #31830

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@tylersmalley tylersmalley merged commit e8cc164 into elastic:master Feb 23, 2019
tylersmalley added a commit to tylersmalley/kibana that referenced this pull request Feb 23, 2019
errno is not set for ECONNRESET

https://github.com/hapijs/wreck/blob/29d8f4b5eaa12c5d44c642130cd6002c1d83ffd2/lib/index.js#L290

Closes elastic#22225

Example:

{ Error: socket hang up
  at TLSSocket.onSocketClose (_tls_wrap.js:761:23)
  at TLSSocket.emit (events.js:194:15)
  at _handle.close (net.js:600:12)
  at Socket.done (_tls_wrap.js:388:7)
  at Object.onceWrapper (events.js:277:13)
  at Socket.emit (events.js:189:13)
  at TCP._handle.close (net.js:600:12) code: 'ECONNRESET'

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
tylersmalley added a commit to tylersmalley/kibana that referenced this pull request Feb 23, 2019
errno is not set for ECONNRESET

https://github.com/hapijs/wreck/blob/29d8f4b5eaa12c5d44c642130cd6002c1d83ffd2/lib/index.js#L290

Closes elastic#22225

Example:

{ Error: socket hang up
  at TLSSocket.onSocketClose (_tls_wrap.js:761:23)
  at TLSSocket.emit (events.js:194:15)
  at _handle.close (net.js:600:12)
  at Socket.done (_tls_wrap.js:388:7)
  at Object.onceWrapper (events.js:277:13)
  at Socket.emit (events.js:189:13)
  at TCP._handle.close (net.js:600:12) code: 'ECONNRESET'

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
tylersmalley added a commit that referenced this pull request Feb 23, 2019
errno is not set for ECONNRESET

https://github.com/hapijs/wreck/blob/29d8f4b5eaa12c5d44c642130cd6002c1d83ffd2/lib/index.js#L290

Closes #22225

Example:

{ Error: socket hang up
  at TLSSocket.onSocketClose (_tls_wrap.js:761:23)
  at TLSSocket.emit (events.js:194:15)
  at _handle.close (net.js:600:12)
  at Socket.done (_tls_wrap.js:388:7)
  at Object.onceWrapper (events.js:277:13)
  at Socket.emit (events.js:189:13)
  at TCP._handle.close (net.js:600:12) code: 'ECONNRESET'

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
tylersmalley added a commit that referenced this pull request Feb 23, 2019
errno is not set for ECONNRESET

https://github.com/hapijs/wreck/blob/29d8f4b5eaa12c5d44c642130cd6002c1d83ffd2/lib/index.js#L290

Closes #22225

Example:

{ Error: socket hang up
  at TLSSocket.onSocketClose (_tls_wrap.js:761:23)
  at TLSSocket.emit (events.js:194:15)
  at _handle.close (net.js:600:12)
  at Socket.done (_tls_wrap.js:388:7)
  at Object.onceWrapper (events.js:277:13)
  at Socket.emit (events.js:189:13)
  at TCP._handle.close (net.js:600:12) code: 'ECONNRESET'

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
tylersmalley added a commit to tylersmalley/kibana that referenced this pull request Feb 28, 2019
errno is not set for ECONNRESET

https://github.com/hapijs/wreck/blob/29d8f4b5eaa12c5d44c642130cd6002c1d83ffd2/lib/index.js#L290

Closes elastic#22225

Example:

{ Error: socket hang up
  at TLSSocket.onSocketClose (_tls_wrap.js:761:23)
  at TLSSocket.emit (events.js:194:15)
  at _handle.close (net.js:600:12)
  at Socket.done (_tls_wrap.js:388:7)
  at Object.onceWrapper (events.js:277:13)
  at Socket.emit (events.js:189:13)
  at TCP._handle.close (net.js:600:12) code: 'ECONNRESET'

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
tylersmalley added a commit that referenced this pull request Mar 14, 2019
errno is not set for ECONNRESET

https://github.com/hapijs/wreck/blob/29d8f4b5eaa12c5d44c642130cd6002c1d83ffd2/lib/index.js#L290

Closes #22225

Example:

{ Error: socket hang up
  at TLSSocket.onSocketClose (_tls_wrap.js:761:23)
  at TLSSocket.emit (events.js:194:15)
  at _handle.close (net.js:600:12)
  at Socket.done (_tls_wrap.js:388:7)
  at Object.onceWrapper (events.js:277:13)
  at Socket.emit (events.js:189:13)
  at TCP._handle.close (net.js:600:12) code: 'ECONNRESET'

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Downgrade ECONNRESET Error: socket hang up in logs to debug
4 participants