Hello, guys.
I’m getting disconnections from the server quite often, I think with restart of the server.
I’m working with a RPI4.
Is this a known problem?
Not enough info I'm afraid.
what does that mean exactly? Describe exactly what you are doing and what you are seeing.
for example, where is "the server" - remove (over internet)? in your local network? etc
Yes, if your flows are crashing and your node-red is set to auto-restart (like a service) then this (one of) the effects you would see.
Do you mean that you think node red is restarting when it should not? If so then watch the node red log output to see what is happening. To do that run
node-red-log
And leave it running till it restarts.
then, the server is on lan (no wireles), but I exclude a restart of the machine because ssh does not disconnect.
There are many streams but I don’t get a warning in the interface.
It seems (but I’m not sure) that they happen when I am modifying some nodes, but maybe because at other times I do not see it.
I left the event log open and wait for it to happen again...
Nothing is shown on the log
Did it happen at a random time or when you were doing something?
during the deployment, at least this time.
There should have been something in the log to show the deployment. What did it say? Post the log around the failure please.
What sort of deployment are you doing? Full, flow or nodes?
If you are doing a full deploy then perhaps something you do on startup lock up node red for a while. How long does it stop for?
It stops for a little 15/30 seconds, but it does not happen only with deploy it also appears sporadically
As well as keeping the log open, open another window and run
top
Under normal operation is anything using a lot of CPU?
When it hangs is anything using a lot of CPU.
You didn't answer my question:
Post the log around when it happens when it next occurs.
Perhaps this is it?
the deploy I do it full, the cpu load is around 10/20 % max
Why?
Is there a specific reason you do full deploy? You know when you do full deploy it destroys and recreates every single node and every single connection and every single "thing". Node deploy on the other hand, only recreates the nodes that have been altered. There are occasions where full deploy is beneficial/best, but in most cases node deploy is the better option.
I did not think it was so heavy... passed to mode node...
But the host ip has nothing to do with it?
The reason that you get the port in use error is because node red is running and you have tried to start another one. Perhaps you used the command node-red log
instead of node-red-log
.
I don't understand what you mean by that. When you do a full deploy the load is on the machine running node-red.
In your htop
output there are loads of python commands running, each consuming 5 or 6% of the processor. What are those all about?
on the machine runs only node-red, I think they are due to pwm, gpio, i2c, and little else, as I can investigate for the problem of disconnection
I look forward to some advice to investigate the problem. thanks
Run
node-red-reload
Which will restart node red. Post the full output here. Copy/paste please, not screenshot.
Then leave that window open, and when the error occurs see what is in the log at that time.
pin32@Node-Red:~ $ node-red-reload
Stop Node-RED
Use node-red-start to start Node-RED again
Start Node-RED
Once Node-RED has started, point a browser at http://192.168.1.96:1880
On Pi Node-RED works better with the Firefox or Chrome browser
Use node-red-stop to stop Node-RED
Use node-red-start to start Node-RED again
Use node-red-log to view the recent log output
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot
To find more nodes and example flows - go to http://flows.nodered.org
Starting as a systemd service.
16 Feb 09:20:41 - [info] Settings file : /home/pin32/.node-red/settings.js
16 Feb 09:20:41 - [info] Context store : 'default' [module=memory]
16 Feb 09:20:41 - [info] User directory : /home/pin32/.node-red
16 Feb 09:20:41 - [warn] Projects disabled : editorTheme.projects.enabled=false
16 Feb 09:20:41 - [info] Flows file : /home/pin32/.node-red/flows.json
16 Feb 09:20:41 - [info] Server now running at http://127.0.0.1:1880/
16 Feb 09:20:41 - [warn] Using unencrypted credentials
16 Feb 09:20:41 - [info] Starting flows
MCP23017 chip initialization OK. BusNumber=1 Address=0X27 id:ac05a4c7c52289c4 startAllHigh = false
MCP23017 chip initialization OK. BusNumber=1 Address=0X20 id:891324a310fe6192 startAllHigh = false
16 Feb 09:20:46 - [info] Started flows
16 Feb 09:20:46 - [info] [serialconfig:831becf24befe30b] serial port /dev/ttyACM0 opened at 2400 baud 8N1
16 Feb 09:20:46 - [error] [serialconfig:5a5b2278df870dd4] serial port /dev/ttyUSB0 error: Error: Error: No such file or directory, cannot open /dev/ttyUSB0
16 Feb 09:20:46 - [info] [mqtt-broker:e276a877253691df] Connected to broker: mqtt://192.168.1.99:1883
a serial is disconnected at this time but even reconnecting the problem persists