解决 "couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connect: connection refused" 错误
E0806 22:59:17.895033 36768 memcache.go:238] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connect: connection refused\nE0806 22:59:17.895451 36768 memcache.go:238] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connect: connection refused\nE0806 22:59:17.897229 36768 memcache.go:238] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connect: connection refused\nE0806 22:59:17.898774 36768 memcache.go:238] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connect: connection refused\nE0806 22:59:17.900474 36768 memcache.go:238] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connect: connection refused\nThe connection to the server localhost:8080 was refused - did you specify the right host or port?\n报错解决内容:该错误表明应用程序无法连接到 localhost:8080。以下是一些可能的解决方法:\n\n1. 确保本地主机上正在运行一个名为 localhost:8080 的服务器。您可以尝试通过浏览器或使用 curl 命令来访问该地址,以确保服务器正在运行。\n\n2. 检查应用程序的配置文件或代码,确保它正在尝试连接到正确的主机和端口。可能是主机名或端口号被错误配置了。\n\n3. 检查防火墙设置,确保允许应用程序连接到 localhost:8080。有时防火墙会阻止对特定端口的访问。\n\n4. 如果您在容器中运行应用程序,请确保容器已正确映射到主机的端口8080。\n\n5. 检查是否有其他应用程序正在占用端口8080。您可以使用以下命令来查找占用该端口的进程:\n\n\nlsof -i :8080\n\n\n6. 如果您正在使用 Kubernetes 集群,请确保 kube-apiserver 正在运行并能够通过 localhost:8080 访问。\n\n7. 如果您使用的是 Kubernetes Ingress Controller,请确保 Ingress Controller 正确配置并且可以通过 localhost:8080 访问。\n\n通过检查这些可能的原因,您应该能够解决连接被拒绝的问题。
原文地址: https://www.cveoy.top/t/topic/qdwx 著作权归作者所有。请勿转载和采集!