Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
h4ki opened this issue Jan 27, 2025 · 1 comment

Comments

@h4ki
Copy link

h4ki commented Jan 27, 2025

#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.

@rnewson
Copy link
Member

rnewson commented Feb 3, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants