zoukankan      html  css  js  c++  java
  • Cannot execute request on any known server或DiscoveryClient_UNKNOWN/DESKTOP-MQ8D0C9:8761

    报错信息如下:

    2018-08-31 11:45:33.619 WARN 1068 --- [freshExecutor-0] c.n.d.s.t.d.RetryableEurekaHttpClient : Request execution failed with message: java.net.ConnectException: Connection refused: connect
    2018-08-31 11:45:33.619 ERROR 1068 --- [freshExecutor-0] com.netflix.discovery.DiscoveryClient : DiscoveryClient_UNKNOWN/admin-PC:6900 - was unable to refresh its cache! status = Cannot execute request on any known server

    2018-08-31 11:45:03.687 WARN 1068 --- [nfoReplicator-0] c.n.discovery.InstanceInfoReplicator : There was a problem with the instance info replicator

    com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server

    错误原因:

    1、Eureka服务注册中心也会将自己作为客户端来尝试注册它自己,所以我们需要禁用它的客户端注册行为即可。

    2、如果你写的是client端,注册server服务,也有可能是你注册的服务没有启动造成的。

    解决方案如下:

    第一种错误原因,解决如下:

    在配置文件中添加如下配置:

    eureka.client.register-with-eureka=false 
    eureka.client.fetch-registry=false

    第二种错误原因,直接启用server服务即可。 

  • 相关阅读:
    js实现将字符串里包含手机号的中间四位替换为****
    草稿for套for
    js实现将时间戳转换成2017-05-06 09:03:02
    时间日期校验接口
    JS延迟导航nav
    nav导航
    鼠标滚动请求加载
    常用开源Jabber(XMPP) IM服务器介绍(转)
    01.base-v1.js
    Haproxy安装及配置(转)
  • 原文地址:https://www.cnblogs.com/mmzs/p/9565183.html
Copyright © 2011-2022 走看看