I have installed MongoDB using http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/ in my Ubuntu machine and the mongo instance is working fine.
I am able to do CRUD operations in the instance. I also installed the MonjaDB eclipse plugin and am able to see all databases/collections/documents in it.
Now, I want to create a sharded cluster in my machine. I am trying to create this way:
cluster = new ShardingTest({"shards" : 3, "chunksize" : 1})
It is giving the following error: Resetting db path '/data/db/test0' Wed Feb 12 15:46:43 Error: boost::filesystem::create_directory: Permission denied: "/data/db/test0" (anon):1
Also, I tried to create shards for existing collection. For this, first I tried to enable sharding in my database ("test")
sh.enableSharding("test") Wed Feb 12 15:48:14 uncaught exception: not connected to a mongos
Can someone please let me know, what might went wrong.
Thanks in advance,
Raghu