Comments (23)
Or, I've really mangled my VCAP runtime environment....
from node-red-app.
I give up.
2020-12-05T00:51:51.62-0500 [APP/PROC/WEB/0] OUT > [email protected] start /home/vcap/app
2020-12-05T00:51:51.62-0500 [APP/PROC/WEB/0] OUT > node --max-old-space-size=160 index.js --settings ./bluemix-settings.js -v
2020-12-05T00:51:51.82-0500 [APP/PROC/WEB/0] OUT 5 Dec 05:51:51 - Starting Node-RED on IBM Cloud bootstrap
2020-12-05T00:51:51.82-0500 [APP/PROC/WEB/0] OUT 5 Dec 05:51:51 - Loading bluemix-settings.js
2020-12-05T00:51:51.88-0500 [APP/PROC/WEB/0] OUT 5 Dec 05:51:51 - Using Cloudant service: Cloudant-openeew-93573 db:openeewdevicemgmt prefix:openeewdevicemgmt
2020-12-05T00:51:52.13-0500 [APP/PROC/WEB/0] OUT 5 Dec 05:51:52 - Loading application settings
2020-12-05T00:51:52.28-0500 [APP/PROC/WEB/0] OUT Failed to initialize storage module
2020-12-05T00:51:52.28-0500 [APP/PROC/WEB/0] OUT Failed to create database: Error: one of _admin, server_admin is required for this request
2020-12-05T00:51:52.31-0500 [APP/PROC/WEB/0] OUT Exit status 0
2020-12-05T00:51:52.34-0500 [CELL/SSHD/0] OUT Exit status 0
from node-red-app.
I started over with a new Node-RED application deployed to IBM Cloud Foundry. It failed in exactly the same place.
Failed to create database: Error: one of _admin, server_admin is required for this request
In both attempts, I was trying to bind the Node-RED application to a Cloudant Standard on Transaction Engine instance. It only provides IAM credentials.
I deleted all of my apps again and I deleted the Cloudant Standard on Transaction Engine instance.
I created a new Cloudant Standard instance with both IAM and Legacy credentials. Which is different than the Cloudant Standard on Transaction Engine.
I then created a Node-RED application using the Cloudant Standard instance. It worked.
I think the errors are related to Cloudant Standard on Transaction Enging and/or IAM only credentials.
from node-red-app.
@johnwalicki This repo is not meant to be used outside of the Developer Experience flow because it requires custom service binding/mapping that is done via generation.
To get it working by hand, you'll have manually update the code to load in credentials you have exposed to your runtime environment (Cloud Foundry, Kubernetes, Code Engine, etc.). In the Developer Experience flow, we generate a mappings.json
file that, together with the ibm-cloud-env
library, will load the credentials automatically based on the service binding we create at the time of toolchain creation. This is also the reason we switched to the ibm-cloud-env
; it allows us to expand support for this starter kit beyond just Cloud Foundry.
The generated server/config/mappings.json
looks like this:
{
"cloudant_apikey": {
"searchPatterns": [
"cloudfoundry:$['cloudantNoSQLDB'][0].credentials.apikey",
"file:/server/localdev-config.json:$.cloudant_apikey"
]
},
"cloudant_host": {
"searchPatterns": [
"cloudfoundry:$['cloudantNoSQLDB'][0].credentials.host",
"file:/server/localdev-config.json:$.cloudant_host"
]
},
"cloudant_iam_apikey_description": {
"searchPatterns": [
"cloudfoundry:$['cloudantNoSQLDB'][0].credentials.iam_apikey_description",
"file:/server/localdev-config.json:$.cloudant_iam_apikey_description"
]
},
"cloudant_iam_apikey_name": {
"searchPatterns": [
"cloudfoundry:$['cloudantNoSQLDB'][0].credentials.iam_apikey_name",
"file:/server/localdev-config.json:$.cloudant_iam_apikey_name"
]
},
"cloudant_iam_role_crn": {
"searchPatterns": [
"cloudfoundry:$['cloudantNoSQLDB'][0].credentials.iam_role_crn",
"file:/server/localdev-config.json:$.cloudant_iam_role_crn"
]
},
"cloudant_iam_serviceid_crn": {
"searchPatterns": [
"cloudfoundry:$['cloudantNoSQLDB'][0].credentials.iam_serviceid_crn",
"file:/server/localdev-config.json:$.cloudant_iam_serviceid_crn"
]
},
"cloudant_password": {
"searchPatterns": [
"cloudfoundry:$['cloudantNoSQLDB'][0].credentials.password",
"file:/server/localdev-config.json:$.cloudant_password"
]
},
"cloudant_port": {
"searchPatterns": [
"cloudfoundry:$['cloudantNoSQLDB'][0].credentials.port",
"file:/server/localdev-config.json:$.cloudant_port"
]
},
"cloudant_url": {
"searchPatterns": [
"cloudfoundry:$['cloudantNoSQLDB'][0].credentials.url",
"file:/server/localdev-config.json:$.cloudant_url"
]
},
"cloudant_username": {
"searchPatterns": [
"cloudfoundry:$['cloudantNoSQLDB'][0].credentials.username",
"file:/server/localdev-config.json:$.cloudant_username"
]
},
"cloudant_serviceInfo": {
"searchPatterns": [
"cloudfoundry:$['cloudantNoSQLDB'][0].credentials.serviceInfo",
"file:/server/localdev-config.json:$.cloudant_serviceInfo"
]
}
}
With this file, the code in this repo will work on Cloud Foundry with the regular CF service binding.
from node-red-app.
Yes, then this is a regression from prior versions - which allowed me to host the repository on GitHub.
While that is important, there's a separate bug related to IAM credentials, Cloudant Standard on Transaction Engine.
from node-red-app.
Do you have more info about the bug? Is it a bug in the code with this skit, or can you get it working using the mappings.json
approach I mentioned above?
from node-red-app.
I didn't change mappings.json. I just created a Cloudant Standard with Transaction Engine instance. Bound that to the Node-RED app. The deploy works but the cf log shows the error above
2020-12-05T00:51:51.82-0500 [APP/PROC/WEB/0] OUT 5 Dec 05:51:51 - Starting Node-RED on IBM Cloud bootstrap
2020-12-05T00:51:51.82-0500 [APP/PROC/WEB/0] OUT 5 Dec 05:51:51 - Loading bluemix-settings.js
2020-12-05T00:51:51.88-0500 [APP/PROC/WEB/0] OUT 5 Dec 05:51:51 - Using Cloudant service: Cloudant-openeew-93573 db:openeewdevicemgmt prefix:openeewdevicemgmt
2020-12-05T00:51:52.13-0500 [APP/PROC/WEB/0] OUT 5 Dec 05:51:52 - Loading application settings
2020-12-05T00:51:52.28-0500 [APP/PROC/WEB/0] OUT Failed to initialize storage module
2020-12-05T00:51:52.28-0500 [APP/PROC/WEB/0] OUT Failed to create database: Error: one of _admin, server_admin is required for this request
2020-12-05T00:51:52.31-0500 [APP/PROC/WEB/0] OUT Exit status 0
That error handling console logging is from bluemix-settings.js
from node-red-app.
I was able to reproduce the error so it shouldn't be too hard to recreate in an IBM Cloud Standard account.
from node-red-app.
Interesting, if you look at this repo file list, the last commit to cloudantStorage.js is
Revert to cloudant legacy auth
which implies (without me reading / understanding the code) that the Cloudant Standard on Transaction Engine service, which only offers IAM credentials, won't work.
from node-red-app.
If cloudantStorage.js can be fixed to support IAM credentials instead of legacy Cloudant auth, that would resolve the problem.
from node-red-app.
Is it due to the change in the way the Cloudant object is instantiated?
from node-red-app.
Follow the commit link above. Scroll down to the cloudantStorage.js diff. It includes a comment and one line of code that is causing the problem. Nick definitely saw the error and wrote the illuminary comment. We need more eyes on how to fix it.
from node-red-app.
I seem to remember this was an issue with the default IAM roles cloundant set not being allowed to write to the database, and the pipeline wasn't smart enough to set the roles up properly. But that was a year ago, so can't recall the full details.
Yes the cloudant storage plugin needs updating to use IAM - and maybe with this starter kit it'll be possible to get cloudant setup properly.
from node-red-app.
I did. I think I understand what's going on now.
At first I thought this is a regression based on the original issue description, but the code comment indicates that this was a known issue.
This probably affects our nodejs-cloudant starter kit as well.
from node-red-app.
Here are some good docs on how to use IAM keys with Cloudant
https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-ibm-cloud-identity-and-access-management-iam-
from node-red-app.
from node-red-app.
This is a legit bug, not certain how to clear the stale label.
from node-red-app.
I just confirmed that this affects lite plan Cloudant instances as well. When user provisions an instance of Cloudant via the catalog, there are two options: "IAM", and "IAM and legacy credentials". The apps as they are written today only work with the latter.
I'll talk with my team to set a priority on getting this fixed.
from node-red-app.
Have removed the stale label to stop the bot from closing.
from node-red-app.
from node-red-app.
118 / 5000
Resultados de tradução
I would like to know how is the progress to solve the problem I am trying to create an app but it is not working
from node-red-app.
Changes to support IAM credentials merged in this PR: #87
from node-red-app.
Reopening since manager role is needed to create database in Cloudant. I think by default CF creates writer-role key for Cloudant, so this doesn't work well yet.
from node-red-app.
Related Issues (17)
- OPTIMIZE_MEMORY & --max-old-space-size=160 by default HOT 1
- Can you provide the json format/content for "/opt/app-root/src/server/config/mappings.json" ? HOT 1
- Can we set the default memory usage to 256Mb? HOT 1
- Error /opt/app-root/src/.node-red/package.json not found HOT 10
- Bump to nodejs:16 and ubi8/nodejs-16-minimal HOT 4
- Node Red Starter Kit to use ubi8/nodejs-16:1 container: HOT 1
- Node RED dashboard: Stage Failed when Deploying HOT 5
- WebApp Starter Fails to deploy in pipeline HOT 1
- Deletion of Node-Red Toolchain retains cf route HOT 3
- NodeRed does not start HOT 1
- Could not successfully deploy HOT 2
- is there a way to upgrade to nodered 1.2.x? HOT 4
- shared cloudant broken - dbname now defaults to "nodered", not sanitized appname HOT 29
- Deploy to IBM Cloud Foundry not working - no cloudant ! HOT 8
- Cloud Foundry Deployment doesn't work HOT 4
- Can we have some FAQs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-red-app.