错误日志在这里:
2020-11-01 12:25:34.275 WARN 20242 --- [nio-8088-exec-1] org.mongodb.driver.connection:在连接 [connectionId{localValue:4, serverValue:114406}] 上出现套接字异常cluster0-shard-00-02.1c6kg.mongodb.net:27017。与 cluster0-shard-00-02.1c6kg.mongodb.net:27017 的所有连接都将关闭。
2020-11-01 12:25:34.283 INFO 20242 --- [nio-8088-exec-1] org.mongodb.driver.connection:关闭连接 [connectionId{localValue:4, serverValue:114406}] 到 cluster0-shard -00-02.1c6kg.mongodb.net:27017 因为此连接引发了套接字异常。
2020-11-01 12:25:34.295 INFO 20242 --- [nio-8088-exec-1] org.mongodb.driver.cluster:WritableServerSelector 从集群描述 ClusterDescription{type=REPLICA_SET,connectionMode=MULTIPLE,未选择服务器serverDescriptions=[ServerDescription{address=cluster0-shard-00-00.1c6kg.mongodb.net:27017, type=REPLICA_SET_SECONDARY, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=8, maxDocumentSize=16777216,logicalSessionTimeoutMinutes=30, roundTripTimeNanos=46076648, setName='atlas-d9ovwb-shard-0', canonicalAddress=cluster0-shard-00-00.1c6kg.mongodb.net:27017, hosts=[cluster0-shard-00-00.1c6kg.mongodb.net:27017 ,cluster0-shard-00-01.1c6kg.mongodb.net:27017,cluster0-shard-00-02.1c6kg.mongodb.net:27017],passives=[],arbiters=[],primary='cluster0-shard-00 -02.1c6kg.mongodb.net:27017', tagSet=TagSet{[Tag{name='nodeType', value='ELECTABLE'}, Tag{name='provider', value='AWS'}, Tag{name= '区域',值='US_WEST_2'},标签{name='workloadType',值='OPERATIONAL'}] },electionId=null,setVersion=1,lastWriteDate=Sun Nov 01 12:25:29 PST 2020,lastUpdateTimeNanos=104428017411386},ServerDescription{address=cluster0-shard-00-02.1c6kg.mongodb.net:27017,type=UNKNOWN , state=CONNECTING}, ServerDescription{address=cluster0-shard-00-01.1c6kg.mongodb.net:27017, type=REPLICA_SET_SECONDARY, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=8, maxDocumentSize=16777216,logicalSessionTimeoutMinutes =30,roundTripTimeNanos=41202444,setName='atlas-d9ovwb-shard-0',canonicalAddress=cluster0-shard-00-01.1c6kg.mongodb.net:27017,hosts=[cluster0-shard-00-00.1c6kg.mongodb。净:27017,cluster0-shard-00-01.1c6kg.mongodb.net:27017,cluster0-shard-00-02.1c6kg.mongodb.net:27017],被动= [],仲裁= [],主要='cluster0- shard-00-02.1c6kg.mongodb.net:27017',tagSet=TagSet{[Tag{name='nodeType',value='ELECTABLE'},Tag{name='provider',value='AWS'},Tag {name='region',value='US_WEST_2'},Tag{name='workloadType',value='OPERATIONAL'}]},electionId=null,setVersion =1,lastWriteDate=2020 年 11 月 1 日星期日 12:25:29 PST,lastUpdateTimeNanos=104428010234368}]}。在超时前等待 30000 毫秒
2020-11-01 12:25:34.316 INFO 20242 --- [ngodb.net:27017] org.mongodb.driver.cluster:发现副本集主 cluster0-shard-00-02.1c6kg.mongodb.net:27017
2020-11-01 12:25:34.612 INFO 20242 --- [nio-8088-exec-1] org.mongodb.driver.connection:打开连接 [connectionId{localValue:5, serverValue:108547}] 到 cluster0-shard -00-02.1c6kg.mongodb.net:27017
2020-11-01 12:25:34.838 WARN 20242 --- [nio-8088-exec-1] org.mongodb.driver.connection:连接 [connectionId{localValue:5, serverValue:108547}] 时出现套接字异常cluster0-shard-00-02.1c6kg.mongodb.net:27017。与 cluster0-shard-00-02.1c6kg.mongodb.net:27017 的所有连接都将关闭。
2020-11-01 12:25:34.838 INFO 20242 --- [nio-8088-exec-1] org.mongodb.driver.connection:关闭连接 [connectionId{localValue:5, serverValue:108547}] 到 cluster0-shard -00-02.1c6kg.mongodb.net:27017 因为此连接引发了套接字异常。
2020-11-01 12:25:34.876 INFO 20242 --- [ngodb.net:27017] org.mongodb.driver.cluster:发现副本集主 cluster0-shard-00-02.1c6kg.mongodb.net:27017
2020-11-01 12:25:34.878 错误 20242 --- [nio-8088-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]:Servlet.service() 用于 servlet [dispatcherServlet] path [] 抛出异常 [请求处理失败;嵌套异常是 org.springframework.data.mongodb.UncategorizedMongoDbException: 异常发送消息;嵌套异常是 com.mongodb.MongoSocketWriteException: Exception sent message] with root cause