【发布时间】:2018-01-23 15:18:29
【问题描述】:
我们有一个 Jersey REST 服务,以及使用 Spring 的 REST 模板的 REST 客户端,有时我们注意到客户端从 REST 服务收到 500 Internal Server Error:
error: 500 Internal Server Error; nested exception is org.springframework.web.client.HttpServerErrorException: 500 Internal Server Error
在检查服务器日志时,我们发现:
org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [ABC] in context with path [] threw exception [javax.ws.rs.ProcessingException: java.net.ConnectException: Connection timed out (Connection timed out)] with root cause
java.net.ConnectException: Connection timed out (Connection timed out)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
我不确定问题出在哪里,是服务器超时还是客户端超时?如果是客户端问题,我可以添加重试,但是如果是服务器超时怎么办?
【问题讨论】:
标签: java rest jersey spring-rest