zoukankan      html  css  js  c++  java
  • 消费者模块调用提供者集群报错

    报错如下:

    This application has no explicit mapping for /error, so you are seeing this as a fallback.
    
    Tue May 11 23:40:56 CST 2021
    There was an unexpected error (type=Internal Server Error, status=500).
    No instances available for SPRINGCLOUD-PRODUCT-PROVIDERSproduct
    java.lang.IllegalStateException: No instances available for SPRINGCLOUD-PRODUCT-PROVIDERSproduct
        at org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient.execute(RibbonLoadBalancerClient.java:119)
        at org.springframework.cloud.netflix.ribbon.RibbonLoadBalancerClient.execute(RibbonLoadBalancerClient.java:99)
        at org.springframework.cloud.client.loadbalancer.LoadBalancerInterceptor.intercept(LoadBalancerInterceptor.java:58)
        at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:93)
        at org.springframework.http.client.InterceptingClientHttpRequest.executeInternal(InterceptingClientHttpRequest.java:77)
        at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48)
        at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53)
        at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:742)

    在消费者controller里面retemplte调用地址有单机版localhost加端口换成了服务名

     原因是粗心,url后面没有带/

  • 相关阅读:
    Python连接MySQL数据库之pymysql模块使用
    前端基础之BOM和DOM
    前端基础之JavaScript
    前端基础之CSS
    前端知识之HTML内容
    Python基础—名称空间(Day10)
    Python基础—装饰器(Day11)
    Python基础—迭代器、生成器(Day13)
    Python基础—文件操作(Day8)
    Python基础—函数(Day9)
  • 原文地址:https://www.cnblogs.com/wenwenzuiniucha/p/14758021.html
Copyright © 2011-2022 走看看