Can't drop collection from SyncClusterConnection ??

164 views
Skip to first unread message

Mark Hansen

unread,
Oct 1, 2012, 12:38:41 PM10/1/12
to mongod...@googlegroups.com
I'm getting "write $cmd not supported" when trying to drop a collection.

We've got a replica set with 3 boxes.  I open a shell connection like this:

mongo host1,host2,host3/?replicaSet=fooset

All is good and I'm in the mongo shell like this:

fooset:PRIMARY>

However, when I try to drop a collection that I've been using as temporary storage, I get this:

fooset:PRIMARY> db.tmpOut.drop();
Mon Oct  1 12:37:07 Error: write $cmd not supported in SyncClusterConnection::query for:drop src/mongo/shell/collection.js:155


David Hows

unread,
Oct 1, 2012, 9:58:13 PM10/1/12
to mongod...@googlegroups.com
What version of Mongo are you using?

Mark Hansen

unread,
Oct 4, 2012, 12:15:55 PM10/4/12
to mongod...@googlegroups.com
2.2.0

David Hows

unread,
Oct 5, 2012, 2:14:26 AM10/5/12
to mongod...@googlegroups.com
Hi Mark,

I was able to reproduce your issue but found the behaviour when adding "/?replicaSet=fooset" was not the correct behaviour.

You should be able to connect just with: mongo host1,host2,host3

You should be aware that this does not give you full connection pool functionality and the shell will not automatically try to connect to the current primary.

The mongo shell is designed to be a 1:1 interface.

Where did you get the /?replicaSet=fooset syntax?

Cheers,

David
Reply all
Reply to author
Forward
0 new messages