Digital Developer Conference: a FREE half-day online conference focused on AI & Cloud – North America: Nov 2 – India: Nov 9 – Europe: Nov 14 – Asia Nov 23 Register now

Close outline
  • United States
IBM?
  • Site map
IBM?
  • Marketplace

  • Close
    Search
  • Sign in
    • Sign in
    • Register
  • IBM Navigation
IBM Developer Answers
  • Spaces
    • Blockchain
    • IBM Cloud platform
    • Internet of Things
    • Predictive Analytics
    • Watson
    • See all spaces
  • Tags
  • Users
  • Badges
  • FAQ
  • Help
Close

Name

Community

  • Learn
  • Develop
  • Connect

Discover IBM

  • ConnectMarketplace
  • Products
  • Services
  • Industries
  • Careers
  • Partners
  • Support
10.190.13.195

Refine your search by using the following advanced search options.

Criteria Usage
Questions with keyword1 or keyword2 keyword1 keyword2
Questions with a mandatory word, e.g. keyword2 keyword1 +keyword2
Questions excluding a word, e.g. keyword2 keyword1 -keyword2
Questions with keyword(s) and a specific tag keyword1 [tag1]
Questions with keyword(s) and either of two or more specific tags keyword1 [tag1] [tag2]
To search for all posts by a user or all posts with a specific tag, start typing and choose from the suggestion list. Do not use a plus or minus sign with a tag, e.g., +[tag1].
  • Ask a question

Fail to cf push my app.js

270002W45U gravatar image
Question by judehung  (15) | Oct 16, 2014 at 05:21 AM node.jsibmcloud

Hi all,

While I cf push my app.js, following error will occur and then failed.

alt text

After searching the forum, it seems I might encounter the same problem as described here.

I've tried the solution as provided by Richard to resolve this:

cf delete myappname
cf delete-route mybluemix.net -n myappname
cf push myappname -p . --no-route

Unfortunately, I still got the same failure result. I also tried cf logs while pushing my app, but just got nothing. My app.js runs perfectly on my local environment, so I'm wondering if I make something wrong while pushing.

This is my manifest.yml

disk: 1024M
name: myappname
command: node app.js
path: .
domain: mybluemix.net
memory: 512M
instances: 1

My app.js (the code is simplied and still can reproduce the same issue)

var ibmbluemix = require('ibmbluemix'), ibmpush = require('ibmpush'), ibmdata = require('ibmdata');

//configuration for application var appConfig = { applicationId: "......", applicationRoute: "......", applicationSecret: "......" };

var INTERVAL = 5000;

//initialize mbaas-config module ibmbluemix.initialize(appConfig); IBMData.initializeService(); var push = IBMPush.initializeService();

setInterval(logConsole, INTERVAL);

function logConsole(){ console.log("show up every " + INTERVAL/1000 + " seconds."); }

Any comments would be highly appreciated. Thanks!

People who like this

  0   Show 6
Comment
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
110000ABU4 gravatar image Andrew Whitfield (4919)   Oct 16, 2014 at 05:48 AM 0
Share

Can you provide the output from the cf logs JudeSquadTracker --recent as mentioned in the TIPS section on the command line. This will provide some information as to why the app is not starting.

270002W45U gravatar image judehung (15)   Oct 16, 2014 at 05:59 AM 0
Share

Hi Andrew, I actually did, but there was no log at all:

D:\Works\Android_DEV\RockStarWS\SquadTracker\NodeJS>cf logs JudeSquadTracker --recent Connected, dumping recent logs for app JudeSquadTracker in org judehung@tw.ibm.c om / space dev as judehung@tw.ibm.com...

D:\Works\Android_DEV\RockStarWS\SquadTracker\NodeJS>

110000ABU4 gravatar image Andrew Whitfield (4919)   Oct 16, 2014 at 06:22 AM 0
Share

Did you run that straight after the failure to push? The log stream is only held for a period of time so if you ran the cf logs command sometime after the cf push command you might not see any output. I would run the cf push command again (with the --no-route option still) and then run the cf logs command with the --recent option.

270002W45U gravatar image judehung (15)   Oct 16, 2014 at 06:29 AM 0
Share

Hi Andrew, Yes, I did execute "cf logs JudeSquadTracker --recent" right after the cf push command terminated, and there was no log.

Moreover, I also opened another terminal to cf login and then cf logs while cf push my app. There was still no log.

110000ABU4 gravatar image Andrew Whitfield (4919)   Oct 16, 2014 at 06:47 AM 0
Share

I am not sure why you are not seeing the logs. I just verified that the log stream is working in general, so it is not a problem there. If you have just pushed app JudeSquadTracker in that org/space and it failed to start, then the cf logs command with the --recent option should show something as the app was staged but failed to start. Can I confirm you are running on the production Bluemix server (ace.ng.bluemix.net)?

Show more comments

2 answers

  • Sort: 
270002W45U gravatar image
Accepted answer

Answer by judehung (15) | Oct 16, 2014 at 07:12 AM

Finally found the root cause why my push command always failed: I was using an old version of cf cli (cf version 6.0.2-96d242f). After updating the cf cli to the latest version (cf version 6.6.0-dbf6f21-2014-09-23T20:52:55+00:00), everything works perfectly.

Thanks everyone for all the support and quick response!

Comment
Andrew Whitfield

People who like this

  1   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
120000HUQM gravatar image

Answer by ChrisBailey (456) | Oct 16, 2014 at 06:18 AM

In order to mark an instance as running, is must start to respond on VCAP_APP_PORT or have the no-route attribute set in the manifest.yml or the --no-route option on the cf push command.

Comment
Ryan J Baxter

People who like this

  1   Show 2   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
270002W45U gravatar image judehung (15)   Oct 16, 2014 at 06:30 AM 0
Share

Hi Chris,

I update my manifest.yml with one more attribute:

no-route: true

Then rerun cf push command with --no-route option, but I still got the same failure result.

270002W45U gravatar image judehung (15)   Oct 16, 2014 at 07:15 AM 0
Share

Hi Chris, The root cause of all these troubles is due to my old version cf cli. After updating the cf cli to the latest version, both push and logs works perfectly. Thanks for all the support and quick response!

Follow this question

No one has followed this question yet.

Answers

Answers & comments

Related questions

Routes deleted for my NODEJS app ? 3 Answers

What controls the builder configuration when editing the Configure Pipeline for DevOps Services? 1 Answer

How to deploy a web app based on grunt 2 Answers

Integration between nodejs (bluemix) and IBM BPM (hosted on cloud) 1 Answer

Getting an "Unauthorized" response on my public html files only after scaling to multiple containers 2 Answers

  • Contact
  • Privacy
  • IBM Developer Terms of use
  • Accessibility
  • Report Abuse
  • Cookie Preferences

Powered by AnswerHub

Authentication check. Please ignore.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • API Connect
  • Analytic Hybrid Cloud Core
  • Application Performance Management
  • Appsecdev
  • BPM
  • Blockchain
  • Business Transaction Intelligence
  • CAPI
  • CAPI SNAP
  • CICS
  • Cloud Analytics
  • Cloud Automation
  • Cloud Object Storage
  • Cloud marketplace
  • Collaboration
  • Content Services (ECM)
  • Continuous Testing
  • Courses
  • Customer Experience Analytics
  • DB2 LUW
  • Data and AI
  • DataPower
  • Decision Optimization
  • DevOps Build
  • DevOps Services
  • Developers IBM MX
  • Digital Commerce
  • Digital Experience
  • Finance
  • Global Entrepreneur Program
  • Hadoop
  • Hybrid Cloud Core
  • Hyper Protect
  • IBM Cloud platform
  • IBM Design
  • IBM Forms Experience Builder
  • IBM Maximo Developer
  • IBM StoredIQ
  • IBM StoredIQ-Cartridges
  • IIDR
  • ITOA
  • InformationServer
  • Integration Bus
  • Internet of Things
  • Kenexa
  • Linux on Power
  • LinuxONE
  • MDM
  • Mainframe
  • Messaging
  • Node.js
  • ODM
  • Open
  • PartnerWorld Developer Support
  • PowerAI
  • PowerVC
  • Predictive Analytics
  • Product Insights
  • PureData for Analytics
  • Push
  • QRadar App Development
  • Run Book Automation
  • Search Insights
  • Security Core
  • Storage
  • Storage Core
  • Streamsdev
  • Supply Chain Business Network
  • Supply Chain Insights
  • Swift
  • UBX Capture
  • Universal Behavior Exchange
  • UrbanCode
  • WASdev
  • WSRR
  • Watson
  • Watson Campaign Automation
  • Watson Content Hub
  • Watson Marketing Insights
  • dW Answers Help
  • dW Premium
  • developerWorks Sandbox
  • developerWorks Team
  • Watson Health
  • More
  • Tags
  • Questions
  • Users
  • Badges