{"action":"created","issue":{"url":"https://api.github.com/repos/go-mgo/mgo/issues/188","labels_url":"https://api.github.com/repos/go-mgo/mgo/issues/188/labels{/name}","comments_url":"https://api.github.com/repos/go-mgo/mgo/issues/188/comments","events_url":"https://api.github.com/repos/go-mgo/mgo/issues/188/events","html_url":"https://github.com/go-mgo/mgo/issues/188","id":118312608,"number":188,"title":"how i connect mongodb","user":{"login":"guojun1992","id":6902686,"avatar_url":"https://avatars.githubusercontent.com/u/6902686?v=3","gravatar_id":"","url":"https://api.github.com/users/guojun1992","html_url":"https://github.com/guojun1992","followers_url":"https://api.github.com/users/guojun1992/followers","following_url":"https://api.github.com/users/guojun1992/following{/other_user}","gists_url":"https://api.github.com/users/guojun1992/gists{/gist_id}","starred_url":"https://api.github.com/users/guojun1992/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guojun1992/subscriptions","organizations_url":"https://api.github.com/users/guojun1992/orgs","repos_url":"https://api.github.com/users/guojun1992/repos","events_url":"https://api.github.com/users/guojun1992/events{/privacy}","received_events_url":"https://api.github.com/users/guojun1992/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-11-23T03:17:41Z","updated_at":"2015-11-23T11:19:18Z","closed_at":null,"body":"hi,I used mgo recently,\r\nthe command I can connect mongo server\r\n\r\nmongo --port 6879 -uadmin  -pOshrawdOs2 admin\r\nMongoDB shell version: 3.0.7\r\nconnecting to: 127.0.0.1:6879/admin\r\n\r\nI wrote in golang \r\nsession, err := mgo.DialWithTimeout(\"mongodb://admin:OshrawdOs2@localhost:6879/admin\", time.Duration(this.timeout)*time.Millisecond)\r\n\r\nbut I can not conncect mongo ,how can I do?\r\n\r\nthanks\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/go-mgo/mgo/issues/comments/158907950","html_url":"https://github.com/go-mgo/mgo/issues/188#issuecomment-158907950","issue_url":"https://api.github.com/repos/go-mgo/mgo/issues/188","id":158907950,"user":{"login":"guojun1992","id":6902686,"avatar_url":"https://avatars.githubusercontent.com/u/6902686?v=3","gravatar_id":"","url":"https://api.github.com/users/guojun1992","html_url":"https://github.com/guojun1992","followers_url":"https://api.github.com/users/guojun1992/followers","following_url":"https://api.github.com/users/guojun1992/following{/other_user}","gists_url":"https://api.github.com/users/guojun1992/gists{/gist_id}","starred_url":"https://api.github.com/users/guojun1992/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guojun1992/subscriptions","organizations_url":"https://api.github.com/users/guojun1992/orgs","repos_url":"https://api.github.com/users/guojun1992/repos","events_url":"https://api.github.com/users/guojun1992/events{/privacy}","received_events_url":"https://api.github.com/users/guojun1992/received_events","type":"User","site_admin":false},"created_at":"2015-11-23T11:19:18Z","updated_at":"2015-11-23T11:19:18Z","body":"hi,I am wrong,I think you need golang server log\r\n\r\n\r\n2015-11-23T11:53:30.241+0800 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:19591 #27 (1 connection now open)\r\n2015-11-23T11:53:30.242+0800 I ACCESS   [conn27]  authenticate db: admin { authenticate: 1, nonce: \"xxx\", user: \"admin\", key: \"xxx\" }\r\n2015-11-23T11:53:30.242+0800 I ACCESS   [conn27] Failed to authenticate admin@admin with mechanism MONGODB-CR: AuthenticationFailed MONGODB-CR credentials missing in the user document\r\n2015-11-23T11:53:30.243+0800 I NETWORK  [conn27] end connection 127.0.0.1:19591 (0 connections now open)\r\n2015-11-23T11:54:06.154+0800 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:19592 #28 (1 connection now open)\r\n2015-11-23T11:54:06.155+0800 I ACCESS   [conn28]  authenticate db: admin { authenticate: 1, nonce: \"xxx\", user: \"admin\", key: \"xxx\" }\r\n2015-11-23T11:54:06.155+0800 I ACCESS   [conn28] Failed to authenticate admin@admin with mechanism MONGODB-CR: AuthenticationFailed MONGODB-CR credentials missing in the user document\r\n2015-11-23T11:54:06.156+0800 I NETWORK  [conn28] end connection 127.0.0.1:19592 (0 connections now open)\r\n2015-11-23T11:55:08.889+0800 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:19595 #29 (1 connection now open)\r\n2015-11-23T11:55:08.890+0800 I ACCESS   [conn29]  authenticate db: admin { authenticate: 1, nonce: \"xxx\", user: \"admin\", key: \"xxx\" }\r\n2015-11-23T11:55:08.890+0800 I ACCESS   [conn29] Failed to authenticate admin@admin with mechanism MONGODB-CR: AuthenticationFailed MONGODB-CR credentials missing in the user document\r\n2015-11-23T11:55:08.891+0800 I NETWORK  [conn29] end connection 127.0.0.1:19595 (0 connections now open)\r\n2015-11-23T12:11:30.840+0800 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:19618 #30 (1 connection now open)\r\n2015-11-23T12:11:30.859+0800 I ACCESS   [conn30] Successfully authenticated as principal admin on admin\r\n2015-11-23T12:11:30.860+0800 I ACCESS   [conn30] Unauthorized not authorized on admin to execute command { getLog: \"startupWarnings\" }\r\n2015-11-23T12:11:30.860+0800 I ACCESS   [conn30] Unauthorized not authorized on admin to execute command { replSetGetStatus: 1.0, forShell: 1.0 }\r\n2015-11-23T12:11:38.811+0800 I NETWORK  [conn30] end connection 127.0.0.1:19618 (0 connections now open)\r\n2015-11-23T12:30:54.399+0800 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:19644 #31 (1 connection now open)\r\n2015-11-23T12:30:54.418+0800 I ACCESS   [conn31] Successfully authenticated as principal admin on admin\r\n2015-11-23T12:30:54.419+0800 I ACCESS   [conn31] Unauthorized not authorized on admin to execute command { getLog: \"startupWarnings\" }\r\n2015-11-23T12:30:54.419+0800 I ACCESS   [conn31] Unauthorized not authorized on admin to execute command { replSetGetStatus: 1.0, forShell: 1.0 }\r\n2015-11-23T12:30:57.756+0800 I NETWORK  [conn31] end connection 127.0.0.1:19644 (0 connections now open)\r\n2015-11-23T13:06:43.407+0800 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:19689 #32 (1 connection now open)\r\n2015-11-23T13:06:43.425+0800 I ACCESS   [conn32] Successfully authenticated as principal admin on admin\r\n2015-11-23T13:06:43.426+0800 I ACCESS   [conn32] Unauthorized not authorized on admin to execute command { getLog: \"startupWarnings\" }\r\n2015-11-23T13:06:43.427+0800 I ACCESS   [conn32] Unauthorized not authorized on admin to execute command { replSetGetStatus: 1.0, forShell: 1.0 }\r\n2015-11-23T13:06:44.587+0800 I NETWORK  [conn32] end connection 127.0.0.1:19689 (0 connections now open)\r\n2015-11-23T13:58:12.488+0800 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:19754 #33 (1 connection now open)\r\n2015-11-23T13:58:12.507+0800 I ACCESS   [conn33] Successfully authenticated as principal admin on admin\r\n2015-11-23T13:58:12.508+0800 I ACCESS   [conn33] Unauthorized not authorized on admin to execute command { getLog: \"startupWarnings\" }\r\n2015-11-23T13:58:12.509+0800 I ACCESS   [conn33] Unauthorized not authorized on admin to execute command { replSetGetStatus: 1.0, forShell: 1.0 }\r\n2015-11-23T13:58:14.420+0800 I NETWORK  [conn33] end connection 127.0.0.1:19754 (0 connections now open)\r\n2015-11-23T17:43:42.715+0800 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:20073 #34 (1 connection now open)\r\n2015-11-23T17:43:42.716+0800 I ACCESS   [conn34]  authenticate db: admin { authenticate: 1, nonce: \"xxx\", user: \"admin\", key: \"xxx\" }\r\n2015-11-23T17:43:42.716+0800 I ACCESS   [conn34] Failed to authenticate admin@admin with mechanism MONGODB-CR: AuthenticationFailed MONGODB-CR credentials missing in the user document\r\n2015-11-23T17:43:42.718+0800 I NETWORK  [conn34] end connection 127.0.0.1:20073 (0 connections now open)\r\n2015-11-23T18:54:24.012+0800 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:20288 #35 (1 connection now open)\r\n2015-11-23T18:54:24.013+0800 I ACCESS   [conn35]  authenticate db: admin { authenticate: 1, nonce: \"xxx\", user: \"admin\", key: \"xxx\" }\r\n2015-11-23T18:54:24.013+0800 I ACCESS   [conn35] Failed to authenticate admin@admin with mechanism MONGODB-CR: AuthenticationFailed MONGODB-CR credentials missing in the user document\r\n2015-11-23T18:54:24.015+0800 I NETWORK  [conn35] end connection 127.0.0.1:20288 (0 connections now open)"}}