Loki.service aborts with error

My YunoHost server

Hardware: Dell Optiplex, Intel i5-3470S
YunoHost version: 11.2.12
I have access to my server : Through SSH | through the webadmin | direct access via keyboard / screen
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
If your request is related to an app, specify its name and version: Promtail/Loki 3.0.0~ynh1

Description of my issue

loki.service does not start.

$ sudo journalctl -u loki.service
[sudo] password for user: 
-- Journal begins at Wed 2024-03-06 12:51:36 CET, ends at Mon 2024-05-27 12:52:19 CEST. --
May 26 18:34:50 servername systemd[1]: Started Loki daemon.
May 26 18:34:50 servername systemd[1]: loki.service: Main process exited, code=exited, status=1/FAILURE
May 26 18:34:50 servername systemd[1]: loki.service: Failed with result 'exit-code'.
-- Boot 9fa26bb5b2df42f4b3cc626c9741c823 --
May 26 18:49:16 servername systemd[1]: Started Loki daemon.
May 26 18:49:19 servername systemd[1]: loki.service: Main process exited, code=exited, status=1/FAILURE
May 26 18:49:19 servername systemd[1]: loki.service: Failed with result 'exit-code'.
-- Boot 3dd36382cf3c46d6bbe5abdd42fe58f7 --
May 27 11:52:47 servername systemd[1]: Started Loki daemon.
May 27 11:52:50 servername systemd[1]: loki.service: Main process exited, code=exited, status=1/FAILURE
May 27 11:52:50 servername systemd[1]: loki.service: Failed with result 'exit-code'.
-- Boot 426160290cfa483a8d8dfc8677d6746f --
May 27 12:44:23 servername systemd[1]: Started Loki daemon.
May 27 12:44:26 servername systemd[1]: loki.service: Main process exited, code=exited, status=1/FAILURE
May 27 12:44:26 servername systemd[1]: loki.service: Failed with result 'exit-code'.

sudo cat /etc/systemd/system/loki.service gives me

...
[Service]
...
ExecStart=/bin/bash -c '/var/www/loki/loki --config.file <(/bin/bash /var/www/loki/merge_yaml.sh /etc/loki/loki-default.yaml /etc/loki/loki.d/*.y{a,}ml)'
...

Executing that manually gives me:

sudo /bin/bash -c '/var/www/loki/loki --config.file <(/bin/bash /var/www/loki/merge_yaml.sh /etc/
loki/loki-default.yaml /etc/loki/loki.d/*.y{a,}ml)'

level=error ts=2024-05-27T11:26:49.146946583Z caller=main.go:66 msg="validating config" err="MULTIPLE CONFIG ERRORS
FOUND, PLEASE READ CAREFULLY\nCONFIG ERROR: schema v13 is required to store Structured Metadata and use native OTLP
ingestion, your schema version is v11. Set `allow_structured_metadata: false` in the `limits_config` section or set
the command line argument `-validation.allow-structured-metadata=false` and restart Loki. Then proceed to update to
schema v13 or newer before re-enabling this config, search for 'Storage Schema' in the docs for the schema update pr
ocedure\nCONFIG ERROR: `tsdb` index type is required to store Structured Metadata and use native OTLP ingestion, you
r index type is `boltdb-shipper` (defined in the `store` parameter of the schema_config). Set `allow_structured_meta
data: false` in the `limits_config` section or set the command line argument `-validation.allow-structured-metadata=
false` and restart Loki. Then proceed to update the schema to use index type `tsdb` before re-enabling this config,
search for 'Storage Schema' in the docs for the schema update procedure"
sudo /bin/bash -c '/var/www/loki/loki --validation.allow-structured-metadata=false --config.file <(/bin/bash /var/www/loki/merge_yaml.sh /etc/loki/loki-default.yaml /etc/loki/loki.d/*.y{a,}ml)'

Adding --validation.allow-structured-metadata=false seems to start the service, although it looks like an ugly bandaid to my untrained eyes.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.