估计mongodb数据库没开启,或者链接错误了,谁又改了,唉
2023-11-29 16:19:45.818 INFO 39552 --- [127.0.0.1:27017] org.mongodb.driver.cluster : Exception in monitor thread while connecting to server 127.0.0.1:27017com.mongodb.MongoSocketOpenException: Exception opening socketat com.mongodb.internal.connection.SocketStream.open(SocketStream.java:70)at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:180)at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.lookupServerDescription(DefaultServerMonitor.java:193)at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:157)at java.lang.Thread.run(Thread.java:750)
Caused by: java.net.ConnectException: Connection refused: connectat java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:81)at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:476)at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:218)at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:200)at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:162)at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:394)at java.net.Socket.connect(Socket.java:606)at com.mongodb.internal.connection.SocketStreamHelper.initialize(SocketStreamHelper.java:107)at com.mongodb.internal.connection.SocketStream.initializeSocket(SocketStream.java:79)at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:65)... 4 common frames omitted