Creating WML credentials - 400 error in IBM Cloud Shell - ibm-cloud

I am following this tutorial (https://courses.cognitiveclass.ai/courses/course-v1:IBMDeveloperSkillsNetwork+DW0101EN+v1/course/) for machine learning.
In lab 3, I am trying to create predictions in Node-RED. However, to link these I need WML credentials (API key and instance ID). Since, there is no longer a credentials tab in the UI on IBM Cloud I have tried to create the credentials following steps here
https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/ml-authentication.html
This creates an API key but there is no associated instance ID that I can find.
I also tried creating them programmatically following
https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/ml-get-wml-credentials.html?linkInPage=true
but I get the following error
FAILED
Error response from server. Status code: 400; description: 400 Service Broker returned error status code 400.
Is anyone else facing the same issue and know how to resolve it?

Related

Postman request showing IBM cloud down for maintenance

I am trying to send post request to create a toolchain on ibm cloud but getting this error mentioned in screenshot since last three days.
Why this error is coming up,am i doing something wrong?
Also i checked ibm none of the servers are down,cloud is normal
EDIT:So now i am able to create the toolchain,seems it was Authorization token error.
But now i am not Able to add a delivery pipeline through an api to an existing toolchain,is this functionality provided in IBM?
We are trying to understand your situation, but we have not been able to reproduce that Error 500 and "IBM Cloud console is down for maintenance" error you're seeing.
Could you try it again and let us know the datestamp&timezone of when you tried (so we can check our logs)?
Also can you give us the details of your default region, please?, as in if you open
https://cloud.ibm.com/devops/toolchains
does it redirect to:
https://cloud.ibm.com/devops/toolchains?env_id=ibm%3Ayp%3Aeu-de
or to some other non-(eu-de) region?
We did see this entry in the log files:
[2019-07-31T15:06:43.934] [ERROR] template-v2 - Failed to read template from repo https://github.com/open-toolchain/simple-toolchain, branch master, type null: Authorization header contains invalid or expired credentials.
but that occurs when using an invalid Authorization header token, and the response to the browser is not Error 500, but is Error 400 with:
"errorDetails\":\"Property 'access_token' either missing or empty \"
Also, when attempting to create the open-toolchain/simple-toolchain template, it doesn't work; it gives Error 400:
"description":"Failed Schema Validation at prod-region,prod-organization,prod-space,api-key for pipeline"
but creating a toolchain works ok using the repository:
https://github.com/open-toolchain/headless-toolchain
You can provision a toolchain with components such as a delivery pipeline using a GET request. The building blocks are described in the documentation for the IBM Cloud Continous Delivery service as part of creating a "Deploy" button.
There are some tutorials that use that deploy button to build more complex solutions, like the secure-file-storage, logistics-wizard-toolchain, or insurance-toolchain.
The GET request starts off a more complex flow because you need to log in, often provide values, etc. So I would recommend to try that request in a browser and not POSTMAN.
I am now able to create toolchain using POST request.
I was using wrong token for Authorization and got confused since no error message was shown instead "IBM cloud is under maintenance" popped up.

Getting 401 Client Error in Cloudant after a while

I am developing a service in IBM Cloud, and I'm using Cloudant Service.
I'm using the IBM Cloudant Client Library for python to access my database. After pushing my service to a kubernetes cluster, my service is able to be used. It's possible to call the service with no issues for a while. But after one day or something like that, when I call my service, I get 401 Client Error from my cloudant database and I don't know why. The problem is solved if I delete and create the pods/service again in kubernetes.
Could someone help me?
Thanks.
Error:
401 Client Error: Unauthorized unauthorized one of _writer, _creator is required for this request for url: "myurl"
I'm calling my service in this way:
cloudant_client = Cloudant("540...-bluemix",
"4276dd...",
url="https://540...-bluemix.cloudant.com")
In case anyone is facing this..it may also be due to the verison of cloudant installed. The IBM tutorials use an outdated version of cloudant. The latest version allows IAM authentication
pip install cloudant
Also make sure u add .iam
cloudant_client = Cloudant.iam(<credentials>)

Couldn't connect to database using Cloud SQL proxy

When using the GCloud CLI to create the service accounts and keys I get the following error
2018/02/24 22:32:35 New connection for "moodle-proj-10:europe-west2:mysqlinst10"
2018/02/24 22:32:35 couldn't connect to "moodle-proj-10:europe-west2:mysqlinst10": ensure that the account has access to "moodle-proj-10:europe-west2:mysqlinst10" (and make sure there's no typo in that name). Error during createEphemeral for moodle-proj-10:europe-west2:mysqlinst10: googleapi: Error 403: The client is not authorized to make this request., notAuthorized
When I delete the service accounts and corresponding keys are re-create it using the console, the error changes to the error below
2018/02/24 23:21:25 couldn't connect to "moodle-proj-10:europe-west2:mysqlinst10": Post https://www.googleapis.com/sql/v1beta4/projects/moodle-proj-10/instances/mysqlinst10/createEphemeral?alt=json: oauth2: cannot fetch token: 400 Bad Request
Response: {
"error" : "invalid_grant",
"error_description" : "Invalid JWT Signature."
}
Has anyone experienced this?
I had this problem when I followed the command line instructions in this help article
Solution is to delete the original service account and create a new one in the console using this help article.

Getting error BXNUI2081E while uploading certificate files to Bluemix

I am getting the following error while trying to upload SSL certificates to IBM Cloud Bluemix. It happens both with the web GUI and CLI
Uploading certificate to domain 'xxxxx.co'...
FAILED
Error response from server. Status code: 500; description: BXNUI2081E: <b>The certificates and keys were not modified because an unknown error occurred: Error.</b> <br>Click the <b>Account and Support</b> icon in the top menu bar, click <b>Get help</b>, and search for help or get support..
What might be the reason and the solution?

API Management service in Bluemix can't be bound to CF application

I'm building a CloudFoundry application in Bluemix using the API Management service. For this I'm following this tutorial http://www.ibm.com/developerworks/cloud/library/cl-bluemix-api-mgmt-app/index.html.
I can successfully create an API Plan for a custom REST API application (running on a Liberty server on Bluemix as well) and it is published.
I can also create a service in my Bluemix dashboard using the new Custom API, which I take as the API plan was successfully deployed on Bluemix.
Whenever I try to bind this new service I get the following message:
BXNUI2055E: Unable to connect to Cloud Foundry because of the
following exception: "Read timed out." If the problem persists, see
the Troubleshooting topics in the IBM Bluemix Documentation to check
service status, review troubleshooting information, or for information
about getting help.
From time to time I also get this message
The service broker returned an invalid response for the request to
https://apimasv1-stage.stage1.mybluemix.net/d118dceb-edbf-4a7f-9bab-d44371b0c9f9/privateservices/v2/service_instances/1a60830c-0796-4105-afb4-e3477424acf9/service_bindings/ebb853dc-ec88-4987-b8f2-e9acd38d1741.
Status Code: 502 Bad Gateway, Body: 502 Bad Gateway: Registered
endpoint failed to handle the request.
Also, I can open the API portal and see the services listed in there. However, whenever I try to test the service, I get the following error
A security error has occurred. If using a self-signed certificate on
your gateway, you will need to accept it in your browser, which you
can do by clicking the following link.
https://api.wawona.apim.ibmcloud.com/victorshmx1ibmcom-dev/sb/LibraryREST/rs/authors/1
Also, below in the response I get this message:
NetworkError: Failed to execute 'send' on 'XMLHttpRequest': Failed to
load
'https://api.wawona.apim.ibmcloud.com/victorshmx1ibmcom-dev/sb/LibraryREST/rs/authors/1'.
I must clarify this service (the liberty app) doesn't have any security constraint to access the REST service nor I added some kind of security in the API Management portal.
Another thing to clarify is that I can bind other services, but not this one.
Does anyone know how I can fix those problems? Is there a known issue with IBM API Management service?
this seems to be an error with the service API Management instance you are trying to bind to.
You could open a ticket to support team following the link you can find here:
https://developer.ibm.com/bluemix/support/
Click on 'Contact IBM' and open a 'Support ticket'