zoukankan      html  css  js  c++  java
  • dubbo常见报错

    1.

    java.io.IOException: Can not lock the registry cache file C:UsersAdministrator.dubbodubbo-registry-127.0.0.1.cache, ignore and retry later, maybe multi java process use the file, please config: dubbo.registry.file=xxx.properties
    at com.alibaba.dubbo.registry.support.AbstractRegistry.doSaveProperties(AbstractRegistry.java:193)
    at com.alibaba.dubbo.registry.support.AbstractRegistry$SaveProperties.run(AbstractRegistry.java:150)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)

    当本地同时启动服务端和客户端的时候就可能产生这个问题。
    解决方案

    Dubbo通过注册中心发现服务,发现的服务Dubbo同时也会保存到本地缓存一份,缓存的好处有很多,比如不需要每次使用的时候都通过注册中心获取,注册中心不可用了,不影响消费端的调用,因为本地缓存了一份服务提供者列表。Dubbo本地缓存默认采用的文件,会根据注册中心自动在当前用户目录下生成一个缓存文件,类似/home/newad/.dubbo/dubbo-registry-*.*.*.*.cache,星号表示注册中心的IP地址,当同一台机器上同时启动多个进程,就会出现多个进程争夺此文件的写入权限,觖此问题的方法也很简单,日志里面都说了重新配置一下这个缓存文件就。

    主要在启动脚本里面添加配置: -Ddubbo.registry.file=C:Usersdell.dubbodubbo-registry-192.168.1.62-junit.cache 文件名自己配置一个 -Ddubbo.registry.file=C:Usersdell.dubbodubbo-registry-192.168.1.62-junit.cache

  • 相关阅读:
    如何写一个简单的解释器
    linux下ifconfig, DNS以及route配置
    再次看编码
    Linux kernel API的查看
    学习Haskell的一些资料
    Unix,windows和Mac中的换行
    Cmake中的find_package功能
    知乎上有一个问题“在mfc框架中,有上面方法能直接将opencv2.0库中的Mat格式图片传递到Picture Control”中显示?
    RANSAC和Flitline
    花40分钟写一个-CBIR引擎-代码公开
  • 原文地址:https://www.cnblogs.com/kms1989/p/6728129.html
Copyright © 2011-2022 走看看