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

Boomcatch Error Forwarder Failed #92

Open
AkshalS opened this issue Jun 8, 2018 · 6 comments
Open

Boomcatch Error Forwarder Failed #92

AkshalS opened this issue Jun 8, 2018 · 6 comments
Assignees

Comments

@AkshalS
Copy link

AkshalS commented Jun 8, 2018

I am using boomerang.js to measure the page load time of my web app. The boomerang is set and the beacon is working properly and sending data. Also, I am able to use boomcatch to receive this beacon data and it is able to process it. But when I try to forward the data using a forwarder to my simple web app page then it gives me the following error.

2018-06-07 19:38:29 INFO boomcatch: referer=http://127.0.0.1:8080/ui/ user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36 address=127.0.0.1[] method=POST url=/beacon
2018-06-07 19:38:29 INFO boomcatch: sending rt.firstbyte:20|ms
rt.lastbyte:1699|ms
rt.load:1699|ms

2018-06-07 19:38:29 ERROR boomcatch: Error: socket hang up
    at TLSSocket.onHangUp (_tls_wrap.js:1111:19)
    at TLSSocket.g (events.js:291:16)
    at emitNone (events.js:91:20)
    at TLSSocket.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
2018-06-07 19:38:29 ERROR boomcatch: 502 Forwarder failed
@josebolos josebolos self-assigned this Jun 11, 2018
@josebolos
Copy link
Contributor

Hi @AkshalS

Thanks for using Boomcatch! Would you mind sharing with us all the settings that you are using to run boomcatch, so we can try to replicate the issue here?

Thanks!

@AkshalS
Copy link
Author

AkshalS commented Jun 11, 2018

Hi @josebolos
Thanks for your response.
I am running boomcatch with the following settings :
boomcatch --port 8888 --host 127.0.0.1 --forwarder http --fwdUrl https://127.0.0.1:8000/from-boomcatch --fwdMethod POST

Also, I tried the same settings from a node.js project too.

I also have a simple nodejs web app running on port 8000.

@josebolos
Copy link
Contributor

From reading the output of your command, there a number of things that could trigger the socket hang up error that you posted, including errors in the app listening to the forwarded requests, or boomcatch itself.

For example, you mentioned that you have a simple nodejs web app listening on port 8000. Is this app HTTPS-enabled by any chance? In the example you are using https://127.0.0.1:8000/from-boomcatch as the forwarding URL, which could trigger this particular error if the server doesn't understand TLS.

If changing the protocol for the forwarding URL from https: to http: doesn't help, then the problem must lie somewhere else and we'll need to keep having a look.

@AkshalS
Copy link
Author

AkshalS commented Jun 15, 2018

Yes, I have already tried that with http: and it was giving me the same error. Also, I have tried using my simple nodejs web app to accept data request from other places and it works perfectly fine. For example, I have used it to accept data from the /beacon of the boomerang directly and it works. But it fails with the boomcatch forwarder.

@itsMattShull
Copy link

I'm also getting this error. Here are my settings:

boomcatch.listen({
    host: '127.0.0.1',                  // Defaults to '0.0.0.0' (INADDR_ANY)
    port: 8888,                               // Defaults to 80 for HTTP or 443 for HTTPS
    log: console,                             // Defaults to object with `info`, `warn` and `error` log functions.
    workers: 1,     // Defaults to 0
    mapper: 'unmapped',       // Defaults to 'statsd'
    forwarder: 'http',                        // Defaults to 'udp'
    fwdUrl: 'https://www.XXXXXXX.com/api/store-beacon',     // No default
    fwdMethod: 'POST'                         // Defaults to 'GET'
});

I've used postman to try checking to make sure that https://www.XXXXXXX.com/api/store-beacon is receiving post requests and that is successful. Something seems to be happening internally with boomcatch.

@derkkila
Copy link

derkkila commented Jun 2, 2020

I am running into this same issue. I've tried running it both as a container and as the straight application. I'm forwarding these events from boomcatch too an open listener that can take the same message being written to the stdout so I know the final end point is working fine, but something is interrupting the flow within Boomcatch.

I get this when sending a mapped or unmapped item:
2020-06-02 16:32:30 ERROR boomcatch: Error: socket hang up at createHangUpError (_http_client.js:345:15) at Socket.socketOnEnd (_http_client.js:437:23) at emitNone (events.js:110:20) at Socket.emit (events.js:207:7) at endReadableNT (_stream_readable.js:1059:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9)

However I can take the JSON shown in the unmapped execution and send it myself via curl from another container on that server and it works fine.

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

No branches or pull requests

4 participants