Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Moped::Errors::OperationFailure failed with error "no such cmd

I recently upgraded from mongoid 2.0.2 to mongoid 3 with rails 3.2.12 and ruby 1.9.3 .

Following issue comes when save command excutes => @new_node.save


  Moped::Errors::OperationFailure (The operation: #<Moped::Protocol::Command
      @length=366
      @request_id=30
      @response_to=0
      @op_code=2004
      @flags=[:slave_ok]
      @full_collection_name="campus_dev.$cmd"
      @skip=0
      @limit=-1
      @selector={:aggregate=>"nodes", :pipeline=>[{"$match"=>{"parent_id"=>"51382df8851d1912b7000009", "_id"=>{"$ne"=>"513f24952f1feda4bc000002"}, "position"=>{"$nin"=>[nil]}}}, {"$group"=>{"_id"=>"position", "count"=>{"$sum"=>1}, "max"=>{"$max"=>"$position"}, "min"=>{"$min"=>"$position"}, "sum"=>{"$sum"=>"$position"}, "avg"=>{"$avg"=>"$position"}}}]}
      @fields=nil>
    failed with error "no such cmd"):
      app/controllers/nodes_controller.rb:37:in `create'
like image 916
Muhammad Usman Chaudhary Avatar asked Mar 12 '13 14:03

Muhammad Usman Chaudhary


People also ask

What is failed (remote command not allowed) error?

What is FAILED (remote: Command not allowed) Error? It seems that one of the most common reasons behind such an issue is that you’re flashing a file to an incorrect partition. So, this can basically cause issues with the system partition such as the A/B slot partition. To be very specific, there is no recovery partition in the A/B partition.

How to fix DISM failed no operation was performed?

DISM failed no operation was performed: in the cases mentioned above, both users said their DISM failed and no operation was performed. You’re indeed able to fix this by using Windows 10 ISO file.

How to fix DISM Exe failed validating command line?

You should try. DISM.exe failed validating command line, to load wim manager: if you are in face of such problems, you should try to fix it by restarting the Windows update components, as many people said this method is helpful. Error Code 2, 3, 11, 50, 87, 112, 1393, 1726, 1910, and so on.

How to fix “source files could not be found” error?

It’s necessary to check the location of install.wim file when you receive the source files could not be found error. Under the circumstances, you need the help of a bootable disk (or at least an ISO file of the system). Warning: The DISM command is case sensitive; you must confirm that your spell every word correctly before executing the command.


1 Answers

You didn't mention also upgrading MongoDB version to the latest (at that time).

If you were pointing at an older MongoDB server that didn't recognize the "aggregate" command, then you would get exactly this error.

All instances of similar errors seem to have been pointing at older mongod process.

like image 57
Asya Kamsky Avatar answered Sep 17 '22 18:09

Asya Kamsky