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

   ### Version
   
   3.5.1
   
   ### Describe the problem you're encountering
   
   with `[couch_peruser] enable=true` in `.ini` config, the couch_peruser 
process was not working (that is: `userdb-(hash)` databases were not being 
created when new users were added).
   The logs showed lines such as the following (with loglevel debug):
   
   ```
   2026-08-02T00:30:09.118Z
   [error] 2026-08-02T00:30:09.118526Z nonode@nohost <0.404.0> -------- 
Supervisor couch_peruser_sup had child couch_peruser started with 
couch_peruser:start_link() at <0.14666123.0> exit with reason normal in context 
child_terminated
   2026-08-02T00:30:09.153Z
   [debug] 2026-08-02T00:30:09.153616Z nonode@nohost <0.14666938.0> -------- 
peruser: skipping, cluster unstable 
shards/80000000-ffffffff/_users.1754906410/org.couchdb.user:b03c99dc-f0a1-70bc-5be7-d20c4521814a
   ```
   
   the couch_peruser process was restarted by the supervisor every five 
seconds, and then immediately exited with the "cluster unstable" error messages.
   
   
   ### Expected Behaviour
   
   `couch_peruser` should be started at server startup and then stay running 
without exiting.
   
   ### Steps to Reproduce
   
   It is hard to say how to reproduce this because we're not actually sure what 
the problem was. But I can explain how we _fixed_ it, which was to identify all 
users in `_users` who have been deleted (that is, are tombstones with `deleted: 
true`) but not purged, and then purge them.
   
   The problem may have been caused by there being deleted+unpurged users at 
all. However, we had a normal user account called `phpadmin` which was deleted 
(but not purged) and then a server admin account called `phpadmin` (same name) 
was created in the ini file (so there were, by some measures, two accounts with 
the same name). The `_users/org.couchdb.user:phpadmin` document is one of those 
that was `deleted:true`. Purging all the `deleted:true` `_users` users fixed 
the problem, and this included the `phpadmin` account. My speculation is the 
"duplicated" account was the problem, but this is speculation only.
   
   ### Your Environment
   
   couchdb 3.5.2 from the dockerhub official docker image running in AWS ECS
   
   ### Additional Context
   
   _No response_


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to