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

Express.js stub error: "failed to accept connections within health check timeout"

3100002S6M gravatar image
Question by Yata  (1) | Dec 17, 2014 at 05:20 AM node.jsibmcloudcfpushexpress

HI, I'm trying to deploy an app which was working until a few hours ago without success.

So I created simple text case with node.js and express.js. Latest versions of anything. I create a new bluemix app and.

 > express testapp
 > cd test app

Then I edit /var/www setting:

 "app.set('port', process.env.VCAP_APP_PORT || 3000);"

Saved the file.

Added:

   "engines": {
         "node": "0.10.x",
         "npm": "1.3.x"
     }

To package.json, saved the file. Then.

 > cf push myexpresstest

Fails to start. In the logs I find:

 > cf logs myexpresstest --recent

Says:

 2014-12-17T10:12:52.16+0100 [DEA]     OUT Got staging request for app with id a727292d-28f9-4880-b46b-61cb7d8b08e9
 2014-12-17T10:12:55.33+0100 [API]     OUT Updated app with guid a727292d-28f9-4880-b46b-61cb7d8b08e9 ({"state"=>"STARTED"})
 2014-12-17T10:12:55.47+0100 [STG]     OUT -----> Downloaded app package (4.0K)
 2014-12-17T10:12:57.68+0100 [STG]     OUT -----> Resolving node version by IBM
 2014-12-17T10:12:57.74+0100 [STG]     OUT -----> Requested node range:  0.10.x
 2014-12-17T10:12:57.74+0100 [STG]     OUT -----> Resolved node version: 0.10.33
 2014-12-17T10:12:57.74+0100 [STG]     OUT -----> Installing IBM SDK for Node.js from admin cache
 2014-12-17T10:12:58.33+0100 [STG]     OUT -----> Restoring node_modules directory from cache
 2014-12-17T10:12:59.69+0100 [STG]     OUT -----> Writing a custom .npmrc to circumvent npm bugs
 2014-12-17T10:13:01.18+0100 [STG]     OUT -----> Cleaning up node-gyp and npm artifacts
 2014-12-17T10:13:01.19+0100 [STG]     OUT -----> No Procfile found; Adding npm start to new Procfile
 2014-12-17T10:13:01.19+0100 [STG]     OUT -----> Building runtime environment
 2014-12-17T10:13:01.20+0100 [STG]     OUT -----> Checking and configuring service extensions
 2014-12-17T10:13:01.28+0100 [STG]     OUT -----> Node.js Buildpack is done creating the droplet
 2014-12-17T10:13:03.66+0100 [STG]     OUT -----> Uploading droplet (7.7M)
 2014-12-17T10:13:22.78+0100 [API]     OUT App instance exited with guid a727292d-28f9-4880-b46b-61cb7d8b08e9 payload: {"cc_partition"=>"default", "droplet"=>"a727292d-28f9-4880-b46b-61cb7d8b08e9", "version"=>"5842b60b-1bfb-4f35-9a97-6198c442ac41", "instance"=>"844898f989244baf857e0c395fea15c5", "index"=>0, "reason"=>"CRASHED", "exit_status"=>0, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1418814802}
 2014-12-17T10:13:22.79+0100 [DEA]     ERR Instance (index 0) failed to start accepting connections
 2014-12-17T10:14:49.55+0100 [DEA]     OUT Starting app instance (index 0) with guid a727292d-28f9-4880-b46b-61cb7d8b08e9
 2014-12-17T10:14:52.20+0100 [API]     OUT App instance exited with guid a727292d-28f9-4880-b46b-61cb7d8b08e9 payload: {"cc_partition"=>"default", "droplet"=>"a727292d-28f9-4880-b46b-61cb7d8b08e9", "version"=>"5842b60b-1bfb-4f35-9a97-6198c442ac41", "instance"=>"5abaaf4730fa4c5094d431fc92724ce2", "index"=>0, "reason"=>"CRASHED", "exit_status"=>0, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1418814892}
 2014-12-17T10:14:52.20+0100 [DEA]     ERR Instance (index 0) failed to start accepting connections
 2014-12-17T10:14:52.22+0100 [API]     OUT App instance exited with guid a727292d-28f9-4880-b46b-61cb7d8b08e9 payload: {"cc_partition"=>"default", "droplet"=>"a727292d-28f9-4880-b46b-61cb7d8b08e9", "version"=>"5842b60b-1bfb-4f35-9a97-6198c442ac41", "instance"=>"5abaaf4730fa4c5094d431fc92724ce2", "index"=>0, "reason"=>"CRASHED", "exit_status"=>0, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1418814892}
 2014-12-17T10:15:47.00+0100 [DEA]     OUT Starting app instance (index 0) with guid a727292d-28f9-4880-b46b-61cb7d8b08e9
 2014-12-17T10:15:51.72+0100 [App/0]   ERR
 2014-12-17T10:15:51.90+0100 [DEA]     ERR Instance (index 0) failed to start accepting connections

What it's happening?

Thanks.

People who like this

  0
Comment
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster

2 answers

  • Sort: 
3100002S6M gravatar image
Accepted answer

Answer by Yata (1) | Dec 17, 2014 at 11:09 AM

Actually this is an issue in Bluemix.

In my package.json file:

 "scripts": {
     "start": "node ./bin/www"
 }

No Procfile here. According to https://developer.ibm.com/answers/questions/22585/pushing-nodejs-app/ , script.start should be executed after cf push, but that never happens. node app.js is executed instead. Adding a Procfile does not solve anything.

So the solution was moving the contents of /bin/www to app.js. Now the app works.

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
270007B8PT gravatar image

Answer by Dave Cariello (2901) | Dec 17, 2014 at 10:11 AM

Hi Yata,

Have you seen this devWorks question? --> https://developer.ibm.com/answers/questions/22585/pushing-nodejs-app/

Looks like you are asking the same thing.

Comment

People who like this

  0   Share
10 |3000 characters needed characters left characters exceeded
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster

Follow this question

38 people are following this question.

Answers

Answers & comments

Related questions

How to increase default request timeout value in node.js application running on bluemix? 0 Answers

How to run a node.js that uses http-auth 1 Answer

Can we see the file structure of a deployed bluemix app? 0 Answers

Bluemix - is possible create an app using NodeJS and ExpressJS 4? 2 Answers

How to increase default request timeout value in node.js application running on bluemix? 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