Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MongoDB error on mongos: too many positional options

Tags:

mongodb

I am trying to run a batch script which is suppose to be my first ever sharding on mongodb. It shows following error in this line:

D:\mongodb-win32-x86_64-2.2.3\bin>mongos --configdb localhost:26050, localhost:26051, localhost:26052  --logappend --logpath log.mongos0

error command line: too many positional options
use --help for help
like image 398
sadaf2605 Avatar asked Dec 29 '25 18:12

sadaf2605


1 Answers

The "too many positional operators" error means you have a mismatch in the number of command line parameters and values provided.

Specifically, the spaces between names of config servers are being interpreted as different (unknown) parameters.

Corrected command line:

mongos --configdb localhost:26050,localhost:26051,localhost:26052 --logappend --logpath log.mongos0
like image 80
Stennie Avatar answered Jan 01 '26 10:01

Stennie



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!