zoukankan      html  css  js  c++  java
  • springcloud的Eureka启动时报错:Connection refused: connect

    Request execution error. endpoint=DefaultEndpoint{ serviceUrl='http://127.0.0.1:1096/eureka/}
    com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused: connect
    
    Request execution failed with message: java.net.ConnectException: Connection refused: connect
    
    com.netflix.discovery.shared.transport.TransportException: Cannot execute request on any known server

    解决方法:

    1.使用cmd查看端口没有占用;失败

    2.添加了自己是注册中心,不注册自己

    eureka:
      client:
        service-url: # EurekaServer的地址,现在是自己的地址,如果是集群,需要加上其它Server的地址。
          defaultZone: http://127.0.0.1:${server.port}/eureka
          ###自己是注册中心,是否要将自己注册到注册中心去,但是集群的时候需要设置为true
        register-with-eureka: false
          ###自己是注册中心,不需要去检索服务信息
        fetch-registry: false

    启动不报错了,但是无法访问

    3.最后

    把访问地址中的eureka去掉

    http://127.0.0.1:8086

    既然正常访问,无解

     

  • 相关阅读:
    [OpenJudge] 反正切函数的应用 (枚举)(数学)
    [OpenJudge] 摘花生 (模拟)
    [OpenJudge] 宇航员(模拟)
    [OpenJudge] 显示器(模拟)
    背包问题
    BFS_最短路径
    链表
    网站
    网站
    洛谷_递归整理
  • 原文地址:https://www.cnblogs.com/zxh06820/p/12906372.html
Copyright © 2011-2022 走看看