couchdb icon indicating copy to clipboard operation
couchdb copied to clipboard

Nouveau Service under user couchdb does not have access on index_definition.json on shards

Open h4ki opened this issue 11 months ago • 4 comments

#Problem: Response on _nouveau index query: {"error":"internal_server_error","reason":"There was an error processing your request. It has been logged (ID eb5752b9a6daada8)."}

log says: ERROR [2025-01-27 10:07:59,090] io.dropwizard.jersey.errors.LoggingExceptionMapper: Error handling a request: eb5752b9a6daada8 ! java.io.FileNotFoundException: ./data/nouveau/[email protected]/shards/80000000-ffffffff/rd20-dev.1732139056/95778a55d3512ab28ece688402c72407960651ca47cd8639298008a1c4717efb/index_definition.json (Permission denied)

Steps to Reproduce

  1. Create Lucene Query Parser Service under User couchdb instead of root: [Unit] Description=Lucene Query Parser for CouchDB

[Service] User=couchdb Group=couchdb ExecStart=/usr/bin/nouveau_server_start.sh

[Install] WantedBy=multi-user.target

  1. Wait some time or reshard database, change data, etc. after some time, query parser respond with the internal server error above

Expected Behaviour

couchdb user under which the nouveau server runs has implicit access to all shards and index_definition.json files

Your Environment

  • CouchDB version used: 3.4.2
  • Browser name and version: Chrome Engine/not relevant - has same respond with curl
  • Operating system and version: ubuntu 22.04

Additional Context

When you start Nouveau service under root, index_definition.json files are accessible and query is fully functional. ==> The problem in my special context is: The nouveau server is not allowed to run with root privileges.

h4ki avatar Jan 27 '25 11:01 h4ki

Sounds like you need to change ownership of the existing files from root to couchdb if you've changed the user that couchdb runs as since they were created.

rnewson avatar Feb 03 '25 21:02 rnewson

Thanks for your indication Robert, will check it and if I don't come back your indication has solved the issue.

h4ki avatar Mar 13 '25 12:03 h4ki

Hi robert, even with root privileges, a config file was not accessible as reason for this error:

Image

Image

h4ki avatar Mar 20 '25 09:03 h4ki

thanks, can you please include the entire text of that error (as text, not image). thanks.

rnewson avatar Mar 20 '25 15:03 rnewson