我在intellij中运行了2个spring Boot /microservices。这两个服务启动时都没有错误。但如果第一个microservice尝试从第二个microservice调用服务,我会收到错误。有什么想法吗?代码在测试环境中运行良好,但在我的本地计算机上,我收到了下面的错误。我不知道应该从哪里开始查找错误。这两个microservices都在Eureka 注册,状态为“UP”。如果我把异常中显示的URL复制到浏览器,我不会得到连接超时。所以我认为问题出在intellij的某个地方,但我不知道哪里有东西可以“阻止”我的请求。我使用的是openjdk 8。任何提示都很好,谢谢
Caused by: feign.RetryableException: connect timed out executing GET http://ACCLEuUXkX9NNyu:8180/jaxrs/UserManagement/user/
at feign.FeignException.errorExecuting(FeignException.java:268)
at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:129)
at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89)
at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100)
at com.sun.proxy.$Proxy168.getBenutzerByName(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at at.acredia.acs.tool.proxy.AcsProxy$TargetCallable.call(AcsProxy.java:68)
at at.acredia.acs.tool.proxy.ValidationProxy.invoke(ValidationProxy.java:35)
at at.acredia.acs.tool.proxy.AcsProxyInvocationHandler.invoke(AcsProxyInvocationHandler.java:47)
at com.sun.proxy.$Proxy168.getBenutzerByName(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at at.acredia.acs.tool.proxy.AcsProxy$TargetCallable.call(AcsProxy.java:68)
at at.acredia.acs.tool.threadLocal.tool.AcsExecutableWrapperUtil.lambda$wrapCallable$1(AcsExecutableWrapperUtil.java:35)
at at.acredia.acs.tool.hystrix.AcsCallHystrixCommand.run(AcsCallHystrixCommand.java:55)
at at.acredia.acs.tool.hystrix.AcsCallHystrixCommand.run(AcsCallHystrixCommand.java:19)
at com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:302)
at com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:298)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:46)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:86)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:52)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:51)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:86)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:52)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:86)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:52)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:86)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:52)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:86)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:52)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:86)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:52)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:86)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:52)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:51)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:86)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:52)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:48)
at rx.internal.operators.OnSubscribeMap.call(OnSubscribeMap.java:33)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:86)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:52)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:86)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:52)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:86)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:52)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:51)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:86)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:52)
at rx.Observable.subscribe(Observable.java:10423)
at rx.Observable.subscribe(Observable.java:10390)
at rx.internal.operators.BlockingOperatorToFuture.toFuture(BlockingOperatorToFuture.java:51)
at rx.observables.BlockingObservable.toFuture(BlockingObservable.java:410)
at com.netflix.hystrix.HystrixCommand.queue(HystrixCommand.java:378)
at com.netflix.hystrix.HystrixCommand.execute(HystrixCommand.java:344)
at at.acredia.acs.tool.hystrix.AcsCallHystrixCommand.executeAndUnwrap(AcsCallHystrixCommand.java:64)
at at.acredia.acs.tool.hystrix.AcsServerHystrixCommand.run(AcsServerHystrixCommand.java:63)
at at.acredia.acs.tool.hystrix.AcsServerHystrixCommand.run(AcsServerHystrixCommand.java:22)
at com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:302)
at com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:298)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:46)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:86)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:52)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:51)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:86)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:52)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:41)
at rx.internal.operators.OnSubscribeDoOnEach.call(OnSubscribeDoOnEach.java:30)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:86)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:52)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OperatorSubscribeOn$SubscribeOnSubscriber.call(OperatorSubscribeOn.java:100)
at com.netflix.hystrix.strategy.concurrency.HystrixContexSchedulerAction$1.call(HystrixContexSchedulerAction.java:56)
at com.netflix.hystrix.strategy.concurrency.HystrixContexSchedulerAction$1.call(HystrixContexSchedulerAction.java:47)
at feign.opentracing.hystrix.TracingConcurrencyStrategy$OpenTracingHystrixCallable.call(TracingConcurrencyStrategy.java:97)
at com.netflix.hystrix.strategy.concurrency.HystrixContexSchedulerAction.call(HystrixContexSchedulerAction.java:69)
at rx.internal.schedulers.ScheduledAction.run(ScheduledAction.java:55)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
... 1 more
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:242)
at sun.net.www.http.HttpClient.New(HttpClient.java:339)
at sun.net.www.http.HttpClient.New(HttpClient.java:357)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1220)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1050)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:984)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at feign.Client$Default.convertResponse(Client.java:109)
at feign.Client$Default.execute(Client.java:105)
at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:119)
at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89)
at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100)
at com.sun.proxy.$Proxy168.getBenutzerByName(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at at.acredia.acs.tool.proxy.AcsProxy$TargetCallable.call(AcsProxy.java:68)
at at.acredia.acs.tool.proxy.ValidationProxy.invoke(ValidationProxy.java:35)
at at.acredia.acs.tool.proxy.AcsProxyInvocationHandler.invoke(AcsProxyInvocationHandler.java:47)
at com.sun.proxy.$Proxy168.getBenutzerByName(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at at.acredia.acs.tool.proxy.AcsProxy$TargetCallable.call(AcsProxy.java:68)
at at.acredia.acs.tool.threadLocal.tool.AcsExecutableWrapperUtil.lambda$wrapCallable$1(AcsExecutableWrapperUtil.java:35)
at at.acredia.acs.tool.hystrix.AcsCallHystrixCommand.run(AcsCallHystrixCommand.java:55)
at at.acredia.acs.tool.hystrix.AcsCallHystrixCommand.run(AcsCallHystrixCommand.java:19)
at com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:302)
at com.netflix.hystrix.HystrixCommand$2.call(HystrixCommand.java:298)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:46)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:86)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:52)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:51)
at rx.internal.operators.OnSubscribeDefer.call(OnSubscribeDefer.java:35)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:86)
at io.opentracing.rxjava.TracingRxJavaUtils$2$1.call(TracingRxJavaUtils.java:52)
at rx.Observable.unsafeSubscribe(Observable.java:10327)
2条答案
按热度按时间z4bn682m1#
很难说出到底是什么问题,如果你能提供更多的配置信息,那就更好了。因为这是一个连接超时错误,我建议在www.example.com中设置faign超时application.properties:
查看类似问题:feign.RetryableException: Read timed out executing GET
kr98yfug2#
找到了窃听器...
在VM选项...没有这个设置,它工作得很好。