Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

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

Open
martijnvandenboom opened this issue Jun 6, 2022 · 3 comments

Comments

@martijnvandenboom
Copy link

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

@cf-gitbot
Copy link
Collaborator

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.

@thomas-worm-fernuni
Copy link

thomas-worm-fernuni commented Jul 14, 2022

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
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants