问题
I'm migrating our platform to JDK 11, and one of the services has the following issue when calling to graph.facebook.com API:
org.springframework.web.client.ResourceAccessException: I/O error on GET request for "https://graph.facebook.com/v3.1/xxxxx/adaccounts": peer not authenticated; nested exception is javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated... Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
I've checked ca-certs on the machine, everything looks fine:
ca-certificates is already the newest version (20180409). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
回答1:
You might try updating OpenJDK to 11.0.3 or higher.
I recently had a SSLPeerUnverifiedException
show up sporadically in an app on 11.0.2, along with an occasional SSLException: No PSK available. Unable to resume.
failure. The latter seems to be from a known bug in JDK 11.0.2. When I updated to 11.0.4, both problems disappeared.
来源:https://stackoverflow.com/questions/55128398/jdk-11-javax-net-ssl-sslpeerunverifiedexception-peer-not-authenticated