springernature / boomcatch

A standalone, node.js-based beacon receiver for boomerang.
GNU General Public License v3.0
110 stars 33 forks source link

Boomcatch failing when forwarder is provided #90

Open sameer2904 opened 6 years ago

sameer2904 commented 6 years ago

Hi,

I am trying to implement boomcatch either as a standalone or as a middleware in my node project. FOr the standalone I am using this command to run:-

boomcatch --host 127.0.0.1 --port 3001 --path /perf/beacon --forwarder http --fwdUrl /perf/beacon --fwdPort 3000 --fwdMethod POST --fwdHost 127.0.0.1

but this is failing for the reason:

/usr/local/lib/node_modules/boomcatch/node_modules/check-types/src/check-types.js:643 throw new Error(message || 'Assertion failed'); ^

Error: Invalid string at assertImpl (/usr/local/lib/node_modules/boomcatch/node_modules/check-types/src/check-types.js:643:19) at assertPredicate (/usr/local/lib/node_modules/boomcatch/node_modules/check-types/src/check-types.js:638:9) at Function.match (/usr/local/lib/node_modules/boomcatch/node_modules/check-types/src/check-types.js:632:13) at verifyForwarderOptions (/usr/local/lib/node_modules/boomcatch/src/index.js:254:26) at verifyOptions (/usr/local/lib/node_modules/boomcatch/src/index.js:173:5) at Object.exports.listen (/usr/local/lib/node_modules/boomcatch/src/index.js:130:9) at runServer (/usr/local/lib/node_modules/boomcatch/src/cli.js:90:10) at Object. (/usr/local/lib/node_modules/boomcatch/src/cli.js:30:1) at Module._compile (module.js:635:30) at Object.Module._extensions..js (module.js:646:10)

But if I remove it works but the beacon data captured, I need to make a post call another node project to save it. But its not making the call. This node has the api POST -- localhost:3000/perf/beacon.

Can you please suggest what is the issues here.

jpw commented 6 years ago

Hi sameer2904,

Thanks for raising the issue.

boomcatch --host 127.0.0.1 --port 3001 --path /perf/beacon --forwarder http --fwdUrl /perf/beacon --fwdPort 3000 --fwdMethod POST --fwdHost 127.0.0.1

I think the problem is here: --fwdUrl /perf/beacon -- that argument needs to be a URL, but /perf/beacon is a path. So for example, something like --fwdUrl http://127.0.0.1/perf/beacon should work

It does seem to me boomcatch could output a more useful error message though...