EADDRINUSE
kubernetes
runtime_error
ai_generated
true
Error: listen tcp :80: bind: address already in use
ID: kubernetes/port-conflict-ingress
88%Fix Rate
87%Confidence
1Evidence
2023-11-20First Seen
Root Cause
The port 80 or 443 is already occupied by another process on the host, preventing the ingress controller or kube-proxy from binding.
generic中文
端口 80 或 443 已被主机上的另一个进程占用,阻止了入口控制器或 kube-proxy 绑定。
Official Documentation
https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/Workarounds
-
90% success Identify and stop the process using the port: 'sudo lsof -i :80' then 'sudo kill -9 <PID>' or 'sudo systemctl stop nginx' if it's the default web server.
Identify and stop the process using the port: 'sudo lsof -i :80' then 'sudo kill -9 <PID>' or 'sudo systemctl stop nginx' if it's the default web server.
-
85% success Configure the ingress controller to use a different host port via hostPort in the deployment spec, e.g., 'hostPort: 8080'.
Configure the ingress controller to use a different host port via hostPort in the deployment spec, e.g., 'hostPort: 8080'.
中文步骤
Identify and stop the process using the port: 'sudo lsof -i :80' then 'sudo kill -9 <PID>' or 'sudo systemctl stop nginx' if it's the default web server.
Configure the ingress controller to use a different host port via hostPort in the deployment spec, e.g., 'hostPort: 8080'.
Dead Ends
Common approaches that don't work:
-
Delete and recreate the ingress controller pod
80% fail
The pod inherits the host network; the port conflict persists on the node regardless of pod lifecycle.
-
Change the ingress controller's service type to NodePort
60% fail
NodePort still uses host ports; the conflict remains unless the port is freed.