Over time I've noticed that my email node seems to forget its account info. It always remembers the server and port but forgets the userid and password. I run multiple node-red servers on AWS. Has anyone else seen this behavior? Where is the account info stored?
Does this just happen suddenly during operation or when you are doing things in the editor? If you copy/paste a flow with email nodes in it then it loses the credentials, that is a security feature.
The credentials are stored, encrypted, in flows_xxx_cred.json
.
I had the same problem, not with the email node but with my Lg-tv node.
Solution was to enable the credentialSecret: "Secretkey" line in the settings.js file.
Maybe it helps you.
It seems to happen during operation. I don't use the NR editor for weeks at a time. Now and then a user will report that they aren't receiving an email that I'm sending programmatically. When I check the node, the credentials are gone.
The passwords are stored in the flow credentials file. The only way it could forget the password is if:
- someone deploys a change to clear the password
- or the credentials file is deleted and NR is restarted
There is no other way for it to spontaneously forget the password.
How are you running it in AWS?
I have several ec2 nodes running Ubuntu and NR v1.1.3. Not using Docker.
Here's a scenario where I might be stepping on my own foot. If I copy the flow file from server A to server B but I don't copy the credentials file, will the credentials on server B still be valid?
They will be valid as long as the node id's haven't changed. But you ought to copy both files together as you may otherwise miss an update. But for that to work, you need to have set credentialSecret
in all of the settings file. This is what Node-RED uses to encrypt and decrypt your credentials file. If you don't set it explicitly, it will auto-generate a key and store it in the .config.json
file (.config.runtime.json
as of 1.2). If each instance has an auto-generated key, they won't be able to decrypt the credentials copied from another machine.
Very helpful information. Thanks!
I'll assume that this is the solution, until proven otherwise.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.