couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joan Touzet <woh...@apache.org>
Subject Re: The _config endpoint
Date Tue, 06 Dec 2016 20:08:38 GMT
Hi Nicholas,

You've run into a documentation bug on CouchDB 2.0. Sorry about that.

First off, you don't want to be using _config on port 5986. The 5986
endpoint is in the process of being deprecated...and in my opinion
should never be bound to any interface other than loopback (127.0.0.1).

Instead, you want to use the /_node/<nodename>/_config endpoint
on the main 5984 port. The nodename is what you set the node's name to
at install time. If you're not sure what the node name might be, check
the /_membership interface (on port 5984) for a list of nodes that
particular node is aware of.

The reason this API was changed is because in a cluster configuration,
especially one where you have a load balancer in front of the CouchDB
cluster, you have no knowledge of which node you're speaking with when
you hit /_config. Further, CouchDB has no mechanism to ensure consistency
across all nodes when a change is made - remember, we are an AP not a CP
datastore - meaning that a "global" /_config endpoint can't guarantee
that all nodes will make the exact same /_config change consistently
upon a single request. So, we have a global (5984) endpoint that provides
a node-local API.

Hope this helps,
Joan

----- Original Message -----
> From: "Nicholas Outram" <nicholas.outram@plymouth.ac.uk>
> To: user@couchdb.apache.org
> Sent: Tuesday, December 6, 2016 5:54:17 AM
> Subject: The _config endpoint
> 
> Hello
> 
> Something odd has happened with my CouchDB server (or more like, I’ve
> done something which had an unexpected side effect)
> 
> I’ve been working through the documentation. At first, I was able to
> add an admin user using the _config endpoint on port 5984 (as per
> the tutorial).
> 
> I’ve done something since and now it requires me to use port 5986.
> Not knowing what has caused this change makes me uneasy.
> 
> Can anyone throw some light on this?
> 
> Many thanks in advance,
> 
> Nick
> ________________________________
> [http://www.plymouth.ac.uk/images/email_footer.gif]<http://www.plymouth.ac.uk/worldclass>
> 
> This email and any files with it are confidential and intended solely
> for the use of the recipient to whom it is addressed. If you are not
> the intended recipient then copying, distribution or other use of
> the information contained is strictly prohibited and you should not
> rely on it. If you have received this email in error please let the
> sender know immediately and delete it from your system(s). Internet
> emails are not necessarily secure. While we take every care,
> Plymouth University accepts no responsibility for viruses and it is
> your responsibility to scan emails and their attachments. Plymouth
> University does not accept responsibility for any changes made after
> it was sent. Nothing in this email or its attachments constitutes an
> order for goods or services unless accompanied by an official order
> form.
> 

Mime
View raw message