迭戈移民:502 Bad Gateway

时间:2017-07-12 09:49:58

标签: node.js migration ibm-cloud diego

我在IBM Bluemix DEA运行时上运行了现有的node.js应用程序。 我试图将它迁移到迭戈,迁移过程完成没有任何错误。 但是,当我尝试应用程序路由时,我收到'502 Bad Gateway:已注册的端点无法处理请求。'错误。 使用“迁移到迭戈”按钮完成迁移。

从应用程序控制台:

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"

1 个答案:

答案 0 :(得分:1)

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

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

迭代不会设置已弃用的VCAP_APP_HOSTVCAP_APP_PORT环境变量。