Giter Club home page Giter Club logo

addon-loki's People

Contributors

dependabot[bot] avatar mdegat01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

addon-loki's Issues

AppArmor denying access to required files in Loki 2.4.0

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:

  1. Install addon
  2. Try and start it

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):

  • Add-on version: 1.9.0
  • Supervisor version: supervisor-2021.10.8
  • Operating system Home Assistant OS 6.6

Additional context

Initial Installation Broken

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:

  1. Install the Loki addon
  2. Leave all settings as default, and hit "Start"

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):

  • Add-on version: 1.10.2
  • Supervisor version: supervisor-2022.07.0
  • Operating system: Home Assistant OS 8.2

Thank you!

Permission error creating chunks directory

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`

Loki addon crashes after update

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):

  • Add-on version: 1.9.2
  • Supervisor version: supervisor-2021.12.9
  • Operating system Home Assistant OS 7.1

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

HA don't like your addon ;)

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.