WeChat refund interface error No appropriate protocol

Due to ECS server problems, the server environment needs to be rebuilt and the code must be redeployed;

The original environment was sun JDK8.0, and the new environment was changed to OpenJDK8.

After redeploying the code, adding WeChat payment, and refund certificate, I found that the payment was normal, but the refund error was reported. Screenshot below

 The prompt is very clear, inappropriate protocol, query code, as follows

 After investigation, it was found that the WeChat service has been upgraded and no longer supports the TLSv1 protocol.

However, the code was downloaded from the demo of the official WeChat document. Now I checked it in the official WeChat document. The code in the demo is still the same and has not been modified.

At the same time, compare the differences between sunJDK and OpenJDK regarding the java.security file (in the jdk/jre/lib/security directory),

Found that OpenJDK did remove the TLSv1 protocol.

The solution is relatively simple. Delete the red box in the picture above and let Socket manage it by itself.

。。。。。。

This article refers to other articles, which propose different solutions. They are not verified and only links are posted.

https://developers.weixin.qq.com/community/develop/doc/000a00acea86e052e1494360456c00

https://blog.csdn.net/qq_33199919/article/details/108728094

https://blog.csdn.net/weixin_43650943/article/details/118578264

https://blog.csdn.net/luoww1/article/details/52571971

https://www.cnblogs.com/zhangxianming/p/8659790.html

Guess you like

Origin blog.csdn.net/u011453631/article/details/120033777