cf-for-k8s icon indicating copy to clipboard operation
cf-for-k8s copied to clipboard

Pushing the test-node-app results in FAILED with a connection refuse error for 127.0.0.1 port 8080

Open martijnvandenboom opened this issue 3 years ago • 3 comments

After following tutorials on installing cf-for-k8s I get to the step to push my first app but it fails.

I get the following error: "error": "Connection refused - Connection refused - connect(2) for "127.0.0.1" port 8080 (127.0.0.1:8080)"

Can you help me to resolve the issue? I would like to know more about how I can troubleshoot this situation. Do you have any tips?

Tutorials:

  1. https://cf-for-k8s.io/docs/
  2. https://www.devopsschool.com/blog/getting-started-with-cloud-foundry-for-kubernetes-using-cf-for-k8s-in-linuxubuntu/

Details: The netstat command is not showing any connections on port 8080.

Command: $ cf push test-node-app -v -p ./tests/smoke/assets/test-node-app

Terminal output: See attachments Output push test-node-app.pdf

martijnvandenboom avatar Jun 06 '22 16:06 martijnvandenboom

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/182390413

The labels on this github issue will be updated when the story is started.

cf-gitbot avatar Jun 06 '22 16:06 cf-gitbot

I have the same problem when deploying in an Azure Kubernetes Services cluster.

It seems to be an issue with registry buddy. It receives a shutdown signal on api-server and api-worker, so it shuts down while the app gets pushed:

Server is listening at 127.0.0.1:8080...
2022/07/14 06:29:58 Server is attempting to shut down...
2022/07/14 06:29:58 Server stopped

thomas-worm-fernuni avatar Jul 14 '22 05:07 thomas-worm-fernuni

The SIGTERM signal is caused by the health check:

When I remove the livenessProbe from cf-api-server and cf-api-worker the push succeeds:

        #livenessProbe:
        #  exec:
        #    command:
        #    - curl
        #    - --silent
        #    - --fail
        #    - --show-error
        #    - localhost:8080/healthz
        #  failureThreshold: 3
        #  initialDelaySeconds: 5
        #  periodSeconds: 10
        #  successThreshold: 1
        #  timeoutSeconds: 1

Why is the livenessProbe causing this? The registry-buddy listens hard-coded on 127.0.0.1. This seems to be a problem for the livenessProbe. registry-buddy should listen on 0.0.0.0.

thomas-worm-fernuni avatar Jul 14 '22 06:07 thomas-worm-fernuni