简体   繁体   中英

What's the purpose of the command in mongodb?

I am new to mongoDB and i have the following query as follows "db.runCommand( { addshard : "sf103", maxSize:100000 } );" Why we are using sf103 If i use this command in my Environment i am Getting following errors>>> db.runCommand( { addshard : "sf103", maxSize:100000 } ); { "ok" : 0, "errmsg" : "couldn't connect to new shard dbconnectionpool: connect failed sf103 : " } >

Here, The Sf103 represents what???? Please help me.......

Advance Thanks, Kumar.

addshard takes the first parameter as "serverhostname[:port]". sf103 is a example host name they specified. What is the mongo host you want to add to the cluster. Please read the doc to understand how to configure the mongo cluster. Mongo sharded cluster config

--Sai

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM