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 in the docker image #4461

Open
nodece opened this issue Jul 4, 2024 · 0 comments · May be fixed by #4464
Open

Permission denied in the docker image #4461

nodece opened this issue Jul 4, 2024 · 0 comments · May be fixed by #4464
Assignees
Labels
Milestone

Comments

@nodece
Copy link
Member

nodece commented Jul 4, 2024

Describe the bug

I tried using the apache/bookkeeper:4.17.1 image to run the local bookie, but an error was thrown:

bookkeeper@5223bdf53e80:/opt/bookkeeper$ bin/bookkeeper localbookie 6
[0.001s][error][logging] Error opening log file '/opt/bookkeeper/logs/gc_165.log': Permission denied
[0.002s][error][logging] Initialization of output 'file=/opt/bookkeeper/logs/gc_%p.log' using options 'filecount=5,filesize=64m' failed.
Invalid -Xlog option '-Xlog:gc=info:file=/opt/bookkeeper/logs/gc_%p.log::filecount=5,filesize=64m', see error log for details.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

To Reproduce

docker run -it --rm apache/bookkeeper:4.17.1 bash

# then run this command in the container

bin/bookkeeper localbookie 6

Additional context

  • Docker default user
    root

  • Directories info

bookkeeper@5223bdf53e80:/opt/bookkeeper$ ls -l
total 296
-rw-r--r-- 1 bookkeeper bookkeeper  36785 Nov  8  2023 LICENSE
-rw-r--r-- 1 bookkeeper bookkeeper   6567 Nov  8  2023 NOTICE
-rw-r--r-- 1 bookkeeper bookkeeper   2820 Nov  8  2023 README.md
drwxr-xr-x 1 bookkeeper bookkeeper   4096 Nov  8  2023 bin
-rw-r--r-- 1 root       root       181760 Jul  4 16:40 bookkeeper-shell.log
drwxr-xr-x 1 bookkeeper bookkeeper   4096 Nov  8  2023 conf
drwxr-xr-x 1 bookkeeper bookkeeper   4096 Jun 25 14:38 deps
drwxr-xr-x 1 bookkeeper bookkeeper  24576 Jun 25 14:38 lib
drwxr-xr-x 2 root       root         4096 Jul  4 16:40 logs
drwxr-xr-x 1 bookkeeper bookkeeper   4096 Jun 25 14:39 scripts

Suggestion

  1. Using bookkeeper user to run this image
  2. /data, /opt/bookkeeper/logs, /opt/bookkeeper/conf are writeable

I can make a PR to fix this.

@nodece nodece added the type/bug label Jul 4, 2024
@shoothzj shoothzj added this to the 4.18.0 milestone Jul 4, 2024
@nodece nodece linked a pull request Jul 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants