Comments (3)
如果主机的网卡配置是内网IP地址,除非消费者也在这个内网,否则是无法访问到提供者的。你的方法二出错是因为你的公网IP不是本机,只不过是因为公网IP通过路由器配置绑定在你这台主机上。我也尝试过使用hostname,然后让客户端配置hosts解析,但是不知道为什么提供者通过这样开放的服务只能在本机访问到,其他主机都访问不到。
from dubbo.
- 我和你同样的问题,买的windows云服务器(显示有静态公网IP的)
- 运行后,telnet 公网ip port 是通的
- 配置hosts不生效的
https://github.com/apache/incubator-dubbo/blob/38e0f15be33a5edb35b45d2c5d7c6be753bdd888/dubbo-config/dubbo-config-api/src/main/java/com/alibaba/dubbo/config/ServiceConfig.java#L574
# 配置hosts,此处为举例
# hostToBind InetAddress.getLocalHost().getHostName()/hostname
x.x.x.x XXX
- 可以这样解决:指定host参数(anyhost就等于flase了)
<dubbo:provider host="hostToBind" />
- 但云服务器网卡显示的ip又不是公网IP,所以没发指定到host参数上,解决方案:
zerotier ,麻烦的就是需要把所有要访问这台电脑的都加入到zerotier里
- 这个是类似问题么?#823
from dubbo.
Please check: https://github.com/apache/incubator-dubbo/wiki/FAQ, in the "How to register ip correctly in docker" section.
Under windows you can use:
SET DUBBO_IP_TO_REGISTRY=8.8.8.8
from dubbo.
Related Issues (20)
- Incompatible with spring 3.2.0 and dubbo 2.7.11 HOT 2
- JsonPbCodecFactory needs to check if the protobuf class exists
- Incorrect response header for rest protocol HOT 3
- Context loss when async invoke HOT 5
- Timeout after provider restart HOT 5
- 如何手动从注册中心移除当前节点 HOT 2
- java.lang.NullPointerException: Cannot invoke "java.lang.Class.isPrimitive()" because "cls" is null
- org.apache.dubbo.config.spring6.utils.AotUtils NullPointerException HOT 3
- native-image compile failed ( java.lang.StackOverflowError) when field type is enum. HOT 5
- Unable to find providers if switch to injvm protocol HOT 1
- can't get attachment by RpcContext.getServerContext().getAttachment from provider while in async mode. HOT 1
- No provider available issue HOT 3
- why send flow control error when connection window is 0 HOT 6
- 开放原子开源基金会 x Apache Dubbo,下一代云原生微服务挑战赛启动报名! 五大赛题50万奖金池等你来战!
- dubbo3暴露ServiceConfig作为spring bean不会注册provider HOT 1
- Dubbo compile gradle support HOT 2
- dubbo-admin 上很多消费者归属应用为unknown HOT 1
- Version question HOT 2
- Request processing failed: org.apache.dubbo.rpc.RpcException: Failed to invoke the method
- java.lang.IllegalArgumentException: Metrics port cannot be null
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dubbo.