forked from kraih/mango
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Appear to be having the same problem as #10 which was fixed a while back.
Running Mango 1.30 and Mojolicious 7.77.
My first query to MongoDB gives me an authentication error: not authorized for query on test.testcollection at /usr/local/share/perl5/Mango/Cursor/Query.pm line 112
Subsequent queries work fine.
use Mojolicious::Lite;
use Mango;
@ARGV = qw(daemon --listen http://*:5000);
my $muri = 'mongodb://user:pass@localhost/test';
my $mango = Mango->new($muri);
get '/' => sub {
my $c = shift;
my $pos = $mango->db->collection('testcollection')->find->all;
$c->render('json' => $pos);
};
app->start;
Server available at http://127.0.0.1:5000
[Wed May 9 02:15:48 2018] [debug] GET "/"
[Wed May 9 02:15:48 2018] [debug] Routing to a callback
[Wed May 9 02:15:48 2018] [error] not authorized for query on test.testcollection at /usr/local/share/perl5/Mango/Cursor/Query.pm line 112.
[Wed May 9 02:15:48 2018] [debug] Template "exception.development.html.ep" not found
[Wed May 9 02:15:48 2018] [debug] Template "exception.html.ep" not found
[Wed May 9 02:15:48 2018] [debug] Rendering template "mojo/debug.html.ep"
[Wed May 9 02:15:48 2018] [debug] Rendering template "mojo/menubar.html.ep"
[Wed May 9 02:15:48 2018] [debug] Your secret passphrase needs to be changed
[Wed May 9 02:15:48 2018] [debug] 500 Internal Server Error (0.028515s, 35.069/s)
[Wed May 9 02:15:49 2018] [debug] GET "/"
[Wed May 9 02:15:49 2018] [debug] Routing to a callback
[Wed May 9 02:15:49 2018] [debug] 200 OK (0.01038s, 96.339/s)
Metadata
Metadata
Assignees
Labels
No labels