记一遇到使用java模拟https请求java.io.FileNotFoundException问题解决思路参考
java.io.FileNotFoundException: https://aa.cn/%E7%B2%A4B66578
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1836)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at com.TestHttps.httpRequest(TestHttps.java:81)
at com.TestHttps.baseRequest(TestHttps.java:27)
at com.TestHttps.main(TestHttps.java:20)
场景:
请求一对接方,对接方提供https服务,由nginx配置的https,经查是由于nginx的路由,路由到了一台没有服务的服务器,造成了没有数据引起的 InputStream没有流返回
排查思路1:
curl -X GET -v ‘https://请求’ 查看返回的头信息
like this
0 条评论