java调用支付宝,本地测试OK,放在阿里云服务器上后,客户端与服务器通讯正常,但是在第一笔成功后的5-15秒(15秒估算的)内不能重复通讯,否则超时。异常如下
2017/12/17 16:04:26.660-[XQBHServer.ServerTran.AlipayQuery.exec:105]-[LOG_ERR]-com.alipay.api.AlipayApiException: java.net.SocketTimeoutException: Read timed out
at XQBHServer.Test.MyAlipayClient.doPost(MyAlipayClient.java:362)
at XQBHServer.Test.MyAlipayClient._execute(MyAlipayClient.java:315)
at XQBHServer.Test.MyAlipayClient.execute(MyAlipayClient.java:96)
at XQBHServer.Test.MyAlipayClient.execute(MyAlipayClient.java:85)
at XQBHServer.Test.MyAlipayClient.execute(MyAlipayClient.java:81)
at XQBHServer.ServerTran.AlipayQuery.exec(AlipayQuery.java:103)
at XQBHServer.ServerTran.Tran.execDo(Tran.java:20)
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 XQBHServer.ServerTran.CommonTran.Comtran(CommonTran.java:64)
at XQBHServer.Server.ServerMain$1$1.run(ServerMain.java:95)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:162)
at XQBHServer.Test.MyWebUtils.doPost(MyWebUtils.java:82)
at XQBHServer.Test.MyWebUtils.doPost(MyWebUtils.java:60)
at XQBHServer.Test.MyAlipayClient.doPost(MyAlipayClient.java:359)
... 13 more
跪求大神帮忙解决!!!
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。