logdna / logger-node

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

Add retries for EADDRNOTAVAIL #40

Closed johnpadilla closed 3 years ago

johnpadilla commented 3 years ago

In the agent log, it apperas that there are no retries for EADDRNOTAVAIL - there should be.

Jan 26 13:49:10 smh logdna-agent.log error 0800 [error] Error: A connection-based error occurred that will not be retried. See meta data for details. at /usr/local/bin/node_modules/@logdna/logger/lib/logger.js:771:25 at processTicksAndRejections (internal/process/task_queues.js:79:11) { meta: { actual: 'write EADDRNOTAVAIL', code: 'EADDRNOTAVAIL', firstLine: 'Tue Jan 26 13:49:07.906 Usb Host Notification hostNotificationUSBDeviceRemoved USB2.0 HID seqNum 128 Total 2', lastLine: '2021-01-26 13:49:08.107318-0800: NOTICE: Port[4] - DP link down', retrying: false, attempts: 1 } }

darinspivey commented 3 years ago

Thanks for reporting this, @johnpadilla. This error would be very valuable in our "retry these errors" list. We will get that added ASAP.

darinspivey commented 3 years ago

For the record, the error is being thrown due to a disconnected network connection, which is visible even in the log message itself. This should be a retry-able error, for sure.