Node-red exited (255)

Hello

I have a problem with node-red…

I have installed node-red on a PFC300 PLC to send messages via Telegram, and I am also extracting data from a Compact Logix PLC, everything seems to be working fine.

It works for a few days and then stops working when entering the command “docker ps -a”, a message appears “node red exited (255)” and to get it working again it is necessary to restart node-red

When checking the node-red logs, it shows an error with the eth-ip communication node.

How can I make it so that if for some reason node-red stops and a restart is necessary, it does so automatically?

I hope you can help me

you can use --restart unless-stopped in docker run command Start containers automatically | Docker Docs

you can also change verbose of the logs. Edit file settings.js (if you are using docker, in volume /data you can find file /data/settings.js)
just add lines:

logging: {
    // Console logging
    console: {
        level: "info",
        metrics: false,
        audit: false
    }
}

Where you can choose level:

  • fatal - only those errors which make the application unusable should be recorded
  • error - record errors which are deemed fatal for a particular request
  • warn - record problems which are non fatal
  • info - record information about the general running of the application
  • debug - record information which is more verbose than info
  • trace - record very detailed logging
  • off - no log messages at all