Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

propagation causes "Error: socket hang up " #110

Open
chrisdostert opened this issue Aug 28, 2018 · 6 comments
Open

propagation causes "Error: socket hang up " #110

chrisdostert opened this issue Aug 28, 2018 · 6 comments
Assignees

Comments

@chrisdostert
Copy link

chrisdostert commented Aug 28, 2018

Repro

  • Wire up tracing per below code snippet
  • Start application & make a request

Expected

traces show up in stackdriver

Actual

no traces show up in stackdriver and the application crashes w/ the error snippet below a minute or so after receiving a few requests

of note, if I remove propagation traces DO show up in stackdriver so it's something related to the use of @opencensus/propagation-stackdriver

code snippet

const tracing = require('@opencensus/nodejs')
const stackdriverKeyFile = require('/stackdriverKeyFile.json')
const propagation = require('@opencensus/propagation-stackdriver')
const exporter = require('@opencensus/exporter-stackdriver')

tracing.start({
  exporter: new exporter.StackdriverTraceExporter({
    projectId: stackdriverKeyFile.project_id
  }),
  logLevel: 4,
  propagation: propagation.v1
})

error snippet

Error: socket hang up
    at createHangUpError (_http_client.js:335:15)
    at TLSSocket.socketOnEnd (_http_client.js:428:23)
    at TLSSocket.emit (events.js:185:15)
    at endReadableNT (_stream_readable.js:1101:12)
    at process._tickCallback (internal/process/next_tick.js:114:19)
Emitted 'error' event at:
    at TLSSocket.socketOnEnd (_http_client.js:428:9)
    at TLSSocket.emit (events.js:185:15)
    at endReadableNT (_stream_readable.js:1101:12)
    at process._tickCallback (internal/process/next_tick.js:114:19)
@chrisdostert
Copy link
Author

chrisdostert commented Aug 29, 2018

Interesting, I just tried using require('@opencensus/propagation-b3') and it has the same behavior so it appears the issue does not lie with '@opencensus/propagation-stackdriver'

@chrisdostert chrisdostert changed the title propagation-stackdriver causes "Error: socket hang up " propagation causes "Error: socket hang up " Aug 30, 2018
@antonj
Copy link

antonj commented Sep 14, 2018

I also get this error when using @opencensus/exporter-stackdriver but not when using the @opencensus/exporter-jaegerso my guess is that is has something to do with the stackdriver exporter.

@conord33
Copy link
Contributor

conord33 commented Oct 5, 2018

@antonj do you get the same error if you use the @opencensus/exporter-jaeger and set the sampling rate to 0?

I am pretty sure that this issue is related to #119

@frankcs
Copy link

frankcs commented Oct 18, 2018

Same situation here with require('@opencensus/propagation-b3').
The Error: socket hang up is happening with node v8.12.0.
When using node v10.12.0 the issue dissapears and traces show up in stackdriver.

@isaikevych
Copy link
Contributor

blocked by #158

@isaikevych
Copy link
Contributor

@chrisdostert, @antonj, Could you please provide stackdriver version or try one more time with latest master?
I found another issue #158 which was fixed, and I cant reproduce current in master, node v8.12.0, I checked opencensus/exporter-stackdriver and @opencensus/propagation-b3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants