-
Notifications
You must be signed in to change notification settings - Fork 8
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 error creating chunks directory #167
Comments
I have the same errors... can´t start the addon |
Hello same error here... s6-rc: info: service s6rc-oneshot-runner: starting
|
Same for me. |
Same here. I wonder why? |
same for me if it can help there is the log
|
Exact same error for me too. |
+1 Also tried Full log below:
|
Today I've tried to configure promtail and also stucked on this error ( cannot start loki). Logs look more or less the same. |
Hey I just wanted to give an update. I am aware of this issue and am able to reproduce it. I missed it on update because it appears it does not affect existing instances that were updated to the latest version of Loki. I believe because the files it is complaining about already existed and had permissions set correctly. However I am able to reproduce it with an install from scratch and see the same error you all do, it appears the files cannot be created with the correct permissions at the time they are supposed to be anymore. I was in the middle of working on a fix but when we had to rush to the hospital because the baby was coming. So now it will be a little bit before I can get back to it. There's not really a good workaround in the meantime unfortunately. For users willing to dig in a bit there might be a way to get passed this if you have access to the docker CLI from the host shell. What I think would work is installing the addon and then doing the following before starting it:
What that should do is make HA use the image from the previous stable version instead of the latest one. Normally this would be a really bad idea since the addon config is still assuming its running the latest version. But I believe it should be safe in this case since really the only change from Assuming it starts and runs successfully you should then be able to get to
I want to clarify here that I have not tested this. I'm typing this out now because I've done similar things a lot of times in the past and I'm aware of the root cause here. If someone does try it I would appreciate a confirmation that it worked or let me know if not. Will get to the actual issue when I can but may be some time with the newborn. Sorry about that! |
Version 1.10.2 seems to have the same problem as 1.11.2, error when it tries to create the dirs. I made a last try with the 1.9.5 and then it works. Second problem is that the arch type variable is in double brackets so the docker pull command does not work.
It starts and the dirs are created. Stop the addon in homeassistent (the ha addons stop command did not work for me either).
And restart it using the gui. The addon should launch. So basically i removed the double quotes with | tr -d '"' and changed the version number. |
Thanks both @mdegat01 and @madface303 this did indeed help me to work around the problem. |
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks! |
The wrokaround didnt work for me - seems like there is no "docker" command there?
This is when I SSH to the homeassistant addon, as suggested above. Any hints? |
That was it, using right addon the workaround worked like a charm, thank you! |
i followed your modified instructions, but am still getting the same error unfortunately. deleted all my images and tried again to no avail |
Please try again one more time. Delete the addon in home assistant and reinstall.
Look if there aren't any errors after the commands
If not, stop the addon, run
and then restart the addon. If the error persists after the first docker commands i have no idea why. |
@madface303 Thanks for this, it works for me! |
Hi, |
It's a known problem, but the only solution this time is the workaround me and the other posted above. Please read from what i have written in Jan. and the next posts, it should solve your problem. |
I've run the docker commands, it looks like loki and promtail are running perfectly fine, no errors, but cannot connect Grafana:
Is Loki actually getting any data from Promtail, and how do I check this? |
did you resolve this - have the same issue. |
I'm afraid not. I'm not using it, but would like to. |
@codex70 - got it to work - had to switch to a different repo (newer) for Promtail and Loki - https://github.com/bluemaex/home-assistant-addons |
Fantastic news, I will take a look! |
Me too! I have been wanting to use this plugin for a very long time. |
When starting Loki addon I get the following error and Loki stops:
`s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/00-banner.sh
Add-on: Loki
Loki for Home Assistant
Add-on version: 1.11.2
You are running the latest version of this add-on.
System: Home Assistant OS 9.3 (amd64 / generic-x86-64)
Home Assistant Core: 2022.10.5
Home Assistant Supervisor: 2022.10.2
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
cont-init: info: /etc/cont-init.d/00-banner.sh exited 0
cont-init: info: running /etc/cont-init.d/01-log-level.sh
Log level is set to INFO
cont-init: info: /etc/cont-init.d/01-log-level.sh exited 0
cont-init: info: running /etc/cont-init.d/nginx.sh
cont-init: info: /etc/cont-init.d/nginx.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun loki (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
s6-rc: info: service legacy-services successfully started
[14:29:37] INFO: Starting Loki...
[14:29:37] INFO: Using default config
[14:29:37] INFO: Retention period set to 30d
[14:29:37] INFO: Loki log level set to info
[14:29:37] INFO: Handing over control to Loki...
level=info ts=2022-11-04T14:29:38.253016834Z caller=main.go:103 msg="Starting Loki" version="(version=2.6.1, branch=HEAD, revision=6bd05c9a4)"
level=info ts=2022-11-04T14:29:38.253836497Z caller=modules.go:736 msg="RulerStorage is not configured in single binary mode and will not be started."
level=info ts=2022-11-04T14:29:38.254322253Z caller=server.go:288 http=127.0.0.1:8080 grpc=[::]:9095 msg="server listening on addresses"
level=info ts=2022-11-04T14:29:38.259738005Z caller=modules.go:962 msg="failed to initialize usage report" err="mkdir /data/loki/chunks: permission denied"
mkdir /data/loki/chunks: permission denied
error initialising module: compactor
github.com/grafana/dskit/modules.(*Manager).initModule
/src/loki/vendor/github.com/grafana/dskit/modules/modules.go:122
github.com/grafana/dskit/modules.(*Manager).InitModuleServices
/src/loki/vendor/github.com/grafana/dskit/modules/modules.go:92
github.com/grafana/loki/pkg/loki.(*Loki).Run
/src/loki/pkg/loki/loki.go:341
main.main
/src/loki/cmd/loki/main.go:105
runtime.main
/usr/local/go/src/runtime/proc.go:255
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1581
level=error ts=2022-11-04T14:29:38.262652238Z caller=log.go:103 msg="error running loki" err="mkdir /data/loki/chunks: permission denied\nerror initialising module: compactor\ngithub.com/grafana/dskit/modules.(*Manager).initModule\n\t/src/loki/vendor/github.com/grafana/dskit/modules/modules.go:122\ngithub.com/grafana/dskit/modules.(*Manager).InitModuleServices\n\t/src/loki/vendor/github.com/grafana/dskit/modules/modules.go:92\ngithub.com/grafana/loki/pkg/loki.(*Loki).Run\n\t/src/loki/pkg/loki/loki.go:341\nmain.main\n\t/src/loki/cmd/loki/main.go:105\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"
[14:29:38] WARNING: Halt add-on with exit code 1
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped`
The text was updated successfully, but these errors were encountered: