问题
I am starting from the position of near absolute ignorance here.
I successfully set up a Bluemix account, added devices, got API keys, connected my Raspberry Pi running Node Red and a temperature sensor to Node Red on Bluemix, created a dashboard and was able to get data back and forth between Watson/Bluemix and my Pi. Cool. Unfortunately, I got all that way without ever really understanding the navigation of Watson/Bluemix nor all the terminology. I made NR work both ways and was happy. Then one day last week, the route to my Bluemix Node Red application stopped being accessible:
404 Not Found: Requested route ('misterpi-01.mybluemix.net') does not exist.
I can browse my devices and see that they are sending data every few minutes, so clearly the connection is there. When I click on IBM Cloud Apps, I am told
There are no IBM Cloud applications bound to your organization
When I am on my IBM Cloud Dashboard and I click on Connections I see I have a connected application that is "Not Running" with a red dot. I can click Stop and the status goes to Stopped. When I click Start, after a short while,
I cannot add an another app because I can only have one.
Where did my NR app go and can I get it back (preferred) and if not, delete it?
At the suggestion of @hardillb I went looking for logs. I found them and it looks like the app is continuously started and crashing. I can't copy the text from the error logs but here is a screenshot.
回答1:
The first thing you should do is get a copy of your flow source for backup. Go into the IBM Cloud Dashboard and click on Cloudant-ll
(the suffix may be different?) and then Launch Cloudant Dashboard
(alternatively, click on ...-cloudantNoSQLDB
and then alias of Cloudant-ll
). From there click on NodeRed
and then select the id that ends with "/flow". Then you can extract everything inside "flow": []
.
I would recommend emptying it out so you have no flows to ensure that Bluemix can start 'empty'. If you do this you will end up with something similar to mine below (don't change _rev
).
{
"_id": "Home Assistant/flow",
"_rev": "102-2b38e1756eeb26def19b20858bc50a40",
"flow": []
}
Later you can paste the extracted code back into Node Red using Import > Clipboard
.
You may also want to edit the ".../settings" document to remove any extra node types you installed.
Caveat - I had the same problems with Bluemix and eventually gave up - crashing at least weekly running out of memory and difficulty restarting. I suspect it can't reliably run with 256MB.
来源:https://stackoverflow.com/questions/53756668/my-node-red-dashboard-disappeared-my-app-says-not-running-but-wont-restart