Dubbo异常 Can not lock the registry cache file解决方案

跑了很久的服务突然启动报错:

[DUBBO] Failed to save registry store file, cause: Can not lock the registry cache file /root/.dubbo/dubbo-registry-xx.xx.xx.xx.cache, ignore and retry later, maybe multi java process use the file, please config: dubbo.registry.file=xxx.properties, dubbo version: 2.8.4, current host: xx.xx.xx.xx
java.io.IOException: Can not lock the registry cache file /root/.dubbo/dubbo-registry-xx.xx.xx.xx.cache, ignore and retry later

分析:

Dubbo本地缓存服务列表默认采用的文件,会根据注册中心自动在当前用户目录下生成一个缓存文件。
默认地址:/root/.dubbo/dubbo-registry-xx.xx.xx.xx.cache
场景:再同一台机器上最近增加了一些Dubbo服务,导致多个进程去抢占默认的这个服务列表所在文件的读写权限。

解决:

分出一些服务配置不同的文件地址即可:
dubbo.registry.file=/path

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值