How to Clear editor node status "Error" on "node-red-node-tail" node?

File monitoring/reading had an error. "File not found". The system recovered when the file was available. However, there persists the red error node indicator in the editor. How can I clear this error without Restarting Flows?

This may seem a small item, I cannot feed it anything to reset it's context since it relys on configuration as it has no inputs.

image

Do you mean that once the file becomes available the tail node starts correctly tailing it but the error indication stays there? If so are you using the latest version of that node? Also what versions of node-red and nodejs are you using and what OS?

@Colin ,
Yes, That is the behavior. It's not causing any problems except the bothersome error that is no longer an error. And no way to stop it from showing as error. (that I know of)

Windows 10 and NR 3.0.2 . Not sure of the details on tail. It is rather recent about a month old. I will get you details on the versions soon.

Thanks,

If you empty the filename field in the node that causes the node to have an input. The filename is then passed in via msg.filename. After the file is deleted and then recreated then injecting the filename clears the error.

I have updated the tail node to now a) clear the status when it reconnects, and b) retry if the file goes away and comes back. v0.4.0

That's working well for me (on Ubuntu). Though I notice that if the file does not exist on deploy/restart that the error status does not show. I don't know whether that is a change in behaviour. Also, in this case, when the file is first written to the first line is not tailed. If the file is deleted and recreated while node-red is running then the Error status appears and is cleared when the file appears, and the first line does appear in the tail.

Also I was surprised to see that a Catch node does not catch the error. That is not a change in behaviour.

It isn't a change in behaviour. If the file is not there at start time it has always treated it as a warning rather than an error (as maybe the user just hasn't set the path correctly). Likewise if the file is created while tail isn't watching nothing is output and the retry is only every 10 secs so there may be a 10 second gap in output... - we can't guess how much is written in that time so can't just say always show last line as it could be 0, 1, 10 or 100 lines, who knows...

Understood.

@dceejay,
Thanks for taking a closer look at this. I have a fixed path and file so it makes it less programming to set the values in a change node. On the update, do I need to push the path and filename in a message variable? Or can I just leave the path/file as configuration in the tail node? Also does the Catch Error and Status nodes work with the tail node?

Thanks!