You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2022/10/13 12:23:59 UTC

[GitHub] [couchdb] Manphil opened a new issue, #4207: Error when set security of database: no_ring

Manphil opened a new issue, #4207:
URL: https://github.com/apache/couchdb/issues/4207

   [NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ )
   
   ## Description
   
   When I use `curl` to set db security, the response is:
   ```
   {"error":"error","reason":"no_ring"}
   ```
   And the couchdb logs show that:
   ```
   rpc couch_db:set_security/2 badarg
   Failed to set security object on ... :: {error,badarg}
   ```
   But other databases are ok.
   
   The data size of the error db is about 1GB.
   
   ## Steps to Reproduce
   
   [NOTE]: # ( Include commands to reproduce, if possible. curl is preferred. )
   The command I used is just like
   ```
   curl http://localhost:5984/db_name/_security -X PUT -H 'content-type: application/json' -H 'accept: application/json' -d '{"admins":{"names":["admin"],"roles":[]},"members":{"names": ["admin"],"roles": []}}'
   ```
   
   
   ## Your Environment
   
   [TIP]:  # ( Include as many relevant details about your environment as possible. )
   [TIP]:  # ( You can paste the output of curl http://YOUR-COUCHDB:5984/ here. )
   
   * CouchDB version used: docker image with version 2.1.1
   ```
   {"couchdb":"Welcome","version":"2.1.1","features":["scheduler"],"vendor":{"name":"The Apache Software Foundation"}}
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] Manphil commented on issue #4207: Error when set security of database: no_ring

Posted by GitBox <gi...@apache.org>.
Manphil commented on issue #4207:
URL: https://github.com/apache/couchdb/issues/4207#issuecomment-1281922318

   It seems that the situation is difficult to reproduce with a script or a few instructions. Even, I can't reproduce this error when i start a new couchdb instance. When i try to reproduce it in that new db but the result is not expected. 
   
   This error happens in our database that has been running a long time. And the error has happened several times in different couchdb instance(i.e. independent couchdb container). Seemly, the time when the error happens is uncertain. However, the error will always happen once it happens in that db.
   
   The only information i can obtain is that it seems that this error happened after the index of db was modified. I'm not sure if the two are related.
   
   Anyway, thanks for your reply!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] Manphil commented on issue #4207: Error when set security of database: no_ring

Posted by GitBox <gi...@apache.org>.
Manphil commented on issue #4207:
URL: https://github.com/apache/couchdb/issues/4207#issuecomment-1280192408

   The couchdb logs show that:
   ```
   rpc couch_db:set_security/2 badarg
   Failed to set security object on ... :: {error,badarg}
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] Manphil commented on issue #4207: Error when set security of database: no_ring

Posted by GitBox <gi...@apache.org>.
Manphil commented on issue #4207:
URL: https://github.com/apache/couchdb/issues/4207#issuecomment-1278411330

   > `no_ring` means it cannot reach all the expect database shards at the same time, some of the nodes which are mentioned in the shard map are not connected.
   
   @nickva Thanks for your reply! Is there any way to sovle this problem? The problem has occurred many times. Last time the problem occurred in another couchdb instance, i upgrade the couchdb to 3.2.2, but the problem still occurred. The method i used to recover was to delete the database and re-create a new one, then re-write all data into the new database, but this way takes lots of time to recover when the db size is large.
   
   I still have some doubts:
   > some of the nodes which are mentioned in the shard map
   
   Does the `nodes` mean nodes in cluster enviroment? Acturally, the couchdb runs in docker container and is standalone.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] Manphil commented on issue #4207: Error when set security of database: no_ring

Posted by GitBox <gi...@apache.org>.
Manphil commented on issue #4207:
URL: https://github.com/apache/couchdb/issues/4207#issuecomment-1278433974

   @nickva The couchdb is running in single node. I runs couchdb just like:
   ```
   docker run couchdb
   ```
   
   And I query the db infomation, returned the response:
   ```
   "cluster":{"q":8,"n":1,"w":1,"r":1}
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] nickva commented on issue #4207: Error when set security of database: no_ring

Posted by GitBox <gi...@apache.org>.
nickva commented on issue #4207:
URL: https://github.com/apache/couchdb/issues/4207#issuecomment-1277738010

   `no_ring` means it cannot reach all the expect database shards at the same time, some of the nodes which are mentioned in the shard map are not connected.
   
   Also `2.1.1` is quite a bit outdated, try upgrading to `3.2.1`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] nickva commented on issue #4207: Error when set security of database: no_ring

Posted by GitBox <gi...@apache.org>.
nickva commented on issue #4207:
URL: https://github.com/apache/couchdb/issues/4207#issuecomment-1277820599

   @big-r81 indeed, thanks for noticing


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] big-r81 commented on issue #4207: Error when set security of database: no_ring

Posted by GitBox <gi...@apache.org>.
big-r81 commented on issue #4207:
URL: https://github.com/apache/couchdb/issues/4207#issuecomment-1277803202

   > Also `2.1.1` is quite a bit outdated, try upgrading to `3.2.1`.
   
   To 3.2.2 please 😉
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] nickva commented on issue #4207: Error when set security of database: no_ring

Posted by GitBox <gi...@apache.org>.
nickva commented on issue #4207:
URL: https://github.com/apache/couchdb/issues/4207#issuecomment-1279154229

   @Manphil thanks for checking. 
   
   See if there are any errors in the logs or crashes in the logs at the time when the call is made. Looking at the source code https://github.com/apache/couchdb/blob/5a55796e7629a6aea717a5755da52e1e0df5eaed/src/fabric/src/fabric_db_meta.erl#L76-L92
   
   Specifically log entries which that start with `Failed to set security object on`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] nickva commented on issue #4207: Error when set security of database: no_ring

Posted by GitBox <gi...@apache.org>.
nickva commented on issue #4207:
URL: https://github.com/apache/couchdb/issues/4207#issuecomment-1281181550

   @Manphil thanks for checking. It looks like there is an error applying the security property to individual shards and it's not related to inter-node or cluster connections. Is it easy to reproduce with a script or a few instructions which follow the same pattern you used (if you can't share the exact request)?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [couchdb] nickva commented on issue #4207: Error when set security of database: no_ring

Posted by GitBox <gi...@apache.org>.
nickva commented on issue #4207:
URL: https://github.com/apache/couchdb/issues/4207#issuecomment-1278422573

   If it's a multi-node cluster the nodes shown in the `_membership` in `all_nodes` (all currently connected) should match up with `cluster_nodes`, which are nodes which are expected to be present.  https://docs.couchdb.org/en/3.2.2-docs/cluster/nodes.html
   
   In addition check your shard map to ensure the nodes mentioned there are nodes which are also connected to and there are not missing nodes or ranges. See https://docs.couchdb.org/en/3.2.2-docs/cluster/sharding.html for some example.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org