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

Permission denied on LOG at startup #2770

Open
1 of 2 tasks
webfrank opened this issue Feb 4, 2025 · 2 comments
Open
1 of 2 tasks

Permission denied on LOG at startup #2770

webfrank opened this issue Feb 4, 2025 · 2 comments
Labels
bug type bug

Comments

@webfrank
Copy link

webfrank commented Feb 4, 2025

Search before asking

  • I had searched in the issues and found no similar issues.

Version

2.11.0

Minimal reproduce step

Start docker image apache/kvrocks with attached volume on /var/lib/kvrocks/db

What did you expect to see?

Startup without errors

What did you see instead?

I20250204 08:16:32.807820 139777293532416 main.cc:144] kvrocks version 2.11.0 (commit 172d31a)
I20250204 08:16:24.788253 139901621595392 main.cc:144] kvrocks version 2.11.0 (commit 172d31a)
E20250204 08:16:24.795388 139901621595392 main.cc:176] Failed to open: failed to create column families: IO error: While open a file for appending: /var/lib/kvrocks/db/LOG: Permission denied
E20250204 08:16:32.814352 139777293532416 main.cc:176] Failed to open: failed to create column families: IO error: While open a file for appending: /var/lib/kvrocks/db/LOG: Permission denied
I20250204 08:16:41.587031 140088403459328 main.cc:144] kvrocks version 2.11.0 (commit 172d31a)
E20250204 08:16:41.593483 140088403459328 main.cc:176] Failed to open: failed to create column families: IO error: While open a file for appending: /var/lib/kvrocks/db/LOG: Permission denied
I20250204 08:16:49.983017 140598416473344 main.cc:144] kvrocks version 2.11.0 (commit 172d31a)
E20250204 08:16:49.989586 140598416473344 main.cc:176] Failed to open: failed to create column families: IO error: While open a file for appending: /var/lib/kvrocks/db/LOG: Permission denied
I20250204 08:17:01.580876 139802252512512 main.cc:144] kvrocks version 2.11.0 (commit 172d31a)
E20250204 08:17:01.588931 139802252512512 main.cc:176] Failed to open: failed to create column families: IO error: While open a file for appending: /var/lib/kvrocks/db/LOG: Permission denied
I20250204 08:17:14.436409 139658780769536 main.cc:144] kvrocks version 2.11.0 (commit 172d31a)
I20250204 08:17:14.783981 139658780769536 storage.cc:395] [storage] Success to load the data from disk: 252 ms
I20250204 08:17:14.812377 139658780769536 worker.cc:75] [worker] Listening on: 0.0.0.0:6666
I20250204 08:17:14.815929 139658780769536 worker.cc:75] [worker] Listening on: 0.0.0.0:6666
I20250204 08:17:14.816318 139658780769536 worker.cc:75] [worker] Listening on: 0.0.0.0:6666
I20250204 08:17:14.816669 139658780769536 worker.cc:75] [worker] Listening on: 0.0.0.0:6666
I20250204 08:17:14.816998 139658780769536 worker.cc:75] [worker] Listening on: 0.0.0.0:6666
I20250204 08:17:14.817296 139658780769536 worker.cc:75] [worker] Listening on: 0.0.0.0:6666
I20250204 08:17:14.817592 139658780769536 worker.cc:75] [worker] Listening on: 0.0.0.0:6666
I20250204 08:17:14.817888 139658780769536 worker.cc:75] [worker] Listening on: 0.0.0.0:6666
I20250204 08:17:14.819628 139658780769536 worker.cc:586] [worker] Thread #139658592200384 started
I20250204 08:17:14.819709 139658780769536 worker.cc:586] [worker] Thread #139658600593088 started
I20250204 08:17:14.819969 139658780769536 worker.cc:586] [worker] Thread #139658608985792 started
I20250204 08:17:14.820090 139658780769536 worker.cc:586] [worker] Thread #139658696586944 started
I20250204 08:17:14.820204 139658780769536 worker.cc:586] [worker] Thread #139658688194240 started
I20250204 08:17:14.820316 139658780769536 worker.cc:586] [worker] Thread #139658679801536 started
I20250204 08:17:14.820431 139658780769536 worker.cc:586] [worker] Thread #139658671408832 started
I20250204 08:17:14.820545 139658780769536 worker.cc:586] [worker] Thread #139658663016128 started
I20250204 08:17:14.820926 139658780769536 server.cc:240] [server] Ready to accept connections

Anything Else?

The container restarts several times until able to access LOG file, permissions are correct and nothing happens during this time.

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@webfrank webfrank added the bug type bug label Feb 4, 2025
@PragmaTwice
Copy link
Member

PragmaTwice commented Feb 4, 2025

Please ensure that kvrocks inside the docker container (the user name is "kvrocks", in here) has sufficient permission to access the directory you mount to the volume (e.g. you should use chmod/chown to adjust the permission).

Also the volume should be /var/lib/kvrocks instead of /var/lib/kvrocks/db.

@webfrank
Copy link
Author

webfrank commented Feb 5, 2025

Permissions are ok, after some restarts it works, all alone. I mounted /var/lib/kvrocks/db because I do not supply any kvrocks.conf, only command line parameters from docker compose. If I mount /var/lib/kvrocks directly kvrocks complains about some missing parameter which I do not specify on command line. I would prefer to configure it using command line and environment variables instead of configuration file.

If this is not an option I'll revert to file configuration.

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

No branches or pull requests

2 participants