SDcard full of log files - (TCP error TP-Link)

Today my 16GB sdcard totally filled up and crashed node red. Luckily I had my flows backup up from a few days back.

The culprits are:

var/log/daemon.log (3.5GB)
var/log/syslog (0.5GB)
various .gz log file totalling 3GB

I copied the logs to my computer and deleted them from the sdcard, now it's running fine.

The log files are full of this over and over (I could not even post 1 seconds worth it's too long!!!)
It seems to be the TP-Link node - I think.

Any ideas?

syslog

Oct 25 06:25:28 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982205)
Oct 25 06:25:29 raspberrypi Node-RED[348]: TCP Timeout
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: TCP Timeout
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: TCP Timeout
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at Timeout._onTimeout (/home/pi/.node-red/node_modules/tplink-smarthome-api/lib/client.js:249:20)
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at ontimeout (timers.js:436:11)
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at tryOnTimeout (timers.js:300:5)
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at listOnTimeout (timers.js:263:5)
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at Timer.processTimers (timers.js:223:10)
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982206)
Oct 25 06:25:29 raspberrypi Node-RED[348]: TCP Timeout
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: TCP Timeout
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: TCP Timeout
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at Timeout._onTimeout (/home/pi/.node-red/node_modules/tplink-smarthome-api/lib/client.js:249:20)
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at ontimeout (timers.js:436:11)
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at tryOnTimeout (timers.js:300:5)
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at listOnTimeout (timers.js:263:5)
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at Timer.processTimers (timers.js:223:10)
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982207)
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982208)
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982209)
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982210)
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982211)
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982212)
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982213)
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982214)
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982215)
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982216)
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982217)
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982218)
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982219)
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982220)
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982221)
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982222)
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982223)
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982224)
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982225)
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1982226)
Oct 25 06:25:29 raspberrypi Node-RED[348]: [undefined] device.send() Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]: (node:348) UnhandledPromiseRejectionWarning: Error: connect EHOSTUNREACH 192.168.1.41:9999
Oct 25 06:25:29 raspberrypi Node-RED[348]:     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)

This is actually a TP-Link lightbulb I recently added to my system, and is unplugged - hence unreachable. Surely node red should not be logging this this extent?

We’ll Node-RED will log what it is told to. So I would open an issue against that tplink node and ask the author to stop it retrying so often

1 Like

Yes absolutely! I will raise an issue on github.

I know this is more of a Raspberry Pi question but is there anyway to limit the log file sizes in future?

Yes. Read up on the logrotate function and its settings.

3 Likes

Cool thanks!

Info here for anyone else who finds this:

1 Like