[SERVER-9830] mongos JS Error in `sh.status()` Created: 31/May/13  Updated: 10/Dec/14  Resolved: 22/Sep/13

Status: Closed
Project: Core Server
Component/s: JavaScript, Sharding, Shell
Affects Version/s: 2.4.3
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Taha Jahangir Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File commands-result.txt     File dump-config.tar.gz    
Issue Links:
Related
is related to SERVER-9775 Remove SpiderMonkey from 3rd-party so... Closed
Operating System: ALL
Participants:

 Description   

In a sharded cluster with 4 replica sets (3 rs with 2 mongod + 1 arbiter, and one with only one mongod), `sh.status()` and `db.printShardingStatus()` fails with this error:

# mongo
MongoDB shell version: 2.4.3
connecting to: test
mongos> sh.status()
Fri May 31 10:45:24.719 uncaught exception: group command failed: {
	"errmsg" : "exception: reduce invoke failed: JS Error: TypeError: Object.extend is not a function nofile_b:0",
	"code" : 9010,
	"ok" : 0
}



 Comments   
Comment by Scott Hernandez (Inactive) [ 03/Jun/13 ]

We need to let the freebsd ports people know that this no longer a supported option. We are in the process of removing this options from the source and build system: SERVER-9775

We will have to test but I suspect that just changing out the mongos should have fix this problem. But it is good that you have got it working none the less.

I would suggest that you use V8 for all components (shell, mongos, mongod) as that is the currently supported javascript engine (it has many performance and bug fixes only on/in V8 as well).

Comment by Taha Jahangir [ 03/Jun/13 ]

Problem solved by restarting config servers

Comment by Taha Jahangir [ 02/Jun/13 ]

We recompiled mongodb with V8, but even with restarting mongos (and not other instances), the error remains.

Comment by Taha Jahangir [ 01/Jun/13 ]

We installed using freebsd ports (which are ready-to-build not binary).
and we configured mongodb with spidermonkey.
If spidermonkey is not supported, why it is exists as an option (without any warning)?

Comment by Scott Hernandez (Inactive) [ 01/Jun/13 ]

How are you installing this build? Are you manually building and installing or is this from some package?

Since we have switched to V8 and are actually removing spidermonkey support this is probably just an incompatibility between the two. In all releases we will only support V8.

If you are installing from the freebsd port you will want to make sure not to enable spidermonkey (! sm=on) : http://www.freshports.org/databases/mongodb/

Comment by Taha Jahangir [ 01/Jun/13 ]

mongodb 2.4.3 on FreeBSD (with SpiderMonkey)

details attached

Comment by Scott Hernandez (Inactive) [ 31/May/13 ]

What are the versions and buildinfo? Please run this from the mongo javascript shell and attach the results:

db.version()
version()
buildInfo()
db.adminCommand("buildInfo")
db.hostInfo()
getHostName()

Please also attach a mongodump of your config database as well. You can do this by running

mongodump --host <mongos-address:port> -d config

Generated at Thu Feb 08 03:21:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.