Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MongoError:not authorized for query on xxx._SCHEMA #1750

Closed
GongChen1107 opened this issue May 10, 2016 · 5 comments
Closed

MongoError:not authorized for query on xxx._SCHEMA #1750

GongChen1107 opened this issue May 10, 2016 · 5 comments

Comments

@GongChen1107
Copy link

HI,
I meet a problem that “MongoError:not authorized for query on xxx._SCHEMA” come out accidental。And it disappered without changes everything .This cufuse me so much .Hope you can help me firgure out the problem.

@drew-gross
Copy link
Contributor

Can you please post some code that demonstrates what you are doing, what you expected to happen, and what actually happened?

@GongChen1107
Copy link
Author

1、When I use dashboard to push a notification ,it comes out the tracks below.
POST /parse/dqKX7I0Gnmx0jp6Cydhx47gvXf9gu0BUlSIGy9Rc/push 200 5.757 ms - 15
Parse-1 error: error while sending push MongoError: not authorized on agl_coinnl_autumn to execute command { update: "_PushStatus", updates: [ { q: { status: "running", objectId: "Ne3BV1hCxG" }, u: { $set: { status: "succeeded", numSent: 2, numFailed: 1, sentPerType: { android: 2 }, failedPerType: { android: 1 }
} }, upsert: false, multi: false } ], ordered: true }
Parse-1 at Function.MongoError.create (/home/ubuntu/apps/parse/parseServer/worldcity.parse/libs/parse-server/node_modules/mongodb-core/lib/error.js:31:11)
Parse-1 at commandCallback (/home/ubuntu/apps/parse/parseServer/worldcity.parse/libs/parse-server/node_modules/mongodb-core/lib/topologies/server.js:1154:66)
Parse-1 at Callbacks.emit (/home/ubuntu/apps/parse/parseServer/worldcity.parse/libs/parse-server/node_modules/mongodb-core/lib/topologies/server.js:119:3)
Parse-1 at null.messageHandler (/home/ubuntu/apps/parse/parseServer/worldcity.parse/libs/parse-server/node_modules/mongodb-core/lib/topologies/server.js:295:23)
Parse-1 at Socket. (/home/ubuntu/apps/parse/parseServer/worldcity.parse/libs/parse-server/node_modules/mongodb-core/lib/connection/connection.js:285:22)
Parse-1 at emitOne (events.js:90:13)
Parse-1 at Socket.emit (events.js:182:7)
Parse-1 at readableAddChunk (_stream_readable.js:153:18)
Parse-1 at Socket.Readable.push (_stream_readable.js:111:10)
Parse-1 at TCP.onread (net.js:529:20)

2、When I use Android SDK to initParseServer,it came out the track below.
error: Uncaught internal server error. { [MongoError: not authorized for query on snappop._SCHEMA]
Parse-1 (err): name: 'MongoError',
Parse-1 (err): message: 'not authorized for query on snappop._SCHEMA',
Parse-1 (err): '$err': 'not authorized for query on snappop._SCHEMA',
Parse-1 (err): code: 13 } MongoError: not authorized for query on snappop._SCHEMA
Parse-1 (err): at Function.MongoError.create (/home/ubuntu/apps/parse/parseServer/worldcity.parse/libs/parse-server/node_modules/mongodb-core/lib/error.js:31:11)
Parse-1 (err): at queryCallback (/home/ubuntu/apps/parse/parseServer/worldcity.parse/libs/parse-server/node_modules/mongodb-core/lib/cursor.js:182:34)
Parse-1 (err): at Callbacks.emit (/home/ubuntu/apps/parse/parseServer/worldcity.parse/libs/parse-server/node_modules/mongodb-core/lib/topologies/server.js:119:3)
Parse-1 (err): at null.messageHandler (/home/ubuntu/apps/parse/parseServer/worldcity.parse/libs/parse-server/node_modules/mongodb-core/lib/topologies/server.js:295:23)
Parse-1 (err): at Socket. (/home/ubuntu/apps/parse/parseServer/worldcity.parse/libs/parse-server/node_modules/mongodb-core/lib/connection/connection.js:285:22)
Parse-1 (err): at emitOne (events.js:90:13)
Parse-1 (err): at Socket.emit (events.js:182:7)
Parse-1 (err): at readableAddChunk (_stream_readable.js:153:18)
Parse-1 (err): at Socket.Readable.push (_stream_readable.js:111:10)
Parse-1 (err): at TCP.onread (net.js:529:20)

Parse Server returns {"error":"unauthorized"} to app client.

@GongChen1107
Copy link
Author

@drew-gross
I check my log of mongodb it shows the information below.
2016-05-10T23:45:38.643-0700 I NETWORK [initandlisten] connection accepted from 10.101.237.160:59069 #4577645 (6150 connections now open)
2016-05-10T23:45:44.437-0700 I ACCESS [conn4577645] SCRAM-SHA-1 authentication failed for agf_iapnl_kenic on agf_iapnl_kenic from client 10.101.237.160 ; BadValue Unmatched SCRAM-SHA-1 nonce received from client in second step, expected Kls8ojY00PUMltZIKHx/oDmMKh/+qjLCMzwlzPOEr8sV8Pq4mXKic6LXWfQYGwuT but received GVmbhIkealXIZrcpxS8cB6WOZh5qI1+ORQnfoQfYFxApwLLvlZ+uX1wlf3GZKg0Q
2016-05-10T23:45:45.665-0700 I QUERY [conn4577645] assertion 13 not authorized for query on agf_iapnl_kenic._Hooks ns:agf_iapnl_kenic._Hooks query:{}

I am running several apps in one machine and lisetening on one port ,I guess it may be memory confused .When do query operation it use the wrong SCRAM-SHA-1 authentication.

@GongChen1107
Copy link
Author

@drew-gross
Does the parseserver reconnect to the mongodb in some situation?I find a same error that is caused by re-authenticate.This is the bug in mongoose.

@drew-gross
Copy link
Contributor

Yes it authenticates when it connects. I think this is a problem with your configuration, not a bug in Parse Server. Check your passwords, and if you still have issues, post a question on Server Fault or Stack Overflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants