{"action":"created","issue":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/1323","labels_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/1323/labels{/name}","comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/1323/comments","events_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/1323/events","html_url":"https://github.com/RocketChat/Rocket.Chat/issues/1323","id":114842020,"number":1323,"title":"Mongo db 001-rs:SECONDARY instead of 001-rs:PRIMARY","user":{"login":"phillip-white-sociomantic","id":7766580,"avatar_url":"https://avatars.githubusercontent.com/u/7766580?v=3","gravatar_id":"","url":"https://api.github.com/users/phillip-white-sociomantic","html_url":"https://github.com/phillip-white-sociomantic","followers_url":"https://api.github.com/users/phillip-white-sociomantic/followers","following_url":"https://api.github.com/users/phillip-white-sociomantic/following{/other_user}","gists_url":"https://api.github.com/users/phillip-white-sociomantic/gists{/gist_id}","starred_url":"https://api.github.com/users/phillip-white-sociomantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillip-white-sociomantic/subscriptions","organizations_url":"https://api.github.com/users/phillip-white-sociomantic/orgs","repos_url":"https://api.github.com/users/phillip-white-sociomantic/repos","events_url":"https://api.github.com/users/phillip-white-sociomantic/events{/privacy}","received_events_url":"https://api.github.com/users/phillip-white-sociomantic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-03T15:32:28Z","updated_at":"2015-11-05T14:59:05Z","closed_at":null,"body":"Hi All,\r\n\r\nI have seen a possible issue when trying to initiate mongo: \r\n\r\n```\r\nroot@rchat:~# nano /etc/mongod.conf\r\nroot@rchat:~# service mongod restart\r\nmongod stop/waiting\r\nmongod start/running, process 10436\r\nroot@rchat:~# mongo\r\nMongoDB shell version: 3.0.7\r\nconnecting to: test\r\nServer has startup warnings: \r\n2015-11-03T16:28:23.420+0100 I CONTROL  [initandlisten] \r\n2015-11-03T16:28:23.420+0100 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.\r\n2015-11-03T16:28:23.420+0100 I CONTROL  [initandlisten] **        We suggest setting it to 'never'\r\n2015-11-03T16:28:23.420+0100 I CONTROL  [initandlisten] \r\n2015-11-03T16:28:23.420+0100 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.\r\n2015-11-03T16:28:23.420+0100 I CONTROL  [initandlisten] **        We suggest setting it to 'never'\r\n2015-11-03T16:28:23.420+0100 I CONTROL  [initandlisten] \r\n> rs.initiate()\r\n{\r\n\t\"info2\" : \"no configuration explicitly specified -- making one\",\r\n\t\"me\" : \"rchat:27017\",\r\n\t\"ok\" : 1\r\n}\r\n001-rs:SECONDARY>\r\n```\r\n\r\nI am running Mongodb-org 3.0.7. And this to `/etc/mongod.conf`\r\n\r\n```\r\nreplication:\r\n      replSetName:  \"001-rs\"\r\n``` \r\n\r\nWill i have any issues if i continue the install with 001-rs:SECONDARY? "},"comment":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/comments/154084551","html_url":"https://github.com/RocketChat/Rocket.Chat/issues/1323#issuecomment-154084551","issue_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/1323","id":154084551,"user":{"login":"phillip-white-sociomantic","id":7766580,"avatar_url":"https://avatars.githubusercontent.com/u/7766580?v=3","gravatar_id":"","url":"https://api.github.com/users/phillip-white-sociomantic","html_url":"https://github.com/phillip-white-sociomantic","followers_url":"https://api.github.com/users/phillip-white-sociomantic/followers","following_url":"https://api.github.com/users/phillip-white-sociomantic/following{/other_user}","gists_url":"https://api.github.com/users/phillip-white-sociomantic/gists{/gist_id}","starred_url":"https://api.github.com/users/phillip-white-sociomantic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phillip-white-sociomantic/subscriptions","organizations_url":"https://api.github.com/users/phillip-white-sociomantic/orgs","repos_url":"https://api.github.com/users/phillip-white-sociomantic/repos","events_url":"https://api.github.com/users/phillip-white-sociomantic/events{/privacy}","received_events_url":"https://api.github.com/users/phillip-white-sociomantic/received_events","type":"User","site_admin":false},"created_at":"2015-11-05T14:59:05Z","updated_at":"2015-11-05T14:59:05Z","body":"I managed to get this working by having localhost in mongo DB:\r\n\r\n```\r\nnet:\r\n  port: 27017\r\n  bindIp: localhost\r\n```\r\n\r\nthen, on the mongo command line. run `rs.initiate()` twice. It will be SECONDARY first, then it will be PRIMARY which indicates no errors.\r\n\r\nAfter doing that, `pm2 start pm2-rocket-chat.json` seemed to work fine."}}