Reputation: 13395
I pushed the application to CloudFoundry and it showed in the logs that the application has started
But each request I make to CF entity it fails with BAD GATEWAY
2020-06-19T14:10:52.67+0200 [RTR/12] OUT app-server-dev.com -
[2020-06-19T12:10:52.672339821Z] "PUT /v2/service_instances/2bb29af7-c41a-4865-bfb8-a4ef6081438a?accepts_incomplete=true HTTP/1.1" 502 0 67
"-" "PostmanRuntime/7.24.1" "10.10.2.187:28852" "10.10.17.168:61054" x_forwarded_for:"213.127.57.86, 10.10.2.187" x_forwarded_proto:"http"
vcap_request_id:"efff0deb-2577-439b-703e-938b07012046" response_time:0.001090 gorouter_time:0.000109 app_id:"170c069e-7824-4dc7-bece-398faff72c92" app_index:"0" x_b3_traceid:"9d92b07d45abbdc9"
x_b3_spanid:"9d92b07d45abbdc9" x_b3_parentspanid:"-" b3:"9d92b07d45abbdc9-9d92b07d45abbdc9"
Locally it works fine. My manifest looks like this
applications:
- buildpack: https://github.com/cloudfoundry/python-buildpack#v1.7.15
disk_quota: 2G
health-check-type: process
command: python -m service
instances: 1
memory: 2G
name: simple-app
services:
- dynamodb-service
stack: cflinuxfs3
routes:
- route: app-server-dev.com
I do cf push
from the same location as manifest is located so it uploads the application from the same folder. Same command works when running locally.
What might be a problem?
Upvotes: 0
Views: 104
Reputation: 13395
The problem was that in the flask I haven't specified the host and it started on host 127.0.0.1
. I switched to 0.0.0.0
and it started to work.
Upvotes: 1