I tried doing the replicatset in windows, but im getting the below error. I checked the mongo process and killed the existing process. Even though the error exists.
help me on this pls
Thx
commands executed:
C:\MongoDB\bin>mongo
MongoDB shell version: 2.6.6
connecting to: test>> cfg = {
... _id : "cri",
... members : [
... { _id:0, host:"INline1.corp:27001"},
... { _id:1, host:"INline2.corp:27002"},
... { _id:2, host:"INLN3.corp:27003"}
... ]
... }
{
"_id" : "cri",
"members" : [
{
"_id" : 0,
"host" : "INline1.corp:27001"
},
{
"_id" : 1,
"host" : "INline2.corp:27002"
},
{
"_id" : 2,
"host" : "INLN3.corp:27003"
}
]
}> rs.help()> cfg
{
"_id" : "cri",
"members" : [
{
"_id" : 0,
"host" : "INline1.corp:27001"
},
{
"_id" : 1,
"host" : "INline2.corp:27002"
},
{
"_id" : 2,
"host" : "INLN3.corp:27003"
}
]
}> // rs.initiate(cfg)>> rs.initiate
function (c) { return db._adminCommand({ replSetInitiate: c }); }> rs.initiate( cfg )
{ "ok" : 0, "errmsg" : "server is not running with --replSet" }>>> rs.initiate()
C:\MongoDB\bin>
Error:
2015-02-22T00:48:57.331+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:48:58.331+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:48:59.331+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:00.331+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:01.331+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:02.331+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:03.331+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:04.331+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:05.331+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:06.331+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:07.331+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:08.331+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:09.331+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:10.331+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:11.331+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:12.332+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:13.332+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:14.332+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:15.332+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:16.332+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:17.332+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:18.333+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:19.333+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:20.333+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:21.333+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:22.333+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:23.333+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:24.333+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:25.333+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T00:49:25.916+0530 Ctrl-C signal
2015-02-22T00:49:25.916+0530 [consoleTerminate] got CTRL_C_EVENT, will terminate after current cmd ends
2015-02-22T00:49:25.916+0530 [consoleTerminate] now exiting
2015-02-22T00:49:25.917+0530 [consoleTerminate] dbexit:
2015-02-22T00:49:25.917+0530 [consoleTerminate] shutdown: going to close listening sockets...
2015-02-22T00:49:25.917+0530 [consoleTerminate] closing listening socket: 452
2015-02-22T00:49:25.918+0530 [consoleTerminate] shutdown: going to flush diaglog...
2015-02-22T00:49:25.918+0530 [consoleTerminate] shutdown: going to close sockets...
2015-02-22T00:49:25.918+0530 [consoleTerminate] shutdown: waiting for fs preallocator...
2015-02-22T00:49:25.919+0530 [consoleTerminate] shutdown: lock for final commit...
2015-02-22T00:49:25.919+0530 [consoleTerminate] shutdown: final commit...
2015-02-22T00:49:25.925+0530 [consoleTerminate] shutdown: closing all files...
2015-02-22T00:49:25.926+0530 [consoleTerminate] closeAllFiles() finished
2015-02-22T00:49:25.926+0530 [consoleTerminate] journalCleanup...
2015-02-22T00:49:25.927+0530 [consoleTerminate] removeJournalFiles
2015-02-22T00:49:25.929+0530 [consoleTerminate] shutdown: removing fs lock...
2015-02-22T00:49:25.929+0530 [consoleTerminate] dbexit: really exiting now
C:\MongoDB\bin>mongo
MongoDB shell version: 2.6.6
connecting to: test
2015-02-22T00:52:06.973+0530 warning: Failed to connect to 127.0.0.1:27017, reason: errno:10061 No connection could be made because the target machine actively refused it.
2015-02-22T00:52:06.977+0530 Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146 exception: connect failed
C:\MongoDB\bin>mongod
mongod --help for help and startup options
2015-02-22T00:52:14.995+0530 [initandlisten] MongoDB starting : pid=2668 port=27017 dbpath=\data\db\ 64-bit host=INLN50838607A
2015-02-22T00:52:14.996+0530 [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2015-02-22T00:52:14.996+0530 [initandlisten] db version v2.6.6
2015-02-22T00:52:14.997+0530 [initandlisten] git version: 608e8bc319627693b04cc7da29ecc300a5f45a1f
2015-02-22T00:52:14.997+0530 [initandlisten] build info: windows sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1')BOOST_LIB_VERSION=1_49
2015-02-22T00:52:14.997+0530 [initandlisten] allocator: system
2015-02-22T00:52:14.997+0530 [initandlisten] options: {}
2015-02-22T00:52:15.004+0530 [initandlisten] journal dir=\data\db\journal
2015-02-22T00:52:15.004+0530 [initandlisten] recover : no journal files present, no recovery needed
2015-02-22T00:52:15.210+0530 [initandlisten] waiting for connections on port 27017
2015-02-22T00:53:00.605+0530 [initandlisten] connection accepted from 127.0.0.1:65413 #1 (1 connection now open)
2015-02-22T00:53:15.209+0530 [clientcursormon] mem (MB) res:135 virt:1270
2015-02-22T00:53:15.209+0530 [clientcursormon] mapped (incl journal view):1120
2015-02-22T00:53:15.209+0530 [clientcursormon] connections:1
2015-02-22T00:53:52.268+0530 [conn1] replSet replSetInitiate admin command received from client
2015-02-22T00:54:23.497+0530 [conn1] end connection 127.0.0.1:65413 (0 connections now open)
2015-02-22T00:57:02.580+0530 [initandlisten] connection accepted from 127.0.0.1:65504 #2 (1 connection now open)
2015-02-22T00:57:10.148+0530 [conn2] end connection 127.0.0.1:65504 (0 connections now open)
2015-02-22T00:58:15.227+0530 [clientcursormon] mem (MB) res:135 virt:1266
2015-02-22T00:58:15.227+0530 [clientcursormon] mapped (incl journal view):1120
2015-02-22T00:58:15.227+0530 [clientcursormon] connections:0
2015-02-22T00:58:51.650+0530 [initandlisten] connection accepted from 127.0.0.1:49203 #3 (1 connection now open)
2015-02-22T00:58:59.370+0530 [conn3] replSet replSetInitiate admin command received from client
2015-02-22T01:03:15.246+0530 [clientcursormon] mem (MB) res:135 virt:1267
2015-02-22T01:03:15.246+0530 [clientcursormon] mapped (incl journal view):1120
2015-02-22T01:03:15.246+0530 [clientcursormon] connections:1
2015-02-22T01:04:56.891+0530 [conn3] end connection 127.0.0.1:49203 (0 connections now open)
2015-02-22T01:05:26.677+0530 [initandlisten] connection accepted from 127.0.0.1:49531 #4 (1 connection now open)
2015-02-22T01:08:15.266+0530 [clientcursormon] mem (MB) res:135 virt:1267
2015-02-22T01:08:15.266+0530 [clientcursormon] mapped (incl journal view):1120
2015-02-22T01:08:15.266+0530 [clientcursormon] connections:1
2015-02-22T01:13:15.321+0530 [clientcursormon] mem (MB) res:135 virt:1267
2015-02-22T01:13:15.321+0530 [clientcursormon] mapped (incl journal view):1120
2015-02-22T01:13:15.321+0530 [clientcursormon] connections:1
2015-02-22T01:13:28.501+0530 [conn4] replSet replSetInitiate admin command received from client
2015-02-22T01:17:09.207+0530 Ctrl-C signal
2015-02-22T01:17:09.207+0530 [consoleTerminate] got CTRL_C_EVENT, will terminate after current cmd ends
2015-02-22T01:17:09.208+0530 [consoleTerminate] now exiting
2015-02-22T01:17:09.208+0530 [consoleTerminate] dbexit:
2015-02-22T01:17:09.208+0530 [consoleTerminate] shutdown: going to close listening sockets...
2015-02-22T01:17:09.208+0530 [consoleTerminate] closing listening socket: 476
2015-02-22T01:17:09.209+0530 [consoleTerminate] shutdown: going to flush diaglog...
2015-02-22T01:17:09.209+0530 [consoleTerminate] shutdown: going to close sockets...
2015-02-22T01:17:09.209+0530 [consoleTerminate] shutdown: waiting for fs preallocator...
2015-02-22T01:17:09.209+0530 [consoleTerminate] shutdown: lock for final commit...
2015-02-22T01:17:09.210+0530 [consoleTerminate] shutdown: final commit...
2015-02-22T01:17:09.210+0530 [conn4] end connection 127.0.0.1:49531 (0 connections now open)
2015-02-22T01:17:09.218+0530 [consoleTerminate] shutdown: closing all files...
2015-02-22T01:17:09.234+0530 [consoleTerminate] closeAllFiles() finished
2015-02-22T01:17:09.234+0530 [consoleTerminate] journalCleanup...
2015-02-22T01:17:09.234+0530 [consoleTerminate] removeJournalFiles
2015-02-22T01:17:09.251+0530 [consoleTerminate] shutdown: removing fs lock...
2015-02-22T01:17:09.251+0530 [consoleTerminate] dbexit: really exiting now
C:\MongoDB\bin>
C:\MongoDB\bin>
C:\MongoDB\bin>mongod --port 27001 --dbpath c:\data\aneesh1 --replSet cri
2015-02-22T01:18:11.597+0530 [initandlisten] MongoDB starting : pid=9936 port=27001 dbpath=c:\data\aneesh1 64-bit host=INLN50838607A
2015-02-22T01:18:11.598+0530 [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2015-02-22T01:18:11.598+0530 [initandlisten] db version v2.6.6
2015-02-22T01:18:11.599+0530 [initandlisten] git version: 608e8bc319627693b04cc7da29ecc300a5f45a1f
2015-02-22T01:18:11.599+0530 [initandlisten] build info: windows sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1') BOOST_LIB_VERSION=1_49
2015-02-22T01:18:11.599+0530 [initandlisten] allocator: system
2015-02-22T01:18:11.599+0530 [initandlisten] options: { net: { port: 27001 }, replication: { replSet: "cri" }, storage: { dbPath: "c:\data\aneesh1" } }
2015-02-22T01:18:11.603+0530 [initandlisten] journal dir=c:\data\aneesh1\journal
2015-02-22T01:18:11.603+0530 [initandlisten] recover : no journal files present,no recovery needed
2015-02-22T01:18:11.629+0530 [initandlisten] waiting for connections on port 27001
2015-02-22T01:18:11.634+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T01:18:11.634+0530 [rsStart] replSet info you may need to run replSetInitiate -- rs.initiate() in the shell -- if that is not already done
2015-02-22T01:18:12.634+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T01:18:13.634+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T01:18:14.634+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T01:18:15.634+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T01:18:16.634+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T01:18:17.216+0530 Ctrl-C signal
2015-02-22T01:18:17.217+0530 [consoleTerminate] got CTRL_C_EVENT, will terminate after current cmd ends
2015-02-22T01:18:17.217+0530 [consoleTerminate] now exiting
2015-02-22T01:18:17.218+0530 [consoleTerminate] dbexit:
2015-02-22T01:18:17.218+0530 [consoleTerminate] shutdown: going to close listening sockets...
2015-02-22T01:18:17.218+0530 [consoleTerminate] closing listening socket: 472
2015-02-22T01:18:17.219+0530 [consoleTerminate] shutdown: going to flush diaglog...
2015-02-22T01:18:17.219+0530 [consoleTerminate] shutdown: going to close sockets...
2015-02-22T01:18:17.219+0530 [consoleTerminate] shutdown: waiting for fs preallocator...
2015-02-22T01:18:17.220+0530 [consoleTerminate] shutdown: lock for final commit...
2015-02-22T01:18:17.220+0530 [consoleTerminate] shutdown: final commit...
2015-02-22T01:18:17.229+0530 [consoleTerminate] shutdown: closing all files...
2015-02-22T01:18:17.230+0530 [consoleTerminate] closeAllFiles() finished
2015-02-22T01:18:17.230+0530 [consoleTerminate] journalCleanup...
2015-02-22T01:18:17.230+0530 [consoleTerminate] removeJournalFiles
2015-02-22T01:18:17.232+0530 [consoleTerminate] shutdown: removing fs lock...
2015-02-22T01:18:17.232+0530 [consoleTerminate] dbexit: really exiting now
C:\MongoDB\bin>
C:\MongoDB\bin>mongod --port 27001 --dbpath c:\data\aneesh1 --replSet cri
2015-02-22T01:23:27.978+0530 [initandlisten] MongoDB starting : pid=10800 port=27001 dbpath=c:\data\aneesh1 64-bit host=INLN50838607A
2015-02-22T01:23:27.979+0530 [initandlisten] targetMinOS: Windows 7/Windows Server 2008 R2
2015-02-22T01:23:27.979+0530 [initandlisten] db version v2.6.6
2015-02-22T01:23:27.979+0530 [initandlisten] git version: 608e8bc319627693b04cc7da29ecc300a5f45a1f
2015-02-22T01:23:27.979+0530 [initandlisten] build info: windows sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1')BOOST_LIB_VERSION=1_49
2015-02-22T01:23:27.980+0530 [initandlisten] allocator: system
2015-02-22T01:23:27.980+0530 [initandlisten] options: { net: { port: 27001 }, replication: { replSet: "cri" }, storage: { dbPath: "c:\data\aneesh1" } }
2015-02-22T01:23:27.982+0530 [initandlisten] journal dir=c:\data\aneesh1\journal
2015-02-22T01:23:27.982+0530 [initandlisten] recover : no journal files present, no recovery needed
2015-02-22T01:23:28.009+0530 [initandlisten] waiting for connections on port 27001
2015-02-22T01:23:28.011+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T01:23:28.011+0530 [rsStart] replSet info you may need to run replSetInitiate -- rs.initiate() in the shell -- if that is not already done
2015-02-22T01:23:29.011+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T01:23:30.011+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T01:23:31.011+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T01:23:32.011+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T01:23:33.011+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T01:23:34.011+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T01:23:35.011+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T01:23:36.011+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T01:23:37.011+0530 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG)
2015-02-22T01:23:37.677+0530 Ctrl-C signal
2015-02-22T01:23:37.677+0530 [consoleTerminate] got CTRL_C_EVENT, will terminate after current cmd ends
2015-02-22T01:23:37.678+0530 [consoleTerminate] now exiting
2015-02-22T01:23:37.678+0530 [consoleTerminate] dbexit:
2015-02-22T01:23:37.678+0530 [consoleTerminate] shutdown: going to close listening sockets...
2015-02-22T01:23:37.679+0530 [consoleTerminate] closing listening socket: 476
2015-02-22T01:23:37.679+0530 [consoleTerminate] shutdown: going to flush diaglog...
2015-02-22T01:23:37.679+0530 [consoleTerminate] shutdown: going to close sockets...
2015-02-22T01:23:37.680+0530 [consoleTerminate] shutdown: waiting for fs preallocator...
2015-02-22T01:23:37.680+0530 [consoleTerminate] shutdown: lock for final commit...
2015-02-22T01:23:37.680+0530 [consoleTerminate] shutdown: final commit...
2015-02-22T01:23:37.689+0530 [consoleTerminate] shutdown: closing all files...
2015-02-22T01:23:37.690+0530 [consoleTerminate] closeAllFiles() finished
2015-02-22T01:23:37.690+0530 [consoleTerminate] journalCleanup...
2015-02-22T01:23:37.691+0530 [consoleTerminate] removeJournalFiles
2015-02-22T01:23:37.693+0530 [consoleTerminate] shutdown: removing fs lock...
2015-02-22T01:23:37.693+0530 [consoleTerminate] dbexit: really exiting now
C:\MongoDB\bin>