springCloud远程调用服务报错

springcloud 寻梦 5年前 (2019-10-23) 574次浏览 0个评论 扫描二维码
文章目录[隐藏]

网上大部分都是扯淡

问题

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is feign.RetryableException: Connection timed out: connect executing GET http://spring-cloud-hello-producer/hello?name=eeeee333d3%5D with root cause

解决

spring.application.name=spring-cloud-hello-producer
server.port
=8300
#注册时使用ip而不是主机名
eureka.instance.prefer-ip-address=true
#注册时的ip
eureka.instance.ip-address=47.199.225.255
eureka.instance.instance-id
= ${eureka.instance.ip-address}:${server.port}
eureka.instance.hostname
={eureka.instance.ip-address}

eureka.client.serviceUrl.defaultZone
=http://47.199.225.255:8200/eureka/
喜欢 (0)
[支付宝扫码,感谢支持]
分享 (0)
关于作者:

您必须 登录 才能发表评论!