-
Notifications
You must be signed in to change notification settings - Fork 9
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
warn on missing credentials to access a restricted couch database #11
Comments
Good idea... Do you see this output? https://github.com/ryanramage/couch2elastic4sync/blob/master/bin/cli.js#L47-L48 |
With a secured db but a url without Basic Auth:
{"name":"couch2elastic4sync","hostname":"myhostname","pid":23086,"level":50,"msg":"an error occured no seq number in elasticsearch at http://localhost:9200/inventaire/_mapping/seq","time":"2016-08-20T17:55:04.579Z","v":0}
{"name":"couch2elastic4sync","hostname":"myhostname","pid":23086,"level":30,"msg":"since: now","time":"2016-08-20T17:55:04.581Z","v":0}
{"name":"couch2elastic4sync","hostname":"myhostname","pid":23086,"level":30,"msg":"endOnCatchup: false","time":"2016-08-20T17:55:04.581Z","v":0}
{"name":"couch2elastic4sync","hostname":"myhostname","pid":23086,"level":50,"err":{"message":"Bad DB response: {\"error\":\"unauthorized\",\"reason\":\"You are not authorized to access this db.\"}\n","name":"Error","stack":"Error: Bad DB response: {\"error\":\"unauthorized\",\"reason\":\"You are not authorized to access this db.\"}\n\n at Request.db_response [as _callback] (/home/maxlath/.nvm/versions/node/v4.4.5/lib/node_modules/couch2elastic4sync/node_modules/follow/lib/feed.js:146:33)\n at Request.self.callback (/home/maxlath/.nvm/versions/node/v4.4.5/lib/node_modules/couch2elastic4sync/node_modules/follow/node_modules/request/request.js:368:22)\n at emitTwo (events.js:87:13)\n at Request.emit (events.js:172:7)\n at Request.<anonymous> (/home/maxlath/.nvm/versions/node/v4.4.5/lib/node_modules/couch2elastic4sync/node_modules/follow/node_modules/request/request.js:1219:14)\n at emitOne (events.js:82:20)\n at Request.emit (events.js:169:7)\n at IncomingMessage.<anonymous> (/home/maxlath/.nvm/versions/node/v4.4.5/lib/node_modules/couch2elastic4sync/node_modules/follow/node_modules/request/request.js:1167:12)\n at emitNone (events.js:72:20)\n at IncomingMessage.emit (events.js:166:7)"},"msg":"Bad DB response: {\"error\":\"unauthorized\",\"reason\":\"You are not authorized to access this db.\"}\n","time":"2016-08-20T17:55:04.782Z","v":0} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for couch databases with a security document restricting the access, starting to sync without passing an admin username and password as Basic Auth in the database url (ex:
http://username:pwd@localhost:5984/foo
) results in couch2elastic4sync exiting silently, which looks a lot like a "everything went fine" behavior. The easiest fix I can see would be to log the error message returned by couchdb:The text was updated successfully, but these errors were encountered: