Application upload issue in bluemix - ibm-cloud

When pushing my application to bluemix with cf cli, it is showing "0 of 1 instances running, 1 starting"...and after sometime "FAILED start app timeout"
For the same account, in eclipse ibm bluemix server is not starting.

Thanks Ram,
We contacted the IBM customer support for the same problem and they suggested us to use a different buildpack.
This cf command prints the available buildpacks list for liberty runtime:
cf buildpacks | grep -i liberty
It returns 2 buildpack options
To specify the buildpack
cf push appName -b buildPackName
Hope this will help others.

Related

credhub login does not work after deploying CF on virtualbox using Bosh

I have installed CF on virtualbox using BOSH. Now I would like to use CF CLI and install an application on CF. For that, I am following instructions here: https://github.com/cloudfoundry/cf-deployment/blob/master/deployment-guide.md
It suggests to run "credhub login" and get the CF credentials to log in to CF. However, credhub login does not work. It doesn't identify the credhub command. My understanding is that credhub gets installed along with CF during deployment process which doesn't seem to be the case.
I am wondering how do i fetch the admin password for Cloud Foundry that I just installed on a virtualbox using bosh as credhub doesn't seem to work.
I also don't see a password for CF in credhub.yml in bosh-deployment folder.
I am not sure how this works. Any help would be highly appreciated.

Not able to push app to IBM cloud through IBM cloud cli

I am trying to push a simple app to ibm cloud from my local folder(cloned from github). But getting error every time I am trying.I tried every way possible by restarting my system couple of times.
edit 1:
if i am not mentioning path I am getting the below error
command does not look right.... I should start with
cf push appname
Ref:
https://console.bluemix.net/docs/cli/reference/ibmcloud/cf_index.html#cf_push
appname is required and is the name of the application that you see on ibm cloud dashboard.
if you want to pass the path use -p option. So command should be:
ibmcloud cf push appname -p C:\Dir1\Dir2\...

bx cf logs gives "Error dialing traffic controller server" when switching region

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

Connection error with cloudant db dedicated service on CIO Bluemix

I have created an app on CIO bluemix platform under my org. Then I added cloudant DB dedicated service and did a bind of the service with the app. The hello world Node JS starter works for the app. However, when I try to connect to the cloudant db by extending the starter app downloaded as the starter kit and cloud foundry cli, then it give 'connect ECONNREFUSED ' error. I have used the proper credentials. I also tried to launch the db using the web console that comes by clicking on the cloudant service icon, but it times out. Can you suggest what could be the issue? Thanks.
You need to take the hostname in your cloduant credentials file and add to your PC's host file:
windows sample:
9.45.69.22 23199ddc-775f-4ca5-91aa-XXXXXXXXXXXXXX-bluemix.cloudant.com # DEV MOOC

Steps to configure Bluemix Liberty application to add a certificate to the Liberty trust store using a cf CLI workflow?

I'm using the cf CLI to deploy a spring boot application to Bluemix. I'm getting an error 'RSA premaster secret error' as can be seen here: RSA premaster secret error when using webHDFS from BigInsights on cloud
I'm deploying my application like this:
# Create a Liberty application in Blumemix.
# Set APPNAME (below) to the name of the application.
APPNAME=<<theappname>>
cf login -u cf_username -p cf_password
cf push $APPNAME -p build/libs/myapp.jar
It seems that I need to add a certificate to the truststore - what are the additional steps for doing this? From what I can tell I need to repackage the liberty server to do this.
The above code snippet encapsulates my entire knowledge about liberty, please take that into account when providing an answer. For instance, I have seen some answers suggesting that I need to edit server.xml, but I don't have this file, so presumably I need to create it from scratch, or generate it some how?
I have seen similar questions, but the workflow I'm specifically asking about to add a certificate is when I'm using the cf CLI tools.
There's no one thing to do to accomplish this task, it will require several steps:
1) Ensure Liberty & Spring app works locally. The data below will guide you through ensuring Liberty & Spring are setup correctly:
How to use Websphere liberty in spring boot application
http://www.adeveloperdiary.com/java/spring-boot/deploy-spring-boot-application-ibm-liberty-8-5/
2) Configure security for your app in Liberty:
https://www.ibm.com/support/knowledgecenter/SSAW57_9.0.0/com.ibm.websphere.nd.multiplatform.doc/ae/tsec_7add_signercert.html
3) Deploy a packaged server to Bluemix from the CF command line:
https://console.ng.bluemix.net/docs/runtimes/liberty/optionsForPushing.html