I’m trying to run the Snowplow streaming architecture in a super-basic AWS environment. Collector and enrich both working fine, but when the ES sink gets a datapoint I get the KCL error:
[pool-1-thread-1] ERROR com.amazonaws.services.kinesis.clientlibrary.lib.worker.ProcessTask - ShardId shardId-000000000000: Application processRecords() threw an exception when processing shard
[pool-1-thread-1] ERROR com.amazonaws.services.kinesis.clientlibrary.lib.worker.ProcessTask - ShardId shardId-000000000000: Skipping over the following data records: []
Having dug into the src a bit it seems to get stuck in SnowplowElasticsearchEmitter#splitBufferRec - v happy to dig further but, before I do, has anyone seen this before?
It’s an awkward issue with the KCL which catches exceptions in the processRecords() but prevents them from bubbling up correctly. #3019 fixes one case where this with the buffering logic for Elasticsearch but any other exception will produce the same symptoms. If you have a JVM debugger to hand, stepping through the KCL code in com.amazonaws.services.kinesis.clientlibrary.lib.worker.ProcessTask will show you the exact exception, otherwise it’s trial and error… this often occurs when there is an issue connecting or authenticating to Elasticsearch, so worth checking that first.
My fix (#3020) hasn’t been merged yet and is scheduled for an R9x release. (If I haven understood the GitHub roadmap correctly - @alex correct me if I’m wrong there)
You’ll have to build from that PR or apply the patch manually to force the exception to bubble up properly. As I say it’s worth quadruple-checking your ES connection & auth parameters as that is more than likely the cause.
Thanks for your reply @acgray, when you say ES or auth related, do you mean in that I may have specified wrong types, or not quoted conf items correctly perhaps?
I tcpdump'd whilst running snowplow-elasticsearch-sink-0.8.0-2x and saw no attempt to connect to ES.
If it makes any difference at all, I’m going to be using AWS’s ElasticSearch service onto port 80 (rather than 9200). Not very secure, a bit disappointing from them to be honest.