Connection RefusedErr无法建立连接

发布于 2025-02-07 17:57:37 字数 272 浏览 1 评论 0原文

我试图重新与A本地实例重新连接,但是获得此错误,可能的解决方法是什么? ('无法连接到任何服务器',{'127.0.0.1:8000':ConnectionRefusedError(10061,“尝试连接到[('127.0.0.1',6000)]。机器积极拒绝它”)})

我的docker-compose.yml文件看起来像这样 网络: 应用程序: 驾驶员:桥梁

服务: 卡桑德拉: 图片:“卡桑德拉:最新” 网络: -App-tier 暴露: - '6000' 端口: - '6000:9042'

I was trying to reconnect with the a local instance, but getting this error, what can be the possible workaround?
('Unable to connect to any servers', {'127.0.0.1:8000': ConnectionRefusedError(10061, "Tried connecting to [('127.0.0.1', 6000)]. Last error: No connection could be made because the target machine actively refused it")})

my docker-compose.yml file looks like this
networks:
app-tier:
driver: bridge

services:
cassandra:
image: 'cassandra:latest'
networks:
- app-tier
expose:
- '6000'
ports:
- '6000:9042'

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

软的没边 2025-02-14 17:57:37

您的客户端试图连接到端口8000时,您要公开端口6000。更改端口设置。

Your client tries to connect to a port 8000 while you are exposing port 6000. Change port settings.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文