st-one-io / node-red-contrib-smb

Node of Node-RED for SMB Protocol.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uncaught Exception: STATUS_OBJECT_NAME_NOT_FOUND

youzer-name opened this issue · comments

I am using the SMB node on a Raspberry Pi 4 install of Node-Red to read a text file from a Windows 10 SMB share. The text file I am reading is being written every second as a simple log and contains a single line with a number. I am reading the file every 15 seconds and then storing the value in a database.

Every few hours I am getting a restart of Node Red with the error below. I suspect this is happening when the file is being re-written at the exact moment the Node-Red flow tries to access it, but that is a guess.

Dec 29 02:23:43 raspberrypi Node-RED[27352]: 29 Dec 02:23:43 - [error] [SMB:8a8df43764cf1bf5] Error: STATUS_OBJECT_NAME_NOT_FOUND (0xC0000034) : The object name is not found.
Dec 29 02:23:43 raspberrypi Node-RED[27352]: 29 Dec 02:23:43 - [red] Uncaught Exception:
Dec 29 02:23:43 raspberrypi Node-RED[27352]: 29 Dec 02:23:43 - [error] Error: STATUS_OBJECT_NAME_NOT_FOUND (0xC0000034) : The object name is not found.
Dec 29 02:23:43 raspberrypi Node-RED[27352]:     at SMB2Forge.request (/home/pi/.node-red/node_modules/@marsaud/smb2/lib/tools/smb2-forge.js:22:15)
Dec 29 02:23:43 raspberrypi Node-RED[27352]:     at module.exports.readFile (/home/pi/.node-red/node_modules/@marsaud/smb2/lib/api/readFile.js:27:3)
Dec 29 02:23:43 raspberrypi Node-RED[27352]:     at /home/pi/.node-red/node_modules/@marsaud/smb2/lib/tools/smb2-connection.js:52:21
Dec 29 02:23:43 raspberrypi Node-RED[27352]:     at connect (/home/pi/.node-red/node_modules/@marsaud/smb2/lib/tools/smb2-connection.js:87:11)
Dec 29 02:23:43 raspberrypi Node-RED[27352]:     at module.exports.<anonymous> (/home/pi/.node-red/node_modules/@marsaud/smb2/lib/tools/smb2-connection.js:31:5)
Dec 29 02:23:43 raspberrypi Node-RED[27352]:     at module.exports.readFile (/home/pi/.node-red/node_modules/@marsaud/smb2/lib/tools/auto-promise.js:30:8)
Dec 29 02:23:43 raspberrypi Node-RED[27352]:     at SmbConfig.readFile (/home/pi/.node-red/node_modules/node-red-contrib-smb/red/smb.js:86:43)
Dec 29 02:23:43 raspberrypi Node-RED[27352]:     at onNewMsg (/home/pi/.node-red/node_modules/node-red-contrib-smb/red/smb.js:290:33)
Dec 29 02:23:43 raspberrypi Node-RED[27352]:     at SmbFunction._inputCallback (/home/pi/.node-red/node_modules/node-red-contrib-smb/red/smb.js:27:9)
Dec 29 02:23:43 raspberrypi Node-RED[27352]:     at /usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:210:26
Dec 29 02:23:43 raspberrypi Node-RED[27352]:     at Object.trigger (/usr/lib/node_modules/node-red/node_modules/@node-red/util/lib/hooks.js:166:13)
Dec 29 02:23:43 raspberrypi Node-RED[27352]:     at SmbFunction.Node._emitInput (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:202:11)
Dec 29 02:23:43 raspberrypi Node-RED[27352]:     at SmbFunction.Node.emit (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:186:25)
Dec 29 02:23:43 raspberrypi Node-RED[27352]:     at SmbFunction.Node.receive (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/nodes/Node.js:485:10)
Dec 29 02:23:43 raspberrypi Node-RED[27352]:     at Immediate.<anonymous> (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:831:52)
Dec 29 02:23:43 raspberrypi Node-RED[27352]:     at processImmediate (node:internal/timers:466:21)
Dec 29 02:23:43 raspberrypi systemd[1]: nodered.service: Main process exited, code=exited, status=1/FAILURE
Dec 29 02:23:43 raspberrypi systemd[1]: nodered.service: Failed with result 'exit-code'.