Comments (10)
Ooooo
thanks for your help. I should have contacted you first. Any way thanks again. Much appreciated.
Regards,
Suhas
from couchdb.
Your step 1 talking to port 5986 to create a user is wrong - you got bad advice.
You need to first create the _users
database on port 5984 as outlined in our setup documentation: http://docs.couchdb.org/en/latest/install/setup.html#single-node-setup
Once you have created the _users
database through port 5984, repeat your step 1 to create your user on port 5984.
Then everything else should work normally.
from couchdb.
This is not a bug.
You should be doing everything with CouchDB using port 5984. The only thing that should be done via port 5986 is cluster setup tasks as explicitly outlined in our documentation.
from couchdb.
Thanks for your response.
However I tried following API on 5984
curl -X PUT http://admin:*****@localhost:5984/_users/org.couchdb.user:dan -H "Accept: application/json" -H "Content-Type: application/json" -d '{"name": "dan", "password": "apple", "roles": [], "type": "user"}'
it results in below message
{"error":"not_found","reason":"Database does not exist."}
Same was working on port 5986. Not able to understand what is the issue with port 5984
from couchdb.
You need to run all of your commands against port 5984. That error says your database was not created through the clustered interface.
If you are upgrading from couchdb 1.x you can migrate your database with these steps: http://docs.couchdb.org/en/latest/install/upgrading.html
from couchdb.
thanks again.
It was a fresh installation of couchdb 2.0.0, so there was no upgrade. I am using MAC, do you think re-installing couchdb will solve this problem.
Regards,
Suhas
from couchdb.
No need to reinstall. Just start over with:
curl -X PUT http://localhost:5984/eventdb
to create your database first.
from couchdb.
Thank you.
Started over, deleted eventdb and recreated one, however same issue exists. Added _security document to eventdb and assign an user to it and when tried
curl -u fan:apple http://localhost:5984/eventdb
it results in
{"error":"unauthorized","reason":"Name or password is incorrect."}
from couchdb.
Can you paste the entire set of things that you try? Is your user:password that you show there a CouchDB admin (listed in [admins]
section of local.ini
?)
from couchdb.
Hi,
Objective : is to create an user which will be in _users collection and then provide eventdb member access to the user.
things I tried out
- For adding user
curl -X PUT http://admin:*****@localhost:5984/_users/org.couchdb.user:dan -H "Accept: application/json" -H "Content-Type: application/json" -d '{"name": "dan", "password": "apple", "roles": [], "type": "user"}'
which results in below message
{"error":"not_found","reason":"Database does not exist."}
I searched on google for this error and come to know that system collection like _users are moved to port 5986 hence I fired below api
curl -X PUT http://admin:*****@localhost:5986/_users/org.couchdb.user:dan -H "Accept: application/json" -H "Content-Type: application/json" -d '{"name": "dan", "password": "apple", "roles": [], "type": "user"}'
I was able to create an user. (please note port number 5986)
- Provide eventdb member access to dan
I executed below command to provide an access
curl -X PUT http://localhost:5984/eventdb/_security -u admin:***** -H "Content-Type: application/json" -d '{"admins": { "names": [], "roles": [] }, "members": { "names": ["dan"], "roles": [] } }'
which returns below result for me
{"ok":true}
3. Accessing eventdb using dan's credential
curl -u dan:apple http://localhost:5984/eventdb
it results in
{"error":"unauthorized","reason":"Name or password is incorrect."}
I was following documentation at http://docs.couchdb.org/en/2.0.0/intro/security.html
thanks for your help.
from couchdb.
Related Issues (20)
- Snap 3.3.3 breaks previous version (3.1.1) functionality HOT 11
- Flaky PasswordCacheTest failure HOT 1
- Enhancement Proposal: Improved UI/UX for CouchDB HOT 8
- couchspawnkillable: Cannot allocate memory HOT 2
- Allow for proxy provided `nonce` in chttpd HOT 4
- view has the wrong signature HOT 20
- until parameter for change request HOT 9
- Unable to query fields indexed by nouveau HOT 26
- Nouveau Availability HOT 9
- Replication fail due to invalid_json error HOT 2
- installed couchdb package post-installation script subprocess returned error exit status 20 HOT 1
- Response of /_up is Not valid Json on one Node HOT 5
- "apache.jfrog.io" trial expired HOT 2
- "apache.jfrog.io" no more available. Where are the .deb packages now? HOT 2
- Installing from yum repo fails repomd.xml signature could not be verified for couchdb HOT 2
- Couchdb stoped writing to the journald logs HOT 4
- How do I customize port and service name for couchdb during silent installation in Windows HOT 6
- Extent log message about conflicted shards HOT 3
- Requiring support for leading wildcard search for nouveau HOT 3
- Inherited Permissions Not Applied in CouchDB's Windows Installer HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from couchdb.