-
Notifications
You must be signed in to change notification settings - Fork 26.4k
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
AbstractRegistry lock problem #81
Comments
我也遇到了这个问题,请问你解决了么? |
这个只是个warn,但是我们项目中有时候也会碰到这个问题,但是之后再启动,就不会有这个问题,如果可以解决当然是最好了 @dudi123456 @justein |
@dudi123456 @Xiaobaxi 解决了,出现这个的原因是服务向ZK注册的同时,会缓存Consumer的列表,写入user.home/.dubbo/dubbo-registry-" + url.getHost() + ".cache 这个文件,当在同一个机器上启动多个Provider的时候,就会出现文件锁争用的问题,报上面这个错误。解决办法:服务模块各自缓存自己的cache文件,在<dubbo:registry />中加入 file="dubboregistry/dubbo-registry.properties" ,这样就会在bin目录下生成dubboregistry这个目录,cache文件就缓存在这个里边了。 |
@justein |
@501956430 加在你的provider的xml配置里,<dubbo:registry protocol="zookeeper" address="IP:2181" timeout="2000" file="dubboregistry/dubbo-registry.properties"/> |
之前在开源中国看到一篇文章,也是很多关于dubbo实际使用的问题和解决方案 |
备注一下。 |
备注一下 |
备注一下,多谢指导。 |
备注一下 |
mark |
consumer 中的.cache文件内容存的是什么啊,如果是生产者信息的话,为什么我三台主机,部署一个zookeeper集群,一个dubbo集群,一个消费者集群,结果每个消费者的.cache文件中只是记录了本机提供的服务啊。 |
可以,完美解决 |
2018-10-15 22:55:24,780 WARN [DubboSaveRegistryCache-thread-1] c.a.d.c.u.DubboLogger - [DUBBO] Failed to save registry store file, cause: null, dubbo version: 3.2.0, current host: xxx 这个也是由于多进程导致嘛? |
2018-10-15 22:55:24,780 WARN [DubboSaveRegistryCache-thread-1] c.a.d.c.u.DubboLogger - [DUBBO] Failed to save registry store file, cause: null, dubbo version: 3.2.0, current host: xxx 这个应该不是多进程并发导致的吧 |
环境:
dubbo启动时会报:
从异常看,是多个线程都要写信息,导致不能获取锁,同时也不尝试再次获取
The text was updated successfully, but these errors were encountered: