pinojs / pino-elasticsearch

🌲 load pino logs into Elasticsearch
MIT License
179 stars 67 forks source link

Broken since @elastic/elasticsearch@7.14.0 #99

Closed cesarfd closed 2 years ago

cesarfd commented 3 years ago

More info here.

Basically it stopped working since 7.14.0 (including 7.14.1 and the recently released 7.15.0). I'm not sure whether this is really an upstream bug or something that could be changed in pino-elasticsearch itself.

In the meanwhile a temporary workaround could be to force the dependency version up to 7.13.0 to avoid problems.

mcollina commented 3 years ago

@delvedor could you take a look?

LuckyWraptor commented 3 years ago

Is your elasticsearch server also running 7.14+?

I'm running the @elastic/elasticsearch 7.15 with an elastic server of 7.14.1 and it's working fine for me

cesarfd commented 3 years ago

We use elasticache and it's still running 7.10 because of the license change.

LuckyWraptor commented 3 years ago

What's your config (ssl, xpack, ...)? I've been testing from 7.1 to 7.15 for a PR and I didn't have any issues with the 7.15 elasticsearch node package.

cesarfd commented 3 years ago

No ssl node, I just specify an index and es-version 7. I'm using amazon's elasticsearch with kibana pretty much as default. It uses elasticsearch 7.10.2.

LuckyWraptor commented 3 years ago

I would suggest debugging the issues using the following outputs

streamToElastic.on('unknown', (line, error) => console.log('Unknown error', line, JSON.stringify(error)));

streamToElastic.on('insertError', (error) => console.log('Insert error error', JSON.stringify(error)));

streamToElastic.on('error', (error) => console.log('Error', JSON.stringify(error)));

And see if there's any useful debug output

cesarfd commented 2 years ago

Closing as it was an upstream bug anyway. Fixed in https://github.com/elastic/elasticsearch-js/pull/1594