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

Problems on multi-service deployment #4617

Open
dingdinglz opened this issue Jan 31, 2025 · 5 comments
Open

Problems on multi-service deployment #4617

dingdinglz opened this issue Jan 31, 2025 · 5 comments

Comments

@dingdinglz
Copy link

我现在有几个rpc服务器,其中有一个rpc服务依赖于另一个rpc服务,且这两个服务部署在不同的服务器上(共享一个etcd),然后发现被依赖的服务启动后,依赖于这个服务的一个服务仍然启动不了,查了一下etcd记录,发现注册的服务的地址全部是内网地址,应该是因此导致的无法通信。

Image

(由于是租的两台服务器,所以不在一个局域网内)

请问有什么办法可以解决这种问题吗?感激不尽

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I now have several RPC servers, one of which RPC service depends on the other RPC service, and these two services are deployed on different servers (shared one ETCD), and then found that after the dependent service starts, it depends on this service. One service still can't start. Check the ETCD record and find that the address of the registered service is all internal network address, which should be unable to communicate.

! [Image] (https://github.com/user-attachments/76c0a740-E3FC-4CDA-A2DF-666fe2bca1e1)))))))

(Because it is two servers for renting, it is not in a local area network)

Is there any way to solve this problem? Thank you very much @@ ==== Multi -server deployment issues

@kevwan kevwan changed the title 多服务器部署问题 Problems on multi-service deployment Jan 31, 2025
@kevwan
Copy link
Contributor

kevwan commented Jan 31, 2025

You can use public IPs to set ListenOn in your config.

@dingdinglz
Copy link
Author

You can use public IPs to set ListenOn in your config.

感谢您的回复!我的listenon目前使用的是0.0.0.0:port,分配的仍然是内网ip,改成服务器ip:port的格式后,提示我bind: cannot assign requested address

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


You can use the public ips to set Listenon in your config.

Thank you for your reply! My Listenon currently uses 0.0.0.0:port, and the distribution is still the inner network IP. After changing it to a server IP: Port format, it is prompted to bind: cannot assign requested address

@kevwan
Copy link
Contributor

kevwan commented Feb 4, 2025

In this case, you can use direct target instead of etcd discovery.

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

3 participants