This is documentation for the next version of Grafana Loki documentation. For the latest stable release, go to the latest version.
Troubleshoot Loki operations
This guide helps you troubleshoot errors that occur during Loki operations, including configuration issues, storage backend problems, cluster communication failures, and service component errors. These errors are distinct from ingestion (write path) and query (read path) errors covered in separate troubleshooting topics.
Before you begin, ensure you have the following:
- Access to Loki logs and metrics
- Permissions to view and modify Loki configuration
- Understanding of your deployment topology (single binary/monolithic, simple scalable, microservices/distributed)
Configuration errors
Configuration errors occur during Loki startup or when loading runtime configuration. These errors prevent Loki from starting or operating correctly.
Error: Multiple config errors found
Error message:
MULTIPLE CONFIG ERRORS FOUND, PLEASE READ CAREFULLY
<list of configuration errors>Cause:
Multiple configuration validation errors were detected during startup. Loki aggregates all configuration errors rather than failing on the first one.
Resolution:
Review all listed errors carefully - each error message describes a specific configuration problem.
Check your configuration file for syntax errors and invalid values.
Validate your configuration before applying:
loki -config.file=/path/to/config.yaml -verify-config
Properties:
- Enforced by: Loki startup
- Retryable: No (configuration must be fixed)
- HTTP status: N/A (startup failure)
- Configurable per tenant: No
Error: Too many storage configs
Error message:
too many storage configs provided in the common config, please only define one storage backendCause:
Multiple storage backends are configured in the common configuration section. Loki requires a single storage backend for the common config.
Resolution:
Use only one storage backend in your common config:
common: storage: # Choose only ONE of the following: s3: endpoint: s3.amazonaws.com bucketnames: loki-data # OR gcs: bucket_name: loki-data # OR azure: container_name: loki-dataFor multiple storage backends, configure them explicitly in specific sections rather than common config.
Properties:
- Enforced by: Configuration validation
- Retryable: No
- HTTP status: N/A (startup failure)
- Configurable per tenant: No
Error: Persist tokens path prefix required
Error message:
if persist_tokens is true, path_prefix MUST be definedCause:
The persist_tokens option is enabled for a ring but no path_prefix is specified. Loki needs a path to store the token file.
Resolution:
Set the path prefix:
common: path_prefix: /var/loki persist_tokens: true ingester: lifecycler: ring: kvstore: store: memberlist tokens_file_path: /var/loki/tokensOr disable persist_tokens if you don’t need token persistence:
common:
persist_tokens: falseProperties:
- Enforced by: Configuration validation
- Retryable: No
- HTTP status: N/A (startup failure)
- Configurable per tenant: No
Error: Conflicting gRPC client configs
Error message:
both `grpc_client_config` and (`query_frontend_grpc_client` or `query_scheduler_grpc_client`) are set at the same time. Please use only `query_frontend_grpc_client` and `query_scheduler_grpc_client`Cause:
Both the deprecated grpc_client_config and the newer specific gRPC client configs are set. These are mutually exclusive.
Resolution:
Remove the deprecated config and use specific gRPC client configs:
# Remove this: # grpc_client_config: ... # Use these instead: query_frontend_grpc_client: max_recv_msg_size: 104857600 query_scheduler_grpc_client: max_recv_msg_size: 104857600
Properties:
- Enforced by: Configuration validation
- Retryable: No
- HTTP status: N/A (startup failure)
- Configurable per tenant: No
Error: Schema v13 required for structured metadata
Error message:
CONFIG ERROR: schema v13 is required to store Structured Metadata and use native OTLP ingestion, your schema version is <version>. 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 procedureCause:
Structured metadata is enabled but the active schema version is older than v13. Structured metadata requires schema v13 or newer.
Resolution:
Disable structured metadata temporarily:
limits_config: allow_structured_metadata: falseUpdate your schema config to v13 or newer:
schema_config: configs: - from: "2024-01-01" store: tsdb object_store: s3 schema: v13 index: prefix: index_ period: 24hRe-enable structured metadata after the schema migration is complete.
Properties:
- Enforced by: Configuration validation
- Retryable: No (configuration must be fixed)
- HTTP status: N/A (startup failure)
- Configurable per tenant: No
Error: TSDB index type required for structured metadata
Error message:
CONFIG ERROR: `tsdb` index type is required to store Structured Metadata and use native OTLP ingestion, your index type is `<type>` (defined in the `store` parameter of the schema_config). 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 the schema to use index type `tsdb` before re-enabling this config, search for 'Storage Schema' in the docs for the schema update procedureCause:
Structured metadata is enabled but the active index type is not TSDB. Structured metadata requires the TSDB index type.
Resolution:
Disable structured metadata temporarily and migrate to the TSDB index type:
limits_config: allow_structured_metadata: false schema_config: configs: - from: "2024-01-01" store: tsdb object_store: s3 schema: v13Re-enable structured metadata after migrating to TSDB.
Properties:
- Enforced by: Configuration validation
- Retryable: No (configuration must be fixed)
- HTTP status: N/A (startup failure)
- Configurable per tenant: No
Error: TSDB directories not configured
Error message:
CONFIG ERROR: `tsdb` index type is configured in at least one schema period, however, `storage_config`, `tsdb_shipper`, `active_index_directory` is not set, please set this directly or set `path_prefix:` in the `common:` sectionOr:
CONFIG ERROR: `tsdb` index type is configured in at least one schema period, however, `storage_config`, `tsdb_shipper`, `cache_location` is not set, please set this directly or set `path_prefix:` in the `common:` sectionCause:
The TSDB index type is configured in the schema but required local directories for index files are not set.
Resolution:
Set the common path prefix (simplest approach):
common: path_prefix: /var/lokiOr configure directories explicitly:
storage_config: tsdb_shipper: active_index_directory: /var/loki/tsdb-index cache_location: /var/loki/tsdb-cache
Properties:
- Enforced by: Configuration validation
- Retryable: No (configuration must be fixed)
- HTTP status: N/A (startup failure)
- Configurable per tenant: No
Error: Compactor working directory empty
Error message:
CONFIG ERROR: `compactor:` `working_directory:` is empty, please set a valid directory or set `path_prefix:` in the `common:` sectionCause:
The compactor requires a working directory for index compaction, but none is configured.
Resolution:
Set the common path prefix:
common: path_prefix: /var/lokiOr set the compactor working directory explicitly:
compactor: working_directory: /var/loki/compactor
Properties:
- Enforced by: Configuration validation
- Retryable: No (configuration must be fixed)
- HTTP status: N/A (startup failure)
- Configurable per tenant: No
Error: Index cache validity conflict
Error message:
CONFIG ERROR: the active index is <type> which is configured to use an `index_cache_validity` (TTL) of <duration>, however the chunk_retain_period is <duration> which is LESS than the `index_cache_validity`. This can lead to query gaps, please configure the `chunk_retain_period` to be greater than the `index_cache_validity`Cause:
The chunk retain period is shorter than the index cache validity (TTL), which can cause query gaps where data exists in the index cache but the chunks have already been flushed and removed from ingesters.
Resolution:
Increase the chunk retain period to be greater than the index cache validity:
ingester: chunk_retain_period: 15m # Must be > index_cache_validity storage_config: index_cache_validity: 5m
Properties:
- Enforced by: Configuration validation
- Retryable: No (configuration must be fixed)
- HTTP status: N/A (startup failure)
- Configurable per tenant: No
Error: Invalid target with legacy read mode
Error message:
CONFIG ERROR: invalid target, cannot run backend target with legacy read modeCause:
The backend target is configured while legacy read mode is enabled. These are incompatible deployment configurations.
Resolution:
Disable legacy read mode if using the
backendtarget:# Remove or set to false: legacy_read_mode: falseOr use a different target compatible with legacy read mode.
Properties:
- Enforced by: Configuration validation
- Retryable: No (configuration must be fixed)
- HTTP status: N/A (startup failure)
- Configurable per tenant: No
Error: Unrecognized index or store type
Error message:
unrecognized `store` (index) type `<type>`, choose one of: <supported_types>Or:
unrecognized `object_store` type `<type>`, which also does not match any named_stores. Choose one of: <supported_types>. Or choose a named_storeCause:
The schema configuration references an index type or object store type that Loki does not recognize.
Resolution:
Use a supported index type:
tsdb(recommended) orboltdb-shipperUse a supported object store type:
s3,gcs,azure,swift,filesystem,bosOr reference a valid named store defined in your configuration:
storage_config: named_stores: aws: my-store: endpoint: s3.amazonaws.com bucketnames: my-bucket schema_config: configs: - from: 2024-01-01 store: tsdb object_store: my-store # References the named store
Properties:
- Enforced by: Configuration validation
- Retryable: No (configuration must be fixed)
- HTTP status: N/A (startup failure)
- Configurable per tenant: No
Error: Overrides exporter requires runtime configuration
Error message:
overrides-exporter has been enabled, but no runtime configuration file was configuredCause:
The overrides-exporter target is enabled but no runtime configuration file is provided. The overrides-exporter needs a runtime config to expose tenant-specific limit overrides as metrics.
Resolution:
Configure a runtime configuration file:
runtime_config: file: /etc/loki/runtime-config.yamlOr disable the overrides-exporter if not needed by removing it from your target list.
Properties:
- Enforced by: Module initialization
- Retryable: No (configuration must be fixed)
- HTTP status: N/A (startup failure)
- Configurable per tenant: No
Error: Invalid override for tenant
Error message:
invalid override for tenant <tenant>: <details>Cause:
The runtime configuration file contains an invalid override for a specific tenant. The override failed validation.
Resolution:
- Review the runtime config file for the specified tenant.
- Validate the override values against the limits configuration schema.
- Fix invalid values such as negative durations, invalid label matchers, or out-of-range settings.
Properties:
- Enforced by: Runtime configuration loader
- Retryable: No (runtime config must be fixed)
- HTTP status: N/A (runtime config reload failure)
- Configurable per tenant: Yes
Error: Retention period too short
Error message:
retention period must be >= 24h was <duration>Cause:
A stream-level retention rule specifies a retention period shorter than 24 hours, which is the minimum allowed.
Resolution:
Set retention periods to at least 24 hours:
limits_config: retention_stream: - selector: '{namespace="dev"}' priority: 1 period: 24h # Must be >= 24h
Properties:
- Enforced by: Configuration validation
- Retryable: No (configuration must be fixed)
- HTTP status: N/A (startup failure)
- Configurable per tenant: Yes
Error: Invalid query store max look back period
Error message:
it is an error to specify a non zero `query_store_max_look_back_period` value when using any object store other than `filesystem`Cause:
The query_store_max_look_back_period is set to a non-zero value with a storage backend other than filesystem. This setting only applies to local filesystem storage.
Resolution:
Remove the setting if using object storage:
# Remove or set to 0: query_store_max_look_back_period: 0Or use filesystem storage if this setting is needed for local development.
Properties:
- Enforced by: Configuration validation
- Retryable: No (configuration must be fixed)
- HTTP status: N/A (startup failure)
- Configurable per tenant: No
Authentication and tenant errors
Authentication and tenant errors occur when requests are missing required tenant identification or when tenant IDs are invalid. In multi-tenant mode, every request must include a valid tenant ID.
Error: No org ID
Error message:
no org idCause:
A request was made to Loki without the required X-Scope-OrgID header. In multi-tenant mode, every request must identify the tenant.
Resolution:
Add the
X-Scope-OrgIDheader to your requests:curl -H "X-Scope-OrgID: my-tenant" http://loki:3100/loki/api/v1/push ...For Grafana, configure the tenant ID in the Loki data source settings under “HTTP Headers”.
For Alloy, set the tenant ID in the
loki.writecomponent:loki.write "default" { endpoint { url = "http://loki:3100/loki/api/v1/push" tenant_id = "my-tenant" } }Disable multi-tenancy for single-tenant deployments:
auth_enabled: false
Properties:
- Enforced by: Authentication middleware
- Retryable: Yes (with tenant ID)
- HTTP status: 401 Unauthorized
- Configurable per tenant: No
Error: Multiple org IDs present
Error message:
multiple org IDs presentCause:
The request contains multiple different tenant IDs, but the operation requires a single tenant. This can happen when a request is forwarded through multiple proxies that each inject a tenant ID.
Resolution:
Ensure only one tenant ID is set in the
X-Scope-OrgIDheader.Check proxy configurations for conflicting tenant ID injection.
For cross-tenant queries, use pipe-separated tenant IDs only where supported:
curl -H "X-Scope-OrgID: tenant1|tenant2" http://loki:3100/loki/api/v1/query ...
Properties:
- Enforced by: Tenant resolver
- Retryable: Yes (with correct tenant ID)
- HTTP status: 400 Bad Request
- Configurable per tenant: No
Error: Tenant ID too long
Error message:
tenant ID is too long: max 150 charactersCause:
The tenant ID exceeds the maximum allowed length of 150 characters.
Resolution:
- Use a shorter tenant ID (maximum 150 characters).
Properties:
- Enforced by: Tenant validation
- Retryable: Yes (with valid tenant ID)
- HTTP status: 400 Bad Request
- Configurable per tenant: No
Error: Unsafe tenant ID
Error message:
tenant ID is '.' or '..'Cause:
The tenant ID is set to . or .., which are reserved filesystem path components and could cause path traversal issues.
Resolution:
- Choose a different tenant ID that is not
.or...
Properties:
- Enforced by: Tenant validation
- Retryable: Yes (with valid tenant ID)
- HTTP status: 400 Bad Request
- Configurable per tenant: No
Error: Tenant ID contains unsupported character
Error message:
tenant ID '<id>' contains unsupported character '<char>'Cause:
The tenant ID contains characters that are not allowed. Tenant IDs must consist of alphanumeric characters, hyphens, underscores, and periods.
Resolution:
- Use only supported characters in your tenant ID: letters, numbers, hyphens (
-), underscores (_), and periods (.).
Properties:
- Enforced by: Tenant validation
- Retryable: Yes (with valid tenant ID)
- HTTP status: 400 Bad Request
- Configurable per tenant: No
Error: Deletion not available for tenant
Error message:
deletion is not available for this tenantCause:
A delete request was submitted for a tenant that does not have deletion enabled. Log deletion must be explicitly enabled per tenant.
Resolution:
Enable deletion for the tenant in the runtime configuration:
overrides: my-tenant: deletion_mode: filter-and-delete # Or "filter-only"Valid deletion modes:
disabled- Deletion is not allowed (default)filter-only- Lines matching delete requests are filtered at query time but not physically deletedfilter-and-delete- Lines are filtered at query time and physically deleted during compaction
Ensure the compactor is configured for retention:
compactor: retention_enabled: true delete_request_store: s3
Properties:
- Enforced by: Compactor deletion handler
- Retryable: No (configuration must change)
- HTTP status: 403 Forbidden
- Configurable per tenant: Yes



