noopur.gupta@M-NQJY3C9YVN 84628 % m 6.0.11 Activating: MongoDB Server 6.0.11, MongoDB Database Tools 100.8.0 Installation to /Users/noopur.gupta/.local/bin complete! NOTE: the legacy mongo shell is not included in MongoDB 6.0+ distributions Download the new MongoDB Shell (mongosh): https://www.mongodb.com/try/download/shell noopur.gupta@M-NQJY3C9YVN 84628 % mlaunch init --replicaset --sharded 1 Detected mongod version: 6.0.11 launching: "mongod" on port 27018 launching: "mongod" on port 27019 launching: "mongod" on port 27020 launching: config server on port 27021 replica set 'configRepl' initialized. replica set 'shard01' initialized. launching: mongos on port 27017 adding shards. can take up to 30 seconds... noopur.gupta@M-NQJY3C9YVN 84628 % mongosh --port 27018 Current Mongosh Log ID: 659f1883379893e95e7654e4 Connecting to: mongodb://127.0.0.1:27018/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.1.1 Using MongoDB: 6.0.11 Using Mongosh: 2.1.1 For mongosh info see: https://docs.mongodb.com/mongodb-shell/ ------ The server generated these startup warnings when booting 2024-01-10T14:21:01.082-08:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted 2024-01-10T14:21:01.082-08:00: This server is bound to localhost. Remote systems will be unable to connect to this server. Start the server with --bind_ip
to specify which IP addresses it should serve responses from, or with --bind_ip_all to bind to all interfaces. If this behavior is desired, start the server with --bind_ip 127.0.0.1 to disable this warning 2024-01-10T14:21:01.082-08:00: Soft rlimits for open file descriptors too low ------ Warning: Found ~/.mongorc.js, but not ~/.mongoshrc.js. ~/.mongorc.js will not be loaded. You may want to copy or rename ~/.mongorc.js to ~/.mongoshrc.js. noopur.gupta@M-NQJY3C9YVN 84628 % mongosh Current Mongosh Log ID: 659f18e8bbf8421e9813c3f8 Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.1.1 Using MongoDB: 6.0.11 Using Mongosh: 2.1.1 For mongosh info see: https://docs.mongodb.com/mongodb-shell/ ------ The server generated these startup warnings when booting 2024-01-10T14:21:05.128-08:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted 2024-01-10T14:21:05.128-08:00: This server is bound to localhost. Remote systems will be unable to connect to this server. Start the server with --bind_ip to specify which IP addresses it should serve responses from, or with --bind_ip_all to bind to all interfaces. If this behavior is desired, start the server with --bind_ip 127.0.0.1 to disable this warning ------ Warning: Found ~/.mongorc.js, but not ~/.mongoshrc.js. ~/.mongorc.js will not be loaded. You may want to copy or rename ~/.mongorc.js to ~/.mongoshrc.js. [direct: mongos] test> db.adminCommand({ "setDefaultRWConcern": 1, "defaultWriteConcern": { "w": 2 } }) { defaultReadConcern: { level: 'local' }, defaultWriteConcern: { w: 2, wtimeout: 0 }, updateOpTime: Timestamp({ t: 1704925422, i: 1 }), updateWallClockTime: ISODate('2024-01-10T22:23:42.825Z'), defaultWriteConcernSource: 'global', defaultReadConcernSource: 'implicit', localUpdateWallClockTime: ISODate('2024-01-10T22:23:42.845Z'), ok: 1, '$clusterTime': { clusterTime: Timestamp({ t: 1704925422, i: 3 }), signature: { hash: Binary.createFromBase64('AAAAAAAAAAAAAAAAAAAAAAAAAAA=', 0), keyId: Long('0') } }, operationTime: Timestamp({ t: 1704925422, i: 3 }) } [direct: mongos] test> db.getSiblingDB("config").settings.find({_id: "ReadWriteConcernDefaults"}) [ { _id: 'ReadWriteConcernDefaults', defaultWriteConcern: { w: 2, wtimeout: 0 }, updateOpTime: Timestamp({ t: 1704925422, i: 1 }), updateWallClockTime: ISODate('2024-01-10T22:23:42.825Z') } ] [direct: mongos] test> noopur.gupta@M-NQJY3C9YVN 84628 % mlaunch stop --dir data Detected mongod version: 6.0.11 sent signal 15 to 0 processes. noopur.gupta@M-NQJY3C9YVN 84628 % clear noopur.gupta@M-NQJY3C9YVN 84628 % mlaunch kill all Detected mongod version: 6.0.11 sent signal 15 to 0 processes. noopur.gupta@M-NQJY3C9YVN 84628 % m 7.0.4 Activating: MongoDB Server 7.0.4, MongoDB Database Tools 100.8.0 Installation to /Users/noopur.gupta/.local/bin complete! NOTE: the legacy mongo shell is not included in MongoDB 6.0+ distributions Download the new MongoDB Shell (mongosh): https://www.mongodb.com/try/download/shell noopur.gupta@M-NQJY3C9YVN 84628 % mlaunch start Detected mongod version: 7.0.4 launching: config server on port 27021 launching: "mongod" on port 27018 launching: "mongod" on port 27019 launching: "mongod" on port 27020 launching: mongos on port 27017 noopur.gupta@M-NQJY3C9YVN 84628 % mongosh Current Mongosh Log ID: 659f19b8fca28235821f19bf Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.1.1 Using MongoDB: 7.0.4 Using Mongosh: 2.1.1 For mongosh info see: https://docs.mongodb.com/mongodb-shell/ ------ The server generated these startup warnings when booting 2024-01-10T14:26:59.625-08:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted 2024-01-10T14:26:59.625-08:00: This server is bound to localhost. Remote systems will be unable to connect to this server. Start the server with --bind_ip to specify which IP addresses it should serve responses from, or with --bind_ip_all to bind to all interfaces. If this behavior is desired, start the server with --bind_ip 127.0.0.1 to disable this warning ------ Warning: Found ~/.mongorc.js, but not ~/.mongoshrc.js. ~/.mongorc.js will not be loaded. You may want to copy or rename ~/.mongorc.js to ~/.mongoshrc.js. [direct: mongos] test> db.getSiblingDB("config").settings.find({_id: "ReadWriteConcernDefaults"}) [ { _id: 'ReadWriteConcernDefaults', defaultWriteConcern: { w: 2, wtimeout: 0 }, updateOpTime: Timestamp({ t: 1704925422, i: 1 }), updateWallClockTime: ISODate('2024-01-10T22:23:42.825Z') } ] noopur.gupta@M-NQJY3C9YVN 84628 % mongosh --port 27021 Current Mongosh Log ID: 659f1a352051b21c66303c7a Connecting to: mongodb://127.0.0.1:27021/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.1.1 Using MongoDB: 7.0.4 Using Mongosh: 2.1.1 For mongosh info see: https://docs.mongodb.com/mongodb-shell/ ------ The server generated these startup warnings when booting 2024-01-10T14:26:56.522-08:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted 2024-01-10T14:26:56.522-08:00: This server is bound to localhost. Remote systems will be unable to connect to this server. Start the server with --bind_ip to specify which IP addresses it should serve responses from, or with --bind_ip_all to bind to all interfaces. If this behavior is desired, start the server with --bind_ip 127.0.0.1 to disable this warning 2024-01-10T14:26:56.522-08:00: Soft rlimits for open file descriptors too low 2024-01-10T14:26:56.536-08:00: This node is running as a shard server, but persisted Read/Write Concern (RWC) defaults are present. This node was likely previously in an unsharded replica set or a config server. The RWC defaults on this node will not be used ------ Warning: Found ~/.mongorc.js, but not ~/.mongoshrc.js. ~/.mongorc.js will not be loaded. You may want to copy or rename ~/.mongorc.js to ~/.mongoshrc.js. configRepl [direct: primary] test> db.getSiblingDB("config").settings.find({_id: "ReadWriteConcernDefaults"}) [ { _id: 'ReadWriteConcernDefaults', defaultWriteConcern: { w: 2, wtimeout: 0 }, updateOpTime: Timestamp({ t: 1704925422, i: 1 }), updateWallClockTime: ISODate('2024-01-10T22:23:42.825Z') } ] configRepl [direct: primary] test> db.serverCmdLineOpts().parsed.sharding { clusterRole: 'configsvr' } configRepl [direct: primary] test> exit noopur.gupta@M-NQJY3C9YVN 84628 % mongosh --port 27019 Current Mongosh Log ID: 659f1a74a43db438f4c8b1c3 Connecting to: mongodb://127.0.0.1:27019/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.1.1 Using MongoDB: 7.0.4 Using Mongosh: 2.1.1 For mongosh info see: https://docs.mongodb.com/mongodb-shell/ ------ The server generated these startup warnings when booting 2024-01-10T14:26:58.474-08:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted 2024-01-10T14:26:58.474-08:00: This server is bound to localhost. Remote systems will be unable to connect to this server. Start the server with --bind_ip to specify which IP addresses it should serve responses from, or with --bind_ip_all to bind to all interfaces. If this behavior is desired, start the server with --bind_ip 127.0.0.1 to disable this warning 2024-01-10T14:26:58.474-08:00: Soft rlimits for open file descriptors too low ------ Warning: Found ~/.mongorc.js, but not ~/.mongoshrc.js. ~/.mongorc.js will not be loaded. You may want to copy or rename ~/.mongorc.js to ~/.mongoshrc.js. shard01 [direct: secondary] test> db.serverCmdLineOpts().parsed.sharding { clusterRole: 'shardsvr' } shard01 [direct: secondary] test>