【发布时间】:2021-02-20 02:42:58
【问题描述】:
我在 windows 上的 docker 桌面中从 dockerhub 运行 mongo docker 映像,并使用 Robo 3T 连接到它
在 Robo 3T 中,我正在尝试创建一个新的数据库“用户”,它似乎成功了,但是当我关闭 Robo 3T 时 并再次打开它,我没有看到我创建的数据库。有什么问题? mongo中的日志记录:
{"t":{"$date":"2021-02-19T17:52:51.503+00:00"},"s":"I", "c":"CONTROL", "id" :23285, "ctx":"main","msg":"自动禁用 TLS 1.0,强制启用 TLS 1.0 指定 --sslDisabledProtocols 'none'"} {"t":{"$date":"2021-02-19T17:52:51.507+00:00"},"s":"W", "c":"ASIO", "id":22601, "ctx":"main","msg":"NetworkInterface 启动期间未配置 TransportLayer"} {"t":{"$date":"2021-02-19T17:52:51.508+00:00"},"s":"I", "c":"NETWORK", "id":4648601, "ctx":"main","msg":"Implicit 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":{"buildInfo":{"version":"4.4.2","gitVersion":"15e73dc5738d2278b688f8929aee605fe4279b0e","openSSLVersion":" OpenSSL 1.1.1 2018 年 9 月 11 日","modules":[],"allocator":"tcmalloc","environment":{"distmod":"ubuntu1804","distarch":"x86_64","target_arch":" x86_64"}}}} {"t":{"$date":"2021-02-19T17:52:51.509+00:00"},"s":"I", "c":"CONTROL", "id":51765, "ctx":"initandlisten","msg":"操作系统","attr":{"os":{"name":"Ubuntu","version":"18.04"}}} {"t":{"$date":"2021-02-19T17:52:51.509+00:00"},"s":"I", "c":"CONTROL", "id":21951, "ctx":"initandlisten","msg":"命令行设置的选项","attr":{"options":{"net":{"bindIp":"*"},"security":{"授权":"启用"}}}} {"t":{"$date":"2021-02-19T17:52:51.512+00:00"},"s":"W", "c":"STORAGE", "id":22271, "ctx":"initandlisten","msg":"检测到非正常关机 - 锁定文件不为空","attr":{"lockFile":"/data/db/mongod.lock"}} {"t":{"$date":"2021-02-19T17:52:51.513+00:00"},"s":"I", "c":"STORAGE", "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 存储引擎。见http://dochub.mongodb.org/core/prodnotes-filesystem","tags":["startupWarnings"]} {"t":{"$date":"2021-02-19T17:52:51.514+00:00"},"s":"I", "c":"STORAGE", "id":22315, "ctx":"initandlisten","msg":"打开 WiredTiger","attr":{"config":"create,cache_size=5809M,session_max=33000,eviction=(threads_min=4,threads_max=4),config_base =false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000,close_scan_interval=10,close_handle_minimum=250),statistics_log=(wait= 0),verbose=[recovery_progress,checkpoint_progress,compact_progress],"}} {"t":{"$date":"2021-02-19T17:52:52.294+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1613757172:294724][1:0x7fdada605ac0], txn-recover: [WT_VERB_RECOVERY_PROGRESS] 正在恢复日志 2 到 3 "}} {"t":{"$date":"2021-02-19T17:52:52.385+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1613757172:385096][1:0x7fdada605ac0], txn-recover: [WT_VERB_RECOVERY_PROGRESS] 正在恢复日志 3 到 3 "}} {"t":{"$date":"2021-02-19T17:52:52.517+00:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","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":"STORAGE", "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":{"recoveryTimestamp":{"$timestamp":{"t":0,"i":0}}}} {"t":{"$date":"2021-02-19T17:52:52.759+00:00"},"s":"I", "c":"STORAGE", "id":4366408, "ctx":"initandlisten","msg":"现有 WiredTiger 表不需要修改表日志记录设置","attr":{"loggingEnabled":true}} {"t":{"$date":"2021-02-19T17:52:52.761+00:00"},"s":"I", "c":"STORAGE", "id":22262, "ctx":"initandlisten","msg":"时间戳监视器启动"} {"t":{"$date":"2021-02-19T17:52:52.781+00:00"},"s":"W", "c":"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":{"dataDirectory":"/data/db/diagnostic.data"}} {"t":{"$date":"2021-02-19T17:52:52.798+00:00"},"s":"I", "c":"NETWORK", "id":23015, "ctx":"listener","msg":"正在监听","attr":{"address":"/tmp/mongodb-27017.sock"}} {"t":{"$date":"2021-02-19T17:52:52.799+00:00"},"s":"I", "c":"NETWORK", "id":23015, "ctx":"listener","msg":"正在监听","attr":{"address":"0.0.0.0"}} {"t":{"$date":"2021-02-19T17:52:52.799+00:00"},"s":"I", "c":"NETWORK", "id":23016, "ctx":"listener","msg":"等待连接","attr":{"port":27017,"ssl":"off"}} {"t":{"$date":"2021-02-19T17:52:53.076+00:00"},"s":"I", "c":"FTDC", "id":20631, "ctx":"ftdc","msg":"检测到不干净的全时诊断数据捕获关闭,找到临时文件,某些指标可能已经丢失","attr":{"error":{"code":0 ,"codeName":"OK"}}} {"t":{"$date":"2021-02-19T17:53:11.713+00:00"},"s":"I", "c":"NETWORK", "id":22943, "ctx":"listener","msg":"已接受连接","attr":{"remote":"172.17.0.1:57648","connectionId":1,"connectionCount":1}} {"t":{"$date":"2021-02-19T17:53:11.716+00:00"},"s":"I", "c":"NETWORK", "id":51800, "ctx":"conn1","msg":"client metadata","attr":{"remote":"172.17.0.1:57648","client":"conn1","doc":{"application" :{"name":"robo3t-1.4.2"},"driver":{"name":"MongoDB Internal Client","version":"4.2.6-17-g6bce88c"},"os":{ "type":"Windows","name":"Microsoft Windows 8","architecture":"x86_64","version":"6.2 (build 9200)"}}}} {"t":{"$date":"2021-02-19T17:53:11.739+00:00"},"s":"I", "c":"ACCESS", "id":20250, "ctx":"conn1","msg":"认证成功","attr":{"mechanism":"SCRAM-SHA-1","principalName":"admin","authenticationDatabase":"admin", “客户端”:“172.17.0.1:57648”}} {"t":{"$date":"2021-02-19T17:53:11.797+00:00"},"s":"I", "c":"NETWORK", "id":22943, "ctx":"listener","msg":"已接受连接","attr":{"remote":"172.17.0.1:57652","connectionId":2,"connectionCount":2}} {"t":{"$date":"2021-02-19T17:53:11.807+00:00"},"s":"I", "c":"NETWORK", "id":51800, "ctx":"conn2","msg":"client metadata","attr":{"remote":"172.17.0.1:57652","client":"conn2","doc":{"application" :{"name":"MongoDB Shell"},"driver":{"name":"MongoDB Internal Client","version":"4.2.6-17-g6bce88c"},"os":{"type" :"Windows","name":"Microsoft Windows 8","architecture":"x86_64","version":"6.2 (build 9200)"}}}} {"t":{"$date":"2021-02-19T17:53:11.847+00:00"},"s":"I", "c":"ACCESS", "id":20250, "ctx":"conn2","msg":"认证成功","attr":{"mechanism":"SCRAM-SHA-256","principalName":"admin","authenticationDatabase":"admin", “客户端”:“172.17.0.1:57652”}} {"t":{"$date":"2021-02-19T17:53:20.836+00:00"},"s":"I", "c":"STORAGE", "id":20320, "ctx":"conn1","msg":"createCollection","attr":{"namespace":"users.temp","uuidDisposition":"generated","uuid":{"uuid":{" $uuid":"118968ba-6555-4e6e-a0c7-45b0ff596516"}},"options":{}}} {"t":{"$date":"2021-02-19T17:53:20.913+00:00"},"s":"I", "c":"INDEX", "id":20345, "ctx":"conn1","msg":"索引构建:完成构建","attr":{"buildUUID":null,"namespace":"users.temp","index":"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"}},"reason":"收集 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":{"namespace":"users.temp","uuid":{"uuid":{"$uuid":"118968ba -6555-4e6e-a0c7-45b0ff596516"}}}}
【问题讨论】: