Harshil Gurha
Harshil Gurha

Reputation: 71

MongoError exception: FieldPath field names may not start with '$'

We just migrated our infrastructure on AWS from one account to another. The mongo version installed on the server is 2.4.9 I am new to MongoDb and faced the following 2 errors when I ran the web app -

{"name":"MongoError","errmsg":"exception: FieldPath field names may not start with '$'.","code":16410,"ok":0}

and

{"name":"MongoError","errmsg":"exception: the $cond operator requires an array of 3 operands","code":16019,"ok":0}

The web app was working on our previous instances. Can anyone point me in the right direction?

Upvotes: 3

Views: 4943

Answers (1)

Harshil Gurha
Harshil Gurha

Reputation: 71

Upgrading to the latest mongodb (3.0.2) helped resolve this issue for me.

P.S. - Make sure you kill the mongod process already running using killall -15 instead of pkill -9 as the latter could cause damage.

Upvotes: 3

Related Questions