迭戈移民:502坏门户

我在IBM Bluemix DEA运行时上运行了现有的node.js应用程序。 我试图将其迁移到迭戈,迁移过程没有任何错误完成。 但是,当我正在尝试应用程序路由时,我得到'502坏网关:注册端点未能处理请求。 错误。 迁移是使用“迁移到迭戈”button完成的。

从应用程序控制台

7/12/2017 8:59:28 AM OUT STG Staging complete 7/12/2017 8:59:28 AM OUT STG Uploading droplet, build artifacts cache... 7/12/2017 8:59:28 AM OUT STG Uploading build artifacts cache... 7/12/2017 8:59:28 AM OUT STG Uploading droplet... 7/12/2017 8:59:29 AM OUT STG Uploaded build artifacts cache (18.2M) 7/12/2017 8:59:34 AM OUT STG Uploaded droplet (38M) 7/12/2017 8:59:34 AM OUT STG Uploading complete 7/12/2017 8:59:34 AM OUT STG Destroying container 7/12/2017 8:59:34 AM OUT CELL Creating container 7/12/2017 8:59:35 AM OUT CELL Successfully created container 7/12/2017 8:59:37 AM OUT STG Successfully destroyed container 7/12/2017 8:59:40 AM OUT APP > MyReactApp@1.0.0 start /home/vcap/app 7/12/2017 8:59:40 AM OUT APP > node index.js 7/12/2017 8:59:40 AM OUT APP Example app listening at http://:::3001 ...... ...... 7/12/2017 9:00:08 AM OUT RTR myreactapp.w3ibm.mybluemix.net - [12/07/2017:09:00:08.768 +0000] "GET / HTTP/1.1" 502 0 67 "https://console.w3ibm.bluemix.net/dashboard/apps" "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0" 169.53.228.149:13440 x_forwarded_for:"9.84.35.70" x_forwarded_proto:"https" vcap_request_id:30f4de63-8ac9-4502-6d43-eb1eec7e1e02 response_time:0.003236115 app_id:4c4861e7-7ad1-4d1d-a838-b64d0e47408d x_global_transaction_id:"2500071025" 

OUT APP Example app listening at http://:::3001

检查您的应用程序是否正在侦听正确的主机和端口。 它应该是0.0.0.0以及Cloud Foundry通过PORT环境variables(可能是8080)分配的PORT

Diego不设置不推荐使用的VCAP_APP_HOSTVCAP_APP_PORT环境variables。