播放akka连接超时

时间:2014-11-12 17:03:03

标签: playframework akka connection-timeout

我已经使用play akka安排了这项工作并面对以下问题,这是随机发生的:

[ERROR] [11/12/2014 08:41:29.364] [play-akka.actor.default-dispatcher-8] [TaskInvocation] Connection timed out
java.net.ConnectException: Connection timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:589)
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:649)
        at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
        at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:275)
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:371)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1103)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:997)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1511)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1439)
        at java.net.URLConnection.getContent(URLConnection.java:739)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getContent(HttpsURLConnectionImpl.java:434)
        at java.net.URL.getContent(URL.java:1052)
        at org.htmlcleaner.Utils.readUrl(Utils.java:113)
        at org.htmlcleaner.HtmlCleaner.clean(HtmlCleaner.java:359)
        at org.htmlcleaner.HtmlCleaner.clean(HtmlCleaner.java:373)

您能建议我该如何处理此异常?或者我应该增加超时,不知道该怎么做?任何帮助将不胜感激。

0 个答案:

没有答案