问题描述
无法将Sample App推送到Bluemix
Unable to push Sample App to Bluemix
我正在尝试使用Bluemix尝试Shiny的示例教程- http://www.ibm.com/developerworks/library/ba-rtwitter-app/index.html
I was attempting to try out the sample tutorial for Shiny with Bluemix -http://www.ibm.com/developerworks/library/ba-rtwitter-app/index.html
经历了多个问题后,我发现该应用程序未侦听Bluemix -ERROR动态分配的端口:无法在运行状况检查超时内接受连接..."
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..."
由于该应用程序需要cf-buildpack-r,因此可以假设环境变量也由同一包处理吗?
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); });
因为没有其他可见的js代码存在.我不确定是否丢失了一些东西.
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 ?
命令
我还创建了一个包含以下内容的本地manifest.yml:
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:
请帮助
推荐答案
查看文档 http://hub.jazz.net/project/crackmanworld/TwitterBluemix/overview .在项目中,有一个文件 http://hub.jazz.net/project/crackmanworld/TwitterBluemix/…包含服务器启动.服务器启动时,它将绑定到环境变量VCAP_APP_PORT中定义的端口,如果需要,您也可以使用VCAP_PORT.
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.
这篇关于无法将Sample Shiny App推送到Bluemix的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!