亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 4573 | 回復(fù): 3
打印 上一主題 下一主題

[系統(tǒng)管理] mongodb啟動時日志問題 [復(fù)制鏈接]

論壇徽章:
1
2015亞冠之西悉尼流浪者
日期:2015-05-28 16:30:37
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報告]
發(fā)表于 2015-04-02 23:39 |只看該作者 |倒序瀏覽
  1. Thu Apr  2 23:21:24.925 [initandlisten] MongoDB starting : pid=1230 port=27017 dbpath=/data/mongodb slave=1 64
  2. -bit host=benny
  3. Thu Apr  2 23:21:24.926 [initandlisten] db version v2.4.13
  4. Thu Apr  2 23:21:24.926 [initandlisten] git version: de9d77996aab9315400b9f203d0c4826211fc32e
  5. Thu Apr  2 23:21:24.926 [initandlisten] build info: Linux ip-10-181-40-136 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP F
  6. ri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_49
  7. Thu Apr  2 23:21:24.926 [initandlisten] allocator: tcmalloc
  8. Thu Apr  2 23:21:24.926 [initandlisten] options: { auth: "true", bind_ip: "0.0.0.0", config: "/usr/local/mongo
  9. db/conf/mongod.conf", dbpath: "/data/mongodb", fork: "true", journal: "true", logappend: "true", logpath: "/us
  10. r/local/mongodb/log/mongod.log", maxConns: 10000, nohttpinterface: "true", pidfilepath: "/var/run/mongod.pid",
  11. port: 27017, slave: "true", source: "192.168.56.120:27017" }
  12. Thu Apr  2 23:21:24.937 [initandlisten] journal dir=/data/mongodb/journal
  13. Thu Apr  2 23:21:24.938 [initandlisten] recover : no journal files present, no recovery needed
  14. Thu Apr  2 23:21:24.998 [initandlisten] waiting for connections on port 27017
  15. Thu Apr  2 23:21:26.002 [replslave] repl: syncing from host:192.168.56.120:27017
  16. Thu Apr  2 23:21:26.015 [replslave] replHandshake res not: 0 res: { ok: 0.0, errmsg: "unauthorized" }
  17. Thu Apr  2 23:21:27.985 [initandlisten] connection accepted from 127.0.0.1:23528 #1 (1 connection now open)
  18. Thu Apr  2 23:21:27.994 [conn1] command denied: { getLog: "startupWarnings" }
  19. Thu Apr  2 23:21:27.997 [conn1] command denied: { replSetGetStatus: 1.0, forShell: 1.0 }
  20. Thu Apr  2 23:21:40.270 [conn1]  authenticate db: admin { authenticate: 1, nonce: "bd76adb270c8782c", user: "r
  21. oot", key: "9ea4d2913df6a98942887a78e46ba4a6" }
  22. Thu Apr  2 23:23:12.625 [conn1] command admin.$cmd command: { listDatabases: 1.0 } ntoreturn:1 keyUpdates:0 lo
  23. cks(micros) R:11 W:114731 r:129 reslen:235 116ms
  24. Thu Apr  2 23:23:43.773 [replslave] repl:   checkpoint applied 30 operations
  25. Thu Apr  2 23:23:43.773 [replslave] repl:   syncedTo: Apr  2 23:23:33 551d5ef5:1
  26. Thu Apr  2 23:23:47.475 [replslave] CMD: drop thunderGears.test
  27. Thu Apr  2 23:24:11.362 [replslave] build index thunderGears.test { _id: 1 }
  28. Thu Apr  2 23:24:11.364 [replslave] build index done.  scanned 0 total records. 0.001 secs
復(fù)制代碼
mongodb version: 2.4
Thu Apr  2 23:21:26.015 [replslave] replHandshake res not: 0 res: { ok: 0.0, errmsg: "unauthorized" }  這行是提示權(quán)限不足, 可是為何后面的主從復(fù)制又可以成功呢?
我這的情況是local庫都已添加repl賬戶, 并確認(rèn)local庫用戶密碼都一樣, 為何我在不同的情況下簡單的主從復(fù)制, 有的可以成功有的不可以成功呢?

額, 還有個疑問, mongodb如何通過mongo shell指定只同步特定collection呢?  use admin; db.runCommand({"resync": 1}) 這是同步所有庫哦
最后上我用的配置問件, 大神們發(fā)現(xiàn)問題請告訴我哦!
  1. port=27017
  2. dbpath=/data/mongodb
  3. logpath=/usr/local/mongodb/log/mongod.log
  4. logappend=true
  5. pidfilepath=/var/run/mongod.pid
  6. fork=true
  7. maxConns=10000
  8. auth=true
  9. journal=true
  10. bind_ip=0.0.0.0
  11. oplogSize=128
  12. nohttpinterface=true
  13. master=true
  14. slave=true
  15. source=192.168.56.120:27017
  16. #autoresync=true
復(fù)制代碼

論壇徽章:
1
2015亞冠之西悉尼流浪者
日期:2015-05-28 16:30:37
2 [報告]
發(fā)表于 2015-04-02 23:44 |只看該作者
回復(fù) 1# tank064


額, 這是slave的配置文件, 主庫和這個差不多, 可以在配置文件里only=xxx 或是mongod --only xxx指定同步特定庫, mongo shell命令行有該如何操作呢, 可以像mysql那樣手動中斷復(fù)制么?

論壇徽章:
1
2015亞冠之西悉尼流浪者
日期:2015-05-28 16:30:37
3 [報告]
發(fā)表于 2015-04-03 00:47 |只看該作者
  1. Fri Apr  3 00:40:16.392 [replslave] repl: syncing from host:192.168.56.120:27017
  2. Fri Apr  3 00:40:16.404 [replslave] replHandshake res not: 0 res: { ok: 0.0, errmsg: "unauthorized" }
  3. Fri Apr  3 00:40:16.406 [replslave] repl:   nextOpTime Apr  3 00:08:13 551d696d:1 > syncedTo Apr  3 00:08:05 5
  4. 51d6965:1
  5. repl:   time diff: 8sec
  6. repl:   tailing: 0
  7. repl:   data too stale, halting replication
  8. Fri Apr  3 00:40:16.406 [replslave] caught SyncException
  9. Fri Apr  3 00:40:16.406 [replslave] repl: sleep 10 sec before next pass
  10. Fri Apr  3 00:40:21.937 [initandlisten] connection accepted from 127.0.0.1:23537 #1 (1 connection now open)
  11. Fri Apr  3 00:40:21.947 [conn1] command denied: { getLog: "startupWarnings" }
  12. Fri Apr  3 00:40:21.951 [conn1] command denied: { replSetGetStatus: 1.0, forShell: 1.0 }
  13. Fri Apr  3 00:40:26.408 [replslave] auto forcing resync from 192.168.56.120:27017
  14. Fri Apr  3 00:40:26.415 [replslave] replHandshake res not: 0 res: { ok: 0.0, errmsg: "unauthorized" }
  15. Fri Apr  3 00:40:26.417 [replslave] resync: dropping database admin
  16. Fri Apr  3 00:40:26.421 [replslave] removeJournalFiles
  17. Fri Apr  3 00:40:26.455 [replslave] repl: syncing from host:192.168.56.120:27017
復(fù)制代碼
回復(fù) 1# tank064

我在從庫開啟"autoresync=true" , 為啥會導(dǎo)致從庫的admin庫不存在了呢?  這玩意比mysql坑人啊


   

論壇徽章:
1
2015亞冠之西悉尼流浪者
日期:2015-05-28 16:30:37
4 [報告]
發(fā)表于 2015-04-03 10:48 |只看該作者
額, 啟動slave時, 用source指定master IP:PORT  用only指定只定同步哪一個庫, autoresync 開啟自動同步就ok了,,


用在命令行 手動同步經(jīng)驗的大神請留言哦
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP