Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Docker Eureka未知后异常_Docker_Spring Boot_Netflix Eureka_Hystrix - Fatal编程技术网

Docker Eureka未知后异常

Docker Eureka未知后异常,docker,spring-boot,netflix-eureka,hystrix,Docker,Spring Boot,Netflix Eureka,Hystrix,我正在尝试使用停靠的springboot应用程序来实现微服务体系结构 对于内部通信,我想使用Eureka+佯装客户端。向Eureka works fine(afaik)注册: 调用该方法时,会出现以下异常: account_1 | 2017-06-13 09:55:35.654 ERROR 1 --- [nio-6000-exec-6] o.a.c.c.C.[.[.[.[dispatcherServlet] : Servlet.service() for s

我正在尝试使用停靠的springboot应用程序来实现微服务体系结构

对于内部通信,我想使用Eureka+佯装客户端。向Eureka works fine(afaik)注册:

调用该方法时,会出现以下异常:

account_1               | 2017-06-13 09:55:35.654 ERROR 1 --- [nio-6000-exec-6] o.a.c.c.C.[.[.[.[dispatcherServlet]      : Servlet.service() for servlet [dispatcherServlet] in context with path [/accounts] threw exception [Request processing failed; nested exception is com.netflix.hystrix.exception.HystrixRuntimeException: createUser failed and no fallback available.] with root cause
account_1               |
account_1               | java.net.UnknownHostException: auth-service

注册的IP是正确的,我只是想知道为什么他不知道“身份验证服务”。所以我猜他可能根本就没试着和尤里卡说话?我怎样才能以这种方式进行调试?

您是否执行了
@enablefignclients
?重新启动应用程序怎么样?您的客户端应用程序上是否有
@EnableDiscoveryClient
?类路径中是否有org.springframework.cloud:springcloudstartereureka?
FeignClient(name = "auth-service")
public interface AuthServiceClient {

  @RequestMapping(method = RequestMethod.POST, value = "/users", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
  void createUser(User user);
}
account_1               | 2017-06-13 09:55:35.654 ERROR 1 --- [nio-6000-exec-6] o.a.c.c.C.[.[.[.[dispatcherServlet]      : Servlet.service() for servlet [dispatcherServlet] in context with path [/accounts] threw exception [Request processing failed; nested exception is com.netflix.hystrix.exception.HystrixRuntimeException: createUser failed and no fallback available.] with root cause
account_1               |
account_1               | java.net.UnknownHostException: auth-service