EADDRINUSE kubernetes runtime_error ai_generated true

错误:监听 tcp :80:绑定:地址已在使用中

Error: listen tcp :80: bind: address already in use

ID: kubernetes/port-conflict-ingress

其他格式: JSON · Markdown 中文 · English
88%修复率
87%置信度
1证据数
2023-11-20首次发现

根因分析

端口 80 或 443 已被主机上的另一个进程占用,阻止了入口控制器或 kube-proxy 绑定。

English

The port 80 or 443 is already occupied by another process on the host, preventing the ingress controller or kube-proxy from binding.

generic

官方文档

https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/

解决方案

  1. 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.
  2. Configure the ingress controller to use a different host port via hostPort in the deployment spec, e.g., 'hostPort: 8080'.

无效尝试

常见但无效的做法:

  1. Delete and recreate the ingress controller pod 80% 失败

    The pod inherits the host network; the port conflict persists on the node regardless of pod lifecycle.

  2. Change the ingress controller's service type to NodePort 60% 失败

    NodePort still uses host ports; the conflict remains unless the port is freed.