mdegat01 / addon-loki Goto Github PK
View Code? Open in Web Editor NEWLoki for Home Assistant
License: MIT License
Loki for Home Assistant
License: MIT License
Describe the bug
AppArmor errors for Loki trying to access files as of version 2.4.0 in the latest version of this addon
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should start, does not
Logs
From the audit log of the system
| 2021-11-10 16:26:13 | AVC apparmor="DENIED" operation="mkdir" profile="7eb274d5_loki//loki" name="/run/s6/services/loki/wal/" pid=3800552 comm="loki" requested_mask="c" denied_mask="c" fsuid=12345 ouid=12345
-- | -- | --
| 2021-11-10 16:26:13 | AVC apparmor="DENIED" operation="open" profile="7eb274d5_loki//loki" name="/proc/768/cpuset" pid=3800552 comm="loki" requested_mask="r" denied_mask="r" fsuid=12345 ouid=12345
-- | -- | --
Environment (please complete the following information):
Additional context
Describe the bug
The addon will not run on the latest Home Assistant operating system for me. Get errors on launch, which persist on restart.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The service will run. In this case, it does not.
Logs
Add-On logs:
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...
-----------------------------------------------------------
Add-on: Loki
Loki for Home Assistant
-----------------------------------------------------------
Add-on version: 1.10.2
You are running the latest version of this add-on.
System: Home Assistant OS 8.2 (aarch64 / raspberrypi4-64)
Home Assistant Core: 2022.7.2
Home Assistant Supervisor: 2022.07.0
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] nginx.sh: executing...
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[17:40:49] INFO: Starting Loki...
[17:40:49] INFO: Using default config
[17:40:50] INFO: Retention period set to 60d
[17:40:50] INFO: Loki log level set to info
[17:40:50] INFO: Handing over control to Loki...
level=info ts=2022-07-10T22:40:50.749325721Z caller=main.go:106 msg="Starting Loki" version="(version=2.5.0, branch=HEAD, revision=2d9d0ee23)"
level=info ts=2022-07-10T22:40:50.750926189Z caller=server.go:260 http=127.0.0.1:8080 grpc=[::]:9095 msg="server listening on addresses"
level=info ts=2022-07-10T22:40:50.751668795Z caller=modules.go:597 msg="RulerStorage is not configured in single binary mode and will not be started."
level=warn ts=2022-07-10T22:40:50.752888341Z caller=experimental.go:20 msg="experimental feature in use" feature="In-memory (FIFO) cache"
level=error ts=2022-07-10T22:40:50.754131183Z caller=log.go:100 msg="error running loki" err="mkdir /data/loki/chunks: permission denied\nerror creating index client\ngithub.com/grafana/loki/pkg/storage/chunk/storage.NewStore\n\t/src/loki/pkg/storage/chunk/storage/factory.go:219\ngithub.com/grafana/loki/pkg/loki.(*Loki).initStore\n\t/src/loki/pkg/loki/modules.go:394\ngithub.com/grafana/dskit/modules.(*Manager).initModule\n\t/src/loki/vendor/github.com/grafana/dskit/modules/modules.go:106\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:339\nmain.main\n\t/src/loki/cmd/loki/main.go:108\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:255\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_arm64.s:1133\nerror initialising module: store\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:339\nmain.main\n\t/src/loki/cmd/loki/main.go:108\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:255\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_arm64.s:1133"
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing...
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
Environment (please complete the following information):
Thank you!
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`
Describe the bug
After the recent update (1.9.2) Loki refuses to start
To Reproduce
Expected behavior
A clear and concise description of what you expected to happen.
Logs
# docker logs 477a9e748e52 -f
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] permissions: applying...
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing...
/var/run/s6/etc/cont-finish.d/99-message.sh: line 6: S6_STAGE2_EXITED: unbound variable
[cont-finish.d] 99-message.sh: exited 1.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
Environment (please complete the following information):
Additional context
The Loki container CPU is high
CONTAINER ID NAME CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS
a56d9128106d addon_39bd2704_loki 86.19% 2.324MiB / 7.628GiB 0.03% 45.8kB / 1.13kB 0B / 307kB 19
Today I installed HA Operating system on a RPI4
As first addon I tried to install promtail.
When adding this repository I got the following errror.
Am I doing something wrong wrong ??
22-01-01 18:09:12 INFO (MainThread) [supervisor.store.git] Cloning add-on https://github.com/mdegat01/addon-loki repository
22-01-01 18:09:13 ERROR (MainThread) [supervisor.store] https://github.com/mdegat01/addon-loki is not a valid add-on repository
22-01-01 18:09:13 INFO (MainThread) [supervisor.resolution.module] Create new issue IssueType.CORRUPT_REPOSITORY - ContextType.STORE / b6c46743
22-01-01 18:09:13 INFO (MainThread) [supervisor.resolution.module] Create new suggestion SuggestionType.EXECUTE_REMOVE - ContextType.STORE / b6c46743
22-01-01 18:09:14 WARNING (MainThread) [supervisor.store.data] No repository information exists at /data/addons/git/b6c46743
22-01-01 18:09:16 INFO (MainThread) [supervisor.store] Loading add-ons from store: 62 all - 0 new - 0 remove
22-01-01 18:09:16 INFO (MainThread) [supervisor.resolution.fixups.store_execute_remove] Remove invalid Store: b6c46743
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.