exotic-amazon icon indicating copy to clipboard operation
exotic-amazon copied to clipboard

修改mongoDB配置不成功

Open xiaoer666 opened this issue 1 year ago • 4 comments

我再application文件种修改mongodb配置项,但是运行后日志中仍有尝试连接默认mongoDB

配置为

gora.mongodb.override_hadoop_configuration=true
gora.mongodb.servers=127.0.0.1:17017
gora.mongodb.login=root
gora.mongodb.secret=xxxxxxxx

spring.data.mongodb.uri=mongodb://root:[email protected]:17017/scent

日志中关键信息:

2023-11-11 20:40:45.774  INFO [main] o.m.d.cluster - Cluster created with settings {hosts=[127.0.0.1:17017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms'}
2023-11-11 20:40:45.940  INFO [.0.1:17017] o.m.d.connection - Opened connection [connectionId{localValue:2, serverValue:10}] to 127.0.0.1:17017
2023-11-11 20:40:45.938  INFO [.0.1:17017] o.m.d.connection - Opened connection [connectionId{localValue:1, serverValue:9}] to 127.0.0.1:17017
2023-11-11 20:40:45.941  INFO [.0.1:17017] o.m.d.cluster - Monitor thread successfully connected to server with description ServerDescription{address=127.0.0.1:17017, type=STANDALONE, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=21, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=56057300}

2023-11-11 20:40:53.328  INFO [r-worker-1] a.p.s.o.m.d.cluster - Cluster created with settings {hosts=[127.0.0.1:27017], mode=MULTIPLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
2023-11-11 20:40:53.328  INFO [r-worker-1] a.p.s.o.m.d.cluster - Adding discovered server 127.0.0.1:27017 to client view of cluster
2023-11-11 20:40:53.382  INFO [.0.1:27017] a.p.s.o.m.d.cluster - Exception in monitor thread while connecting to server 127.0.0.1:27017
2023-11-11 20:41:24.655  WARN [r-worker-6] a.p.p.p.WebDb - Data storage failure | [get] - Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=127.0.0.1:27017, type=UNKNOWN, state=CONNECTING, exception={ai.platon.shaded.com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused: connect}}]
2023-11-11 20:41:24.655  WARN [r-worker-5] a.p.p.p.WebDb - Data storage failure | [get] - Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=127.0.0.1:27017, type=UNKNOWN, state=CONNECTING, exception={ai.platon.shaded.com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused: connect}}]
2023-11-11 20:41:24.655  WARN [-worker-11] a.p.p.p.WebDb - Data storage failure | [get] - ai.platon.shaded.com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting to connect. Client view of cluster state is {type=UNKNOWN, servers=[{address=127.0.0.1:27017, type=UNKNOWN, state=CONNECTING, exception={ai.platon.shaded.com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused: connect}}]

xiaoer666 avatar Nov 11 '23 12:11 xiaoer666