Access rights for the user mongeez connects with.

454 views
Skip to first unread message

mkr...@trialfire.com

unread,
Aug 13, 2013, 9:07:09 PM8/13/13
to mongee...@googlegroups.com
Has anyone tried running mongeez with a mongodb in heroku?

So I'm able to connect and I see the mongeez collection generated by Mongeez but then mongodb give me the following error: not authorized for update on app17069692.mongeez 

Stack trace:

[info]   at com.mongodb.CommandResult.getException(CommandResult.java:77)
[info]   at com.mongodb.CommandResult.throwOnError(CommandResult.java:110)
[info]   at com.mongodb.DBTCPConnector._checkWriteError(DBTCPConnector.java:102)
[info]   at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:142)
[info]   at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:115)
[info]   at com.mongodb.DBApiLayer$MyCollection.update(DBApiLayer.java:327)
[info]   at com.mongodb.DBCollection.update(DBCollection.java:178)
[info]   at org.mongeez.dao.MongeezDao.addTypeToUntypedRecords(MongeezDao.java:56)
[info]   at org.mongeez.dao.MongeezDao.configure(MongeezDao.java:47)
[info]   at org.mongeez.dao.MongeezDao.<init>(MongeezDao.java:43)

When I connect to mongo with the console as the same user I have no problem doing a find(), insert() or update().

Any ideas?

-Max

mkr...@trialfire.com

unread,
Aug 14, 2013, 4:32:23 PM8/14/13
to mongee...@googlegroups.com
OK I figured this out by digging through the Mongeez code and understanding how it executes the updates on mongo.
Essentially this issue is with db.eval() which mongeez uses to execute the update scripts - however db.eval() is an admin only feature ( you can find that described here at the bottom of the page http://docs.mongodb.org/manual/reference/method/db.eval/#db.eval)

So, if you're connecting to mongo with a non-admin user forget about using Mongeez, it won't work. Hence my problem with heroku (mongoHQ) where I'm using a sandbox instance - its free and SHARED, therefore no admin access. Will have to wait until we get a dedicated instance before using Mongeez.

-Max

Máté Magyari

unread,
Aug 16, 2013, 10:11:08 AM8/16/13
to mongee...@googlegroups.com
Hi, I've just run into the same problem today. But even provided the user has the necessary rights to execute eval, I have some doubts. On the link in previous email there is a warning about the unsuitability of eval on sharded data. Does Mongeez tackle this problem?

any thought appreciated and welcome

-Mate

Alejandro Calbazana

unread,
Nov 2, 2013, 10:10:05 AM11/2/13
to mongee...@googlegroups.com
I hit this as well.  Is there a way around this?  eval is an admin function and I won't be able to run this since my DB accounts do not have admin rights.


On Tuesday, August 13, 2013 9:07:09 PM UTC-4, mkr...@trialfire.com wrote:

David M. Carr

unread,
Nov 4, 2013, 8:14:35 AM11/4/13
to mongee...@googlegroups.com
I'm not aware of any current workarounds for this issue.  There are several people interested in alternate mechanisms of changeset execution, so an approach will probably materialize at some point, but it's unclear when.  One approach that has been proposed is to use a Javascript interpreter and the Javascript driver to execute the changesets.



--
You received this message because you are subscribed to the Google Groups "Mongeez Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongeez-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
David M. Carr
da...@carrclan.us
Reply all
Reply to author
Forward
0 new messages