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

mkdir wal: permission denied\nerror #15

Open
mrmodolo opened this issue Feb 12, 2022 · 6 comments
Open

mkdir wal: permission denied\nerror #15

mrmodolo opened this issue Feb 12, 2022 · 6 comments

Comments

@mrmodolo
Copy link

Hi!

The last version caused the error "mkdir wal: permission denied\nerror" to resolve I changed the configuration file "~/.loki-shell/config/loki-binary-config.yaml" and added the lines below in the ingester section:

  wal:
    dir: ~/.cache/loki/wal

I created the folder and restarted the service.

mkdir ~/.cache/loki/wal

Thanks,
Marcelo Módolo

@tonywl
Copy link

tonywl commented Jun 20, 2022

Also saw the same error, but the change above didn't seem to help, any suggestions?

level=info ts=2022-06-20T23:31:57.390152638Z caller=table_manager.go:340 msg="loading local table index_19161"
level=info ts=2022-06-20T23:31:57.394115301Z caller=table_manager.go:340 msg="loading local table index_19162"
level=info ts=2022-06-20T23:31:57.397997915Z caller=shipper_index_client.go:108 msg="starting boltdb shipper in 0 mode"
level=info ts=2022-06-20T23:31:57.398467226Z caller=worker.go:109 msg="Starting querier worker using query-scheduler and scheduler ring for addresses"
level=info ts=2022-06-20T23:31:57.398543411Z caller=modules.go:598 msg="RulerStorage is nil.  Not starting the ruler."
level=error ts=2022-06-20T23:31:57.399597696Z caller=log.go:106 msg="error running loki" err="mkdir wal: permission denied\nerror initialising module: ingester\ngithub.com/grafana/dskit/modules.(*Manager).initModule\n\t/src/loki/vendor/github.com/grafana/dskit/modules/modules.go:108\ngithub.com/grafana/dskit/modules.(*Manager).InitModuleServices\n\t/src/loki/vendor/github.com/grafana/dskit/modules/modules.go:78\ngithub.com/grafana/loki/pkg/loki.(*Loki).Run\n\t/src/loki/pkg/loki/loki.go:322\nmain.main\n\t/src/loki/cmd/loki/main.go:96\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:255\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1581"

@slim-bean
Copy link
Owner

slim-bean commented Jul 26, 2022

what was listed above should have worked?

I will note that the config @mrmodolo mentioned is not a top level config, wal is under the ingester top level config like so:

ingester:
  wal:
    dir: [path to some directory that the process has write permissions to]

@MattSWakefield
Copy link

MattSWakefield commented Jul 29, 2022

I'm also seeing this issue. I've set 777 permissions on the directory but it still persists. Config is as follows:

ingester:
  lifecycler:
    address: 127.0.0.1
    ring:
      kvstore:
        store: inmemory
      replication_factor: 1
    final_sleep: 0s
  wal:
    dir: ~/.cache/loki/wal/

@tonywl
Copy link

tonywl commented Jul 29, 2022

@MattSWakefield there are separate config files for docker and binary installation, you probably need to update the one for your install.

If you don't have your own configuration, you can just move/remove the config dir and do a reinstall, that'll also create the correct file, I believe.

@MattSWakefield
Copy link

@tonywl - thank you - I am running in docker, I forgot to mention that. I have done as suggested and I've tried altering the location, creating the wal directory first etc but it always hits a permissions issue even if the permissions are much more open than they should be.

@Djun-Kim-at-LDS
Copy link
Contributor

ingester.wal.dir should be a path in the loki container's file system. Since ~/.loki-shell/data is already mounted to /loki in the container, this should work:

  wal:
    dir: /loki/.cache/loki/wal/

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

No branches or pull requests

5 participants