Request execution failed with message: java.net.ConnectException: Connection refused: connect
时间: 2023-08-16 11:16:59 浏览: 170
IntelliJ IDEA报错Error:java: Compilation failed: internal java compiler error的解决办法
回答: 这个错误是由于请求执行失败导致的,错误信息是java.net.ConnectException: Connection refused: connect。根据引用\[1\],可能的原因是Eureka的Server没有启动。在使用@EnableDiscoveryClient或者@EnableEurekaClient之后,客户端会自动去寻找Eureka Server,如果找不到就会报这个错。所以请确保Eureka Server已经启动。如果是布置了Eureka集群,还需要在C:\Windows\System32\drivers\etc目录下的hosts文件中添加相应的配置,如引用\[3\]所示。
#### 引用[.reference_title]
- *1* *2* [spring Cloud 错误集锦](https://blog.csdn.net/qq_36148522/article/details/82015558)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [启动eureka服务端客户端报java.net.ConnectException: Connection refused: connect的错误](https://blog.csdn.net/qq_45968950/article/details/128164218)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down28v1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文