Connection to the database disappears after node js reboot

when the server with node red is rebooted, the data for connecting to the sql database will disappear - the user and password, has anyone encountered this problem?

What version of node red and nodejs are you using?
Is there anything unusual about your setup?
What OS are you running and how did you install node red?
Are you able to deploy changes to the flow?

Please start node red in a terminal, enter the credentials and deploy it, then restart node red. Then post the startup log here.

@Aklex1, That looks like the old& no longer supported MSSQL node.

I strongly recommend mssql-plus version as it has numerous big fixes and supports stord procedures & parameters (& therefore protection against SQL injection) & much more.

node red 1.0.3
windows server 2012

Is there anything unusual about your setup?
i am use PM2 for demon process
node js can not find out now and the launch log of node red
Are you able to deploy changes to the flow? do not quite understand

Can you deploy other changes to your flow& do they stay there after a reboot. This question is to determine if your file system is writable etc.

What node version are you running? (Run node -v in a command terminal)

Ps, as you are running under pm2, the console will be logged & saved to file, can you locate that & look for clues & post the first 50 lines or so until you see node-red is running.

In future please copy/paste logs here if possible rather than screenshot, it makes it easier to access. Use the </> button at the top of the forum entry window when pasting it in.
The address in use problem is almost certainly because you have not stopped the running version of node-red before starting another instance.
I see that you are using an old version of node-red and an unsupported version of nodejs (13.5.0) so I suggest changing to nodejs 12 or 14 and upgrading node-red. Also, if you have not already, switch to the alternative mssql node as suggested and then try again.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.