I developed an app using watson and cloudant. Completed the coding part using eclipse.
Build was successful and I got war file.
When I am trying to push this to bluemix, I am facing problem.
on giving the command
cf api https://api.eu-gb.bluemix.net
or
cf api https://api.ng.bluemix.net
I get the following in response
setting api endpoint to https://api.eu-gb.bluemixnet...
FAILED
Invalide SSL Cert for api.eu-gb.bluemix.net
TIP:Use 'CF api --skip--ssl-validation' to continue with an insecure API endpoint
Please help out, or tell some way to push my application.
I am not sure why are you getting the SSL Cert error.
Will you please try and see if cf login works for you by giving it the endpoint directly ?
http://docs.cloudfoundry.org/devguide/installcf/whats-new-v6.html
-u is the Bluemix user-id and this will prompt you for password. Let me know if this resolves for you or you get the same SSL error
Example =>
>>cf login -a api.ng.bluemix.net -u xxx#yy.zz -o xxx#yy.zz -s dev
API endpoint: api.ng.bluemix.net
Password>
Authenticating...
OK
Targeted org xxx#yy.zz
Targeted space dev
API endpoint: https://api.ng.bluemix.net (API version: 2.14.0)
User: xxx#yy.zz
Org: xxx#yy.zz
Space: dev
Related
I'm trying to deploy an app on IBM Cloud (Bluemix) from a Github repository (https://github.com/IBM/watson-vehicle-damage-analyzer).
When I deploy the app I choose London as location. The project try to deploy but it stops with this error:
Server error, status code: 502, error code: 10001, message: Service broker error: No matching deployments for the given plan_id.
Can somebody explain me what this error means? I have a paid account on IBM Cloud.
Here is the full log of my error:
Preparing to start the job...
Preparing the build artifacts...
cf login -a "https://api.eu-gb.bluemix.net" -u apikey -p "****" -o "xxxxxxxx#xxxxxxxx.com" -s "dev"
API endpoint: https://api.eu-gb.bluemix.net
Authenticating...
OK
Targeted org xxxxxxxxx#xxxxxxx.com
Targeted space dev
API endpoint: https://api.eu-gb.bluemix.net (API version: 2.106.0)
User: gabriel.cuesta#mkdautomotive.com
Org: gabriel.cuesta#mkdautomotive.com
Space: dev
Creating service instance wvda-visual-recognition in org gabriel.cuesta#mkdautomotive.com / space dev as gabriel.cuesta#mkdautomotive.com...
FAILED
Server error, status code: 502, error code: 10001, message: Service broker error: No matching deployments for the given plan_id.
Finished: FAILED
Thanks,
I see that in the manifest.yml file, it's creating a Watson VR service lite plan but as per the pricing on the website here, Watson VR with the lite plan is available only in us-south (Dallas) region.
You can check the same here as well - https://console.bluemix.net/catalog/services/visual-recognition
I need a script to collect logs which must switch between regions via a bx login -a. I'm using the bluemix cli so that I can login using an apikey.
But when I switch regions the bx cf logs app_name goes haywire.
[Ops]$ bx cf logs AppName
Invoking 'cf logs AppName'...
FAILED
Error dialing traffic controller server: websocket: bad handshake.
Please ask your Cloud Foundry Operator to check the platform configuration (traffic controller is wss://doppler.eu-gb.bluemix.net:443).
[Ops]$ bx api
API endpoint: https://api.ng.bluemix.net (API version: 2.54.0)
See how my api is ng but the doppler is the UK's eu-gb. If I run cf logs in UK region it does work fine.
Versions:
[Ops]$ bx --version
bx version 0.5.4+ae22935-2017-05-18T03:55:55+00:00
[Ops]$ bx update
Checking for updates...
No update required. Your CLI is already up-to-date.
[Ops]$ bx cf --version
Invoking 'cf --version'...
cf version 6.18.0+b22884b9c-2017-02-27
I found this and reckon at least related but note it's fixed in CF 6.26 and the embedded in bx version is 6.18.
Any workaround? Logout/Login with -a doesn't help me. I don't want to use cf directly due to my requirement to login via apikey.
Bluemix CLI embedded a CF CLI with version 6.18, 'bx app logs' actually invokes 'cf logs' as you can see from the messages. This embedded CF CLI needs to be upgraded.
A workaround is to just copy the cf cli binary to /usr/local/Bluemix/cfcli
I am trying to login to bluemix account through cloud foundry cli using command CF login and I am getting output as 'API endpoints > '
I tried CF API then I got message as 'No API endpoint set . Use 'cf api' to set an endpoint .' what is the API endpoint ?
The API endpoint is the server your CLI program talks to to execute the commands and obtain information. For IBM Bluemix the API endpoints are documented here.
You could do cf api api.eu-de.bluemix.net to set the endpoint for Bluemix in Frankfurt, Germany. Or cf api api.ng.bluemix.net to configure Dallas, USA, as endpoint. See the above linked documentation for the full list of Bluemix Public. Bluemix Dedicated and Bluemix Local have other API endpoints.
You can also set the api endpoint and login using just one command using, e.g. for the Dallas, USA, endpoint:
cf login -a https://api.ng.bluemix.net
Alternatively you can use new API endpoints:
https://api.us-south.cf.cloud.ibm.com
https://api.eu-gb.cf.cloud.ibm.com
https://api.eu-de.cf.cloud.ibm.com
https://api.au-syd.cf.cloud.ibm.com
with:
cf login -a <API_ENDPOINT>
or you can use ibmcloud cli:
ibmcloud login -a 'https://cloud.ibm.com' -r 'us-south'
ibmcloud target --cf-api 'https://api.us-south.cf.cloud.ibm.com'
How can I login with the Cloud Foundry CLI to the Swisscom Application Cloud when I have activated the two-step login method (password and SMS code) in my Swisscom Passeport account?
$ cf login -a https://….appcloud.swisscom.com -u …
API endpoint: https://….appcloud.swisscom.com
Password>
Authenticating...
Credentials were rejected, please try again.
After entering my Passeport password on the command line I do receive the SMS code, however there's no possibility to enter it on the command line.
If you enable Passeport's two-factor authentication, you have to use the --sso flag and follow the instructions:
cf login -a https://api.lyra-836.appcloud.swisscom.com --sso
API endpoint: https://api.lyra-836.appcloud.swisscom.com
One Time Code ( Get one at https://login.lyra-836.appcloud.swisscom.com/passcode )>
Switching to the browser and obtaining an OTP is needed because the cf cli does not support two-step auth directly on the cli yet.
We will add this info to the official documentation.
Because lots of users have problems to login to iAPC (internal Application Cloud) I post here the steps. For external users this API endpoint is not reachable, you need to be in Corproot network (with proxy configured).
unset https_proxy http_proxy HTTP_PROXY HTTPS_PROXY
cf login -a https://api.scapp-console.swisscom.com --sso
API endpoint: https://api.scapp-console.swisscom.com
One Time Code ( Get one at https://login.scapp-console.swisscom.com/passcode )>
Authenticating...
OK
Select an org (or press enter to skip):
(...)
Select a space (or press enter to skip):
(...)
Space> test
Targeted space Test
API endpoint: https://api.scapp-console.swisscom.com (API version: 2.92.0)
User: xxx.xxx#swisscom.com
Org: xxx
Space: xxx
A screenshot how the One Time Code looks like (you need to copy and paste into CF CLI)
This CF installation is connected to Corproot domain. You need to use your Corproot credentials (the same you use for your Desktop).
This how to error (Credentials were rejected, please try again) looks if you are doing it wrong:
cf push
FAILED
Not logged in. Use 'cf login' to log in.
cf login
API endpoint: https://api.scapp-console.swisscom.com
Email> xxx.xxx#swisscom.com
Password>
Authenticating...
Credentials were rejected, please try again
What is the difference between the two?
I am using cf api https://api.ng.bluemix.net.
Another tutorial on the IBM website uses cf api https://api.mybluemix.net.
Which doesn't seem to be working. Is it outdated and not working or am I using it wrong? On the Bluemix website they only show two CF API endpoints.
api.ng.bluemix.net
api.eu-gb.bluemix.net
https://www.ng.bluemix.net/docs/#overview/overview.html
Cheers
You should be using the api.ng.bluemix.net or api.eu-gb.bluemix.net as these are to two addresses for the two regions that are currently available in Bluemix. When new regions are created then you would use the api endpoint for that new region to log into it.
So if you have apps and services in the eu-gb (UK) region then you would log into api.eu-gb.bluemix.net. If you are using us-south region then you would log into api.ng.bluemix.net
The difference between a mybluemix.net address and a bluemix.net address is that the bluemix.net address is reserved for official IBM Bluemix provided applications such as console.ng.bluemix.net, api.ng.bluemix.net or status.ng.bluemix.net. The mybluemix.net addresses are the user applications that are running on Bluemix, these might or might not be developed by IBM.
I am not sure why are you getting the SSL Cert error.
Will you please try and see if cf login works for you by giving it the endpoint directly ? http://docs.cloudfoundry.org/devguide/installcf/whats-new-v6.html
Example =>
>>cf login -a api.ng.bluemix.net -u xxx#yy.zz -o xxx#yy.zz -s dev
API endpoint: api.ng.bluemix.net
Password>
Authenticating...
OK
Targeted org xxx#yy.zz
Targeted space dev
API endpoint: https://api.ng.bluemix.net (API version: 2.14.0)
User: xxx#yy.zz
Org: xxx#yy.zz
Space: dev