• 消费者模块调用提供者集群报错


    报错如下:

    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后面没有带/

  • 相关阅读:
    两个layout之间怎么切换好
    测试- 就从这儿起步
    Fiddler 学习
    我的周记4——“要繁荣富强,不要再让人欺负了”
    谈谈游戏
    我的周记3——“雨打梨花深闭门,忘了青春,误了青春”
    我的周记2——“天道酬勤"
    说说Charles
    Book list
    STL学习笔记(仿函数)
  • 原文地址:https://www.cnblogs.com/wenwenzuiniucha/p/14758021.html
Copyright © 2020-2023  润新知