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

TLS Connection Issue After Updating to v7.0.0 #180

Closed
neverovski opened this issue Nov 4, 2023 · 7 comments
Closed

TLS Connection Issue After Updating to v7.0.0 #180

neverovski opened this issue Nov 4, 2023 · 7 comments

Comments

@neverovski
Copy link
Contributor

When updating from 6.7.0 to 7.0.0 the connection is failing. I didn't change the connection settings.

I can look into this issue further and send a PR

My settings:

pinoElasticsearch({
    index: 'log',
    node: 'https://127.0.0.1:9200',
    esVersion: 8,
    auth: { apiKey: 'LOG_API_KEY' },
    tls: {
        ca: 'LOG_SSL_CA',
        rejectUnauthorized: true,
    },
    opType: 'create'
})

Error messages:

'Elasticsearch client error': ConnectionError: unable to verify the first certificate
      at SniffingTransport.request (/node_modules/@elastic/transport/src/Transport.ts:585:17)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
      at Client.BulkApi [as bulk] (//node_modules/@elastic/elasticsearch/src/api/api/bulk.ts:75:10) {
    meta: {
      body: undefined,
      statusCode: 0,
      headers: {},
      meta: {
        context: null,
        request: {
          params: {
            method: 'POST',
            path: '/_bulk',
            body: '{"index":{"_index":"logs-11-04","op_type":"create"}}\n' +

My environment:

  • pino-elasticsearch: v7.0.0
  • nodejs: v18.17.0
  • npm: v9.6.7
@mcollina
Copy link
Member

Thanks, a PR would be amazing.

@CptSchnitz
Copy link

Hi, i wouldn't mind taking care of this issue.

@neverovski
Copy link
Contributor Author

I send PR #181

@neverovski
Copy link
Contributor Author

neverovski commented Nov 28, 2023

In version 8 renamed the ssl option to tls

@CptSchnitz
Copy link

I don't think it depends on ES cluster version. It's elasticsearch-js package breaking their API in v8.0.0.
https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/changelog-client.html#_rename_ssl_option_to_tls

@neverovski
Copy link
Contributor Author

neverovski commented Nov 28, 2023

I don't think it depends on ES cluster version. It's elasticsearch-js package breaking their API in v8.0.0. https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/changelog-client.html#_rename_ssl_option_to_tls

That's right, in version 8 they changed the ssl option to tls.

@neverovski
Copy link
Contributor Author

This bug was fixed. PR #181

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

3 participants