logdna / logger-node

A nodejs logger client for LogDNA
MIT License
34 stars 17 forks source link

DEPTH_ZERO_SELF_SIGNED_CERT | Connection-based error #82

Closed stascnb closed 1 week ago

stascnb commented 12 months ago

Hey,

We have an application that utilises logdna/logger and it works fine most of the time except for this error

node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: A connection-based error occurred that will not be retried. See meta data for details.
    at /app/node_modules/@logdna/logger/lib/logger.js:867:29
    at processTicksAndRejections (node:internal/process/task_queues:78:11)
Emitted 'error' event on Logger instance at:
    at /app/node_modules/@logdna/logger/lib/logger.js:872:22
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  meta: {
    actual: 'self signed certificate',
    code: 'DEPTH_ZERO_SELF_SIGNED_CERT',
    firstLine: '{"message":"Cron Job start - Update Pricing Caches","indexMeta":true,"_meta":{"message":"Cron Job start - Update Pricing Caches","service":"CronService","userWallet":"Cron Job"}}',
    lastLine: '{"message":"Caching current forex - cacheCurrentForex","indexMeta":true,"_meta":{"message":"Caching current forex - cacheCurrentForex","service":"GreenwichService","userWallet":"Cron Job"}}',
    retrying: false,
    attempts: 3,
    headers: {
      'Content-Type': 'application/json; charset=UTF-8',
      'user-agent': '@logdna/logger/2.6.7'
    },
    url: 'https://logs.logdna.com/logs/ingest?now=xx&hostname=backend-xx-vdncn&mac=&ip=&tags=xx%20Backend-master'
  }
}

This problem just began recently, and the function that it refers to runs every minute (crone job), it works alright but just sometimes it throws this error and not sure if its related to our implementation or something on logdna(memzo) side.

darinspivey commented 9 months ago

This appears to be a server-side error based on our self-signed certificate. There are recent dependency bumps, so please install the latest version and try again. It's possible those changes will be more forgiving of this error, and if not, we can look into why it's sometimes returned and not others.

darinspivey commented 1 week ago

Closing due to inactivity and the fact that this is a legitimate error being surfaced because it cannot be retried, nor is it a problem with the logger itself.