[JAVA-2876] Websphere SSL socket implementation can return null for SSLSocket.getSSLParameters() Created: 30/May/18 Updated: 28/Oct/23 Resolved: 05/Jun/18 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Connection Management |
| Affects Version/s: | None |
| Fix Version/s: | 3.8.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Alexander Komyagin | Assignee: | Jeffrey Yemin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
MDB java 3.4.3 |
||
| Description |
|
This leads to obscure exceptions in enableHostNameVerification (Java 7) and enableSni (Java 8). Looks like there were FREE tix related for: FREE-134337 or FREE-132717 |
| Comments |
| Comment by Githook User [ 05/Jun/18 ] | |||||||||||||||||||||||||||||||||
|
Author: {'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}Message: | |||||||||||||||||||||||||||||||||
| Comment by Githook User [ 05/Jun/18 ] | |||||||||||||||||||||||||||||||||
|
Author: {'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}Message: | |||||||||||||||||||||||||||||||||
| Comment by Githook User [ 05/Jun/18 ] | |||||||||||||||||||||||||||||||||
|
Author: {'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}Message: On some JDKs the SSLSocket#getSSLParameters method can return null, | |||||||||||||||||||||||||||||||||
| Comment by Githook User [ 05/Jun/18 ] | |||||||||||||||||||||||||||||||||
|
Author: {'username': 'jyemin', 'name': 'Jeff Yemin', 'email': 'jeff.yemin@10gen.com'}Message: On some JDKs the SSLSocket#getSSLParameters method can return null, | |||||||||||||||||||||||||||||||||
| Comment by Vlad Banishevskii [ 30/May/18 ] | |||||||||||||||||||||||||||||||||
|
jeff.yemin They're using MongoClientOptions builder on JDK 1.7:
| |||||||||||||||||||||||||||||||||
| Comment by Jeffrey Yemin [ 30/May/18 ] | |||||||||||||||||||||||||||||||||
|
Also, what version of the JDK is this? And is the "javax.net.ssl.SNIHostName" class available in this JDK? | |||||||||||||||||||||||||||||||||
| Comment by Vlad Banishevskii [ 30/May/18 ] | |||||||||||||||||||||||||||||||||
|
Command used to check the getSSLParameters()
| |||||||||||||||||||||||||||||||||
| Comment by Jeffrey Yemin [ 30/May/18 ] | |||||||||||||||||||||||||||||||||
|
Can you provide the SSL configuration for the MongoClient? In particular, is a javax.net.ssl.SSLContext or javax.net.SocketFactory being configured in MongoClientOptions? | |||||||||||||||||||||||||||||||||
| Comment by Vlad Banishevskii [ 30/May/18 ] | |||||||||||||||||||||||||||||||||
|
WebSphere default socket factory: com.ibm.websphere.ssl.protocol.SSLSocketFactory
Exception: com.mongodb.MongoException: java.lang.NullPointerException at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:126) at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:113) at java.lang.Thread.run(Thread.java:809) Caused by: java.lang.NullPointerException: null at com.mongodb.internal.connection.SslHelper.enableHostNameVerification(SslHelper.java:58) at com.mongodb.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:53) at com.mongodb.connection.SocketStream.open(SocketStream.java:58) at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:115) ... 2 common frames omitted |