Details
-
Bug
-
Resolution: Works as Designed
-
Major - P3
-
None
-
3.7.0
-
None
Description
We are using the async driver. I've installed jnr-unixsocket. Then, just replacing:
serverAddress = new ServerAddress(host, port); |
With:
serverAddress = new UnixServerAddress("/tmp/mongodb-27017.sock"); |
Causes:
com.mongodb.MongoTimeoutException: Timed out after 5000 ms while waiting for a server that matches WritableServerSelector. Client view of cluster state is {type=UNKNOWN, servers=[{address=/tmp/mongodb-27017.sock, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoInternalException: Opening the AsynchronousSocketChannelStream failed}, caused by {java.lang.UnsupportedOperationException: Cannot return a InetSocketAddress from a UnixServerAddress}}]
|
at com.mongodb.connection.BaseCluster.createTimeoutException(BaseCluster.java:389)
|
at com.mongodb.connection.BaseCluster.handleServerSelectionRequest(BaseCluster.java:297)
|
at com.mongodb.connection.BaseCluster.access$800(BaseCluster.java:58)
|
at com.mongodb.connection.BaseCluster$WaitQueueHandler.run(BaseCluster.java:470)
|
at java.lang.Thread.run(Thread.java:748)
|
It says "Cannot return a InetSocketAddress from a UnixServerAddress" which I guess is some bug.
Attachments
Issue Links
- is related to
-
JAVA-2864 Improve domain socket documentation and error handling
-
- Backlog
-
- links to