-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Bug] Running pulsar-shell in docker container throws exception #22440
Comments
The problem is caused by invalid home directory for the default "pulsar" user. This was added in #21695.
One possibility would be to make a fix in PulsarShell code, to ensure that the directory is writable: pulsar/pulsar-client-tools/src/main/java/org/apache/pulsar/shell/PulsarShell.java Lines 212 to 214 in 434ec1b
The logic for selecting user.dir would also need logic to check that the directory is writable. For the Pulsar docker image, the solution in PulsarShell using It's better to disable the shell history if there's no writable location? /cc @nicoloboschi |
@lhotari I agree with you that we should check if the directory is writable instead of throwing error. The directory is also used for storing cluster connection parameters when you create a config. I think we can do two things (maybe both)
|
yes
It's better not to have custom solutions for the docker image. In the Dockerfile, the invalid home directory should be fixed. It could point to /pulsar/data, for example. |
I created #22446 which will resolve the issue, however it would be useful to implement the checks to pulsar-shell as well. |
Fixed by #22446 |
Search before asking
Read release policy
Version
3.2.2
Minimal reproduce step
Describe the bug
pulsar
using below command:docker exec -it <container-id> /bin/sh
./bin/pulsar-shell
.docker exec -it -u root <container-id> /bin/sh
, thepulsar-shell
is working.bin
directory is owned byroot
user not the defaultpulsar
user.What did you expect to see?
With default
pulsar
user, thepulsar-shell
should be opened.What did you see instead?
Anything else?
The issue is also reproducible on kubernetes environment.
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: