Unable to push Sample Shiny App to Bluemix

大兔子大兔子 提交于 2019-12-13 00:42:24

问题


Unable to push Sample App to Bluemix

Hi ,

I was attempting to try out the sample tutorial for Shiny with Bluemix -http://www.ibm.com/developerworks/library/ba-rtwitter-app/index.html

After going through multiple questions, I figured the app is not listening to the port assigned dynamically by Bluemix -ERROR : "Failed to accept connection within health check timeout..."

Since the app requires cf-buildpack-r would it be fair to assume the environment variables are also handled by the same package ?

Where do I add the following snippet ?

var port=process.env.VCAP_APP_PORT || 1337; http.createServer(app).listen(port), function(){ console.log('Express server listening on port ' + port); });

As there is no other visible js code present. I am not sure if I am missing something.

How to make the necessary modifications as there is no reproducible example for debugging this type of error ?

Command

cf push EdusasApp -b https://github.com/aruizga7/cf-buildpack-r --no-route

I also created a local manifest.yml containing :

applications: - host: Edusas disk: 1024M name: Edusas buildpack: https:..../cf-buildpack-r path: . domain: ng.bluemix.net mem: 512M instances:

Kindly Help


回答1:


Check out the project that was referenced in the docs, http://hub.jazz.net/project/crackmanworld/TwitterBluemix/overview. In the project there is a file, http://hub.jazz.net/project/crackmanworld/TwitterBluemix/… that contains the server startup. When the server starts up it binds to a port defined in an environment variable VCAP_APP_PORT, you can also use VCAP_PORT if you want as well.



来源:https://stackoverflow.com/questions/28357382/unable-to-push-sample-shiny-app-to-bluemix

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!