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

在内网环境下出现一个这样的问题,和docker的网络设置有关? #1

Closed
zengaorong opened this issue Apr 17, 2023 · 1 comment

Comments

@zengaorong
Copy link

报错:exit status 1:driver: bad connection:[mysql] 2023/04/17 17:07:28 packets.go:37: read tcp 172.20.0.3:35930->192.168.1.180:5677: i/o timeout

部署DBMotion docker中的网络结构,宿主机的网络是192.168.1.0/24的网段
/dts-ui - 172.20.0.4
/dts-api-server - 172.20.0.3
/dts-mysql - 172.20.0.2

使用命令docker exec -it -u root dts-api-server bash 进入docker容器
telnet 192.168.1.180 5677 端口能通

请问需要如何配置解决上述的网络问题

@zengaorong
Copy link
Author

我已经解决了这个问题添加了ip route add 192.168.1.0/24 via 172.20.0.1 这个配置,172.20.0.1是docker的网关。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant