-
Type: Task
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.8.1
-
Component/s: Session Management
-
Environment:windows
I have a mongodb server 4.0.1, start with below script. It's a single server.
mongod --auth --dbpath "C:\Program Files\MongoDB\Server\4.0\data" --bind_ip 127.0.0.1 --wiredTigerCacheSizeGB 8
When create session in Java, it failed.
// java code MongoClient client = new MongoClient("127.0.0.1" , 27017); ClientSession session = client.startSession(); // output INFO: Monitor thread successfully connected to server with description ServerDescription{address=127.0.0.1:27017, type=STANDALONE, state=CONNECTED, ok=true, version=ServerVersion{versionList=[4, 0, 1]}, minWireVersion=0, maxWireVersion=7, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=2414624} Exception in thread "main" com.mongodb.MongoClientException: Sessions are not supported by the MongoDB cluster to which this client is connected
- is related to
-
JAVA-2956 Add Javadoc to startSession methods indicating when it will fail
- Closed