Closed Shikachuu closed 3 years ago
Hey, @Shikachuu . Please, use the permissions
key in the boltdb
configuration. Try to set to 0644
or some other permissions suitable for you :)
Hey, @rustatian . Thanks for the fast response!
I just tried it and still throws the same error even with 0777
.
The current config:
kv:
boltdb:
driver: boltdb
file: "rr.db"
dir: "/home/app"
permissions: 0777
bucket: "rr"
interval: 86400
Even if I use a non-existing path, which should trigger a different error throws the same.
kv:
boltdb:
driver: boltdb
file: "rr.db"
dir: "/non/existing/path"
permissions: 0777
bucket: "rr"
interval: 86400
@Shikachuu Could you please try to use 0666
?
@Shikachuu Could you please try to use
0666
?
Sure, sadly the same error with the following kv config:
kv:
boltdb:
driver: boltdb
file: "rr.db"
dir: "/home/app"
permissions: 0666
bucket: "rr"
interval: 86400
Sad to hear that 😞 . Does this problem blocking you?
Sad to hear that disappointed . Does this problem blocking you?
Sadly yes, at the moment I have to run the container as root or use the memory
driver and I think neither of them safe enough to deploy this even to the staging/uac server.
Ok, got u. Will try to fix that issue ASAP. I guess that version 2.4.2
will be till today's evening (GMT+3).
Transferring this issue to the roadrunner-plugins
repo.
@Shikachuu Found the issue. For some reason, viper
(library we use to parse yaml configuration) doesn't parse leading 0 in the permissions key. So, 0777 becomes 511. Could you please try to use just 777 ?
@rustatian thats a nice news, but I am affraid 777
throws the same.
Config:
kv:
boltdb:
driver: boltdb
file: "rr.db"
dir: "/home/app"
permissions: 777
bucket: "rr"
interval: 86400
Ok, got u.
This is def issue in the parser, direct passing os.FileMode
works well. I'll notify you when the fix is ready.
Thank you very much! :smile:
@rustatian the same problem occures also with jobs using the bolt db dirver in the same config/container. With the followin config:
boltdb:
permissions: 0777
jobs:
num_pollers: 4
pipeline_size: 100000
pool:
num_workers: 1
max_jobs: 8
consume: [ "empty-http-bucket" ]
pipelines:
empty-http-bucket:
driver: boltdb
file: queue.db
yeah, jobs use the same driver under the hood. Working on the fix....
@Shikachuu Could you please show the ls -la
output (especially rr.db
permission bits)?
The file doesn't exist, so I can't really send you the output :(
On 2021. Sep 23., Thu at PM 2:20, Valery Piashchynski < @.***> wrote:
@Shikachuu https://github.com/Shikachuu Could you please show the ls -la output (especially rr.db permission bits)?
I guess, that you can't create a file, because the user has no permissions to create a file (not in the group for example). I guessed, that the problem is somewhere else, but when I started RR process and it created a file (0777) permissions, the ls -la
shows me correct permission bits - - rwx r-x r-x
. RR process owns the file (2-3-4 bits) and thus can manipulate the data. Might be you should add the --user <user>
with proper user to your docker command.
I think it is, but you can check the Dockerfile in the issue itself, I am currently running the exact same one.
I already tried on the dev Dockerfile https://github.com/spiral/roadrunner-binary/blob/master/dev/Dockerfile.local, no errors.
Dockerfile in the issue is non-reproducible since there are a lot of user-specific folders in it.
There is only one folder which contains the composer.json
and an index.php
, those files are currently irrelevant.
There is also a custom.ini
file, which is currently an empty ini file.
There is only one folder which contains the
composer.json
and anindex.php
, those files are currently irrelevant. There is also acustom.ini
file, which is currently an empty ini file.
I can provide the files if it helps the process move forward.
I already tried on the dev Dockerfile https://github.com/spiral/roadrunner-binary/blob/master/dev/Dockerfile.local, no errors.
@rustatian,
If I am not mistaken, this container runs the rr
binary as root, so this is irrelevant too, since the root version is working for me as well.
I removed all irrelevant files, np. And I see your issue. I'll try to dig into it, but it seems, that the issue doesn't relate to the RR. But I'll try to help you.
Thank you very much! Let me know if I can help you with anything or you need any aditional information.
@Shikachuu Try to use this config:
file: "/home/app/rr.db"
W/o dir
.
@Shikachuu Try to use this config:
file: "/home/app/rr.db"
W/o
dir
.
Thanks, this is working with both k/v and jobs. But why? :thinking:
We don't use dir
, just file with full path. This is also valid for the jobs
. https://github.com/spiral/roadrunner-binary/blob/stable/.rr.yaml#L214
The dir
key was used in the past in the old configuration. This is completely my bad, I forgot to mention this in the release notes 😞
Running rr with a non-root user refuses to create the db file using key-value plugin with boltdb.
I tried this Dockerfile:
I expected to see this happen: Creates a boltdb db file to the specified location (
/home/app/rr.db
)Instead, this happened: Breaks with permission denied error
The version of RR used: 2.4.1
My
.rr.yaml
configuration is:Errortrace, Backtrace or Panictrace