首页 > 解决方案 > MongoDB Docker 和 Robo 3T

问题描述

我在 windows 上的 docker 桌面中从 dockerhub 运行 mongo docker 映像,并使用 Robo 3T 连接到它

在 Robo 3T 中,我试图创建一个新的数据库“用户”,它似乎成功了,但是当我关闭 Robo 3T 并再次打开它时,我看不到我创建的数据库。有什么问题?mongo中的日志记录:

隐式 TCP FastOpen 不可用。如果需要 TCP FastOpen,则设置 tcpFastOpenServer、tcpFastOpenClient 和 tcpFastOpenQueueSize。"}{"t":{"$date":"2021-02-19T17:52:51.509+00:00"},"s":"I ", "c":"STORAGE", "id":4615611, "ctx":"initandlisten","msg":"MongoDB 开始","attr":{"pid":1,"port":27017, "dbPath":"/data/db","architecture":"64-bit","host":"65b9eb39f125"}} {"t":{"$date":"2021-02-19T17:52: 51.509+00:00"},"s":"I", "c":"CONTROL", "id":23403, "ctx":"initandlisten","msg":"构建信息","attr" :{" id":22270, "ctx":"initandlisten","msg":"数据文件检测到的存储引擎","attr":{"dbpath":"/data/db","storageEngine":"wiredTiger "}} {"t":{"$date":"2021-02-19T17:52:51.514+00:00"},"s":"W", "c":"STORAGE", "id" :22302, "ctx":"initandlisten","msg":"从上一个干净的检查点恢复数据。"} {"t":{"$date":"2021-02-19T17:52:51.514+00: 00"},"s":"I", "c":"STORAGE", "id":22297, "ctx":"initandlisten","msg":"强烈建议使用 XFS 文件系统和 WiredTiger 存储引擎。看 id":22270, "ctx":"initandlisten","msg":"数据文件检测到的存储引擎","attr":{"dbpath":"/data/db","storageEngine":"wiredTiger "}} {"t":{"$date":"2021-02-19T17:52:51.514+00:00"},"s":"W", "c":"STORAGE", "id" :22302, "ctx":"initandlisten","msg":"从上一个干净的检查点恢复数据。"} {"t":{"$date":"2021-02-19T17:52:51.514+00: 00"},"s":"I", "c":"STORAGE", "id":22297, "ctx":"initandlisten","msg":"强烈建议使用 XFS 文件系统和 WiredTiger 存储引擎。看 initandlisten","msg":"数据文件检测到要使用的存储引擎","attr":{"dbpath":"/data/db","storageEngine":"wiredTiger"}} {"t":{" $date":"2021-02-19T17:52:51.514+00:00"},"s":"W", "c":"STORAGE", "id":22302, "ctx":"initandlisten" ,"msg":"正在从上次清理检查点恢复数据。"} {"t":{"$date":"2021-02-19T17:52:51.514+00:00"},"s":"I ", "c":"STORAGE", "id":22297, "ctx":"initandlisten","msg":"强烈建议在 WiredTiger 存储引擎中使用 XFS 文件系统。看 initandlisten","msg":"数据文件检测到要使用的存储引擎","attr":{"dbpath":"/data/db","storageEngine":"wiredTiger"}} {"t":{" $date":"2021-02-19T17:52:51.514+00:00"},"s":"W", "c":"STORAGE", "id":22302, "ctx":"initandlisten" ,"msg":"正在从上次清理检查点恢复数据。"} {"t":{"$date":"2021-02-19T17:52:51.514+00:00"},"s":"I ", "c":"STORAGE", "id":22297, "ctx":"initandlisten","msg":"强烈建议在 WiredTiger 存储引擎中使用 XFS 文件系统。看 数据文件检测到的存储引擎","attr":{"dbpath":"/data/db","storageEngine":"wiredTiger"}} {"t":{"$date":"2021-02 -19T17:52:51.514+00:00"},"s":"W", "c":"STORAGE", "id":22302, "ctx":"initandlisten","msg":"正在恢复数据从最后一个干净的检查点开始。"} {"t":{"$date":"2021-02-19T17:52:51.514+00:00"},"s":"I", "c":"STORAGE ", "id":22297, "ctx":"initandlisten","msg":"强烈建议在 WiredTiger 存储引擎中使用 XFS 文件系统。看 数据文件检测到的存储引擎","attr":{"dbpath":"/data/db","storageEngine":"wiredTiger"}} {"t":{"$date":"2021-02 -19T17:52:51.514+00:00"},"s":"W", "c":"STORAGE", "id":22302, "ctx":"initandlisten","msg":"正在恢复数据从最后一个干净的检查点开始。"} {"t":{"$date":"2021-02-19T17:52:51.514+00:00"},"s":"I", "c":"STORAGE ", "id":22297, "ctx":"initandlisten","msg":"强烈建议在 WiredTiger 存储引擎中使用 XFS 文件系统。看 /data/db","storageEngine":"wiredTiger"}} {"t":{"$date":"2021-02-19T17:52:51.514+00:00"},"s":"W" , "c":"STORAGE", "id":22302, "ctx":"initandlisten","msg":"正在从上次清理检查点恢复数据。"} {"t":{"$date":" 2021-02-19T17:52:51.514+00:00"},"s":"I", "c":"STORAGE", "id":22297, "ctx":"initandlisten","msg": “强烈建议在 WiredTiger 存储引擎中使用 XFS 文件系统。看 /data/db","storageEngine":"wiredTiger"}} {"t":{"$date":"2021-02-19T17:52:51.514+00:00"},"s":"W" , "c":"STORAGE", "id":22302, "ctx":"initandlisten","msg":"正在从上次清理检查点恢复数据。"} {"t":{"$date":" 2021-02-19T17:52:51.514+00:00"},"s":"I", "c":"STORAGE", "id":22297, "ctx":"initandlisten","msg": “强烈建议在 WiredTiger 存储引擎中使用 XFS 文件系统。看 STORAGE", "id":22302, "ctx":"initandlisten","msg":"正在从上次清理检查点恢复数据。"} {"t":{"$date":"2021-02-19T17: 52:51.514+00:00"},"s":"I", "c":"STORAGE", "id":22297, "ctx":"initandlisten","msg":"使用 XFS 文件系统是强烈推荐使用 WiredTiger 存储引擎。看 STORAGE", "id":22302, "ctx":"initandlisten","msg":"正在从上次清理检查点恢复数据。"} {"t":{"$date":"2021-02-19T17: 52:51.514+00:00"},"s":"I", "c":"STORAGE", "id":22297, "ctx":"initandlisten","msg":"使用 XFS 文件系统是强烈推荐使用 WiredTiger 存储引擎。看http://dochub.mongodb.org/core/prodnotes-filesystem","tags":["startupWarnings"]} msg":"WiredTiger message","attr":{"message":"[1613757172:517662][1:0x7fdada605ac0], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] 主恢复循环:从 2/37120 到 3/256"}} {"t":{"$date":"2021-02-19T17:52:52.518+00:00"},"s": "I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1613757172:518909] [1:0x7fdada605ac0], txn-recover: [WT_VERB_RECOVERY_PROGRESS] 恢复日志 2 到 3"}} {"t":{"$date":"2021-02-19T17:52:52.592+00:00"}," s":"I", "c":"STORAGE", "id":22430, "ctx":" initandlisten","msg":"WiredTiger message","attr":{"message":"[1613757172:592271][1:0x7fdada605ac0], txn-recover: [WT_VERB_RECOVERY_PROGRESS] 正在恢复日志 3 到 3"}} {" t":{"$date":"2021-02-19T17:52:52.636+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx ":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1613757172:636818][1:0x7fdada605ac0], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] 设置全局恢复时间戳:(0, 0)"}} {"t":{"$date":"2021-02-19T17:52:52.636+00:00"},"s":"I" , "c":"存储", "id":22430, "ctx":" initandlisten","msg":"WiredTiger message","attr":{"message":"[1613757172:636944][1:0x7fdada605ac0], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] 设置全局最旧时间戳:(0, 0)"}} {"t":{"$date":"2021-02-19T17:52:52.756+00:00"},"s":"I" , "c":"STORAGE", "id":4795906, "ctx":"initandlisten","msg":"WiredTiger 打开","attr":{"durationMillis":1242}} {"t":{ "$date":"2021-02-19T17:52:52.756+00:00"},"s":"I", "c":"RECOVERY", "id":23987, "ctx":"initandlisten ","msg":"WiredTiger recoveryTimestamp","attr":{" CONTROL", "id":22178, "ctx":"initandlisten","msg":"/sys/kernel/mm/transparent_hugepage/enabled 是 'always'。我们建议将其设置为 'never'","tags":["startupWarnings"]} {"t":{"$date":"2021-02-19T17:52:52.787+00:00"},"s ":"I", "c":"STORAGE", "id":20536, "ctx":"initandlisten","msg":"在这个部署上启用了流控制"} {"t":{"$ date":"2021-02-19T17:52:52.791+00:00"},"s":"I", "c":"FTDC", "id":20625, "ctx":"initandlisten", "msg":"初始化全时诊断数据捕获","attr":{"id ","commitTimestamp":{"$timestamp":{"t":0,"i":0}}}} {"t":{"$date":"2021-02-19T17:53:20.916 +00:00"},"s":"I", "c":"COMMAND", "id":518070, "ctx":"conn1","msg":"CMD: drop","attr" :{"namespace":"users.temp"}} {"t":{"$date":"2021-02-19T17:53:20.916+00:00"},"s":"I", " c":"STORAGE", "id":23879, "ctx":"conn1","msg":"即将中止所有索引构建器","attr":{"namespace":"users.temp"," uuid":{"uuid":{"$uuid":"118968ba-6555-4e6e-a0c7-45b0ff596516"}},"原因":"集合 users.temp(118968ba-6555-4e6e-a0c7-45b0ff596516) 被丢弃"}} {"t":{"$date":"2021-02-19T17:53:20.916+00:00 "},"s":"I", "c":"STORAGE", "id":20318, "ctx":"conn1","msg":"完成收集丢弃","attr":{"命名空间":"users.temp","uuid":{"uuid":{"$uuid":"118968ba-6555-4e6e-a0c7-45b0ff596516"}}}}完成收集 drop","attr":{"namespace":"users.temp","uuid":{"uuid":{"$uuid":"118968ba-6555-4e6e-a0c7-45b0ff596516"}}}}完成收集 drop","attr":{"namespace":"users.temp","uuid":{"uuid":{"$uuid":"118968ba-6555-4e6e-a0c7-45b0ff596516"}}}}

标签: mongodbdockerrobo3t

解决方案


只需尝试在用户集合中插入一些东西。之后重新启动 Robo3T。即使在 mongo cli 中,您也可以使用use users命令创建而无需在集合中插入您无法看到的内容。


推荐阅读