Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nginx: [emerg] bind() to [::1]:8444 failed (99: Cannot assign requested address) #8930

Closed
shineangelic opened this issue Apr 17, 2024 · 3 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@shineangelic
Copy link

shineangelic commented Apr 17, 2024

What happened?

I'm following project readme to install dashboard on my cluster running over docker-desktop (win). I can't access the dashboard, even tho it looks installed:

kubectl -n kubernetes-dashboard get pods

NAME                                                  READY   STATUS             RESTARTS         AGE
kubernetes-dashboard-api-556bd94b45-524dm             1/1     Running            0                25m
kubernetes-dashboard-auth-7f88786748-7bzwz            1/1     Running            0                25m
kubernetes-dashboard-kong-75bb76dd5f-bn9zs            0/1     CrashLoopBackOff   10 (3m51s ago)   30m
kubernetes-dashboard-metrics-scraper-8d8778c4-v9bl7   1/1     Running            0                30m
kubernetes-dashboard-web-7d77999479-q59zg             1/1     Running            0                30m

What did you expect to happen?

I was just following the guide's two steps:

# Add kubernetes-dashboard repository
helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
# Deploy a Helm Release named "kubernetes-dashboard" using the kubernetes-dashboard chart
helm upgrade --install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --create-namespace --namespace kubernetes-dashboard

at the end of the second one, the following message appears:

Congratulations! You have just installed Kubernetes Dashboard in your cluster.

To access Dashboard run:
  kubectl -n kubernetes-dashboard port-forward svc/kubernetes-dashboard-kong-proxy 8443:443

which I find a bit confusing, if opposed to the kubectl proxy I was used to. Anyway, when going to the default dashboard'URL, the following JSON appears:

{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {},
  "status": "Failure",
  "message": "services \"kubernetes-dashboard\" not found",
  "reason": "NotFound",
  "details": {
    "name": "kubernetes-dashboard",
    "kind": "services"
  },
  "code": 404
}

while I expected to see the dashboard

How can we reproduce it (as minimally and precisely as possible)?

the pods look ok, apart from one:

kubernetes-dashboard-kong-75bb76dd5f-bn9zs 0/1 CrashLoopBackOff 10 (3m51s ago) 30m

its logs say:

kubectl --namespace kubernetes-dashboard logs kubernetes-dashboard-kong-75bb76dd5f-bn9zs

Defaulted container "proxy" out of: proxy, clear-stale-pid (init)
Error: could not prepare Kong prefix at /kong_prefix: nginx configuration is invalid (exit code 1):
nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /kong_prefix/nginx.conf:7
nginx: the configuration file /kong_prefix/nginx.conf syntax is ok
nginx: [emerg] bind() to [::1]:8444 failed (99: Cannot assign requested address)
nginx: configuration file /kong_prefix/nginx.conf test failed

Anything else we need to know?

If I activate the port-forward like suggested:

kubectl -n kubernetes-dashboard port-forward svc/kubernetes-dashboard-kong-proxy 8443:443

at the first HTTP req on port 8443, it crashes like this:

Forwarding from 127.0.0.1:8443 -> 8443
Forwarding from [::1]:8443 -> 8443
Handling connection for 8443
Handling connection for 8443
E0418 00:34:50.449538   24288 portforward.go:409] an error occurred forwarding 8443 -> 8443: error forwarding port 8443 to pod 1e3d3feb7982df1a4590bc01be8152fb0357669b7265fef46de3b5a3f1837566, uid : exit status 1: 2024/04/17 22:34:50 socat[91763] E connect(11, AF=2 127.0.0.1:8443, 16): Connection refused
E0418 00:34:50.451682   24288 portforward.go:409] an error occurred forwarding 8443 -> 8443: error forwarding port 8443 to pod 1e3d3feb7982df1a4590bc01be8152fb0357669b7265fef46de3b5a3f1837566, uid : exit status 1: 2024/04/17 22:34:50 socat[91764] E connect(11, AF=2 127.0.0.1:8443, 16): Connection refused
error: lost connection to pod

What browsers are you seeing the problem on?

Chrome

Kubernetes Dashboard version

7

Kubernetes version

v1.29.1

Dev environment

win11 - docker desktop - kubectl - helm

@shineangelic shineangelic added the kind/bug Categorizes issue or PR as related to a bug. label Apr 17, 2024
@G-Despacito
Copy link

G-Despacito commented Apr 18, 2024

Check here #8765 This should solve your problem

@floreks
Copy link
Member

floreks commented Apr 18, 2024

As above. Closing as a duplicate. There are couple or other similar issues too.

/close

@k8s-ci-robot
Copy link
Contributor

@floreks: Closing this issue.

In response to this:

As above. Closing as a duplicate.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

4 participants