Loki gives 404 page not found error

here is what localhost:3100 looks like:

Here is what cmd looks like:

Microsoft Windows [Version 10.0.19045.4780]
(c) Microsoft Corporation. All rights reserved.

C:\Users\umutc\Desktop\LokiPromtail>.\loki-windows-amd64.exe --config.file=loki-local-config.yaml
level=info ts=2024-08-20T15:15:36.2277444Z caller=main.go:126 msg="Starting Loki" version="(version=3.1.1, branch=release-3.1.x, revision=89fe788d)"
level=info ts=2024-08-20T15:15:36.2282511Z caller=main.go:127 msg="Loading configuration file" filename=loki-local-config.yaml
level=info ts=2024-08-20T15:15:36.2304767Z caller=server.go:352 msg="server listening on addresses" http=[::]:3100 grpc=[::]:9096
level=info ts=2024-08-20T15:15:36.2360109Z caller=table_manager.go:136 index-store=tsdb-2020-10-24 msg="uploading tables"
level=info ts=2024-08-20T15:15:36.2360109Z caller=table_manager.go:280 index-store=tsdb-2020-10-24 msg="query readiness setup completed" duration=0s distinct_users_len=0 distinct_users=
level=info ts=2024-08-20T15:15:36.2365446Z caller=shipper.go:160 index-store=tsdb-2020-10-24 msg="starting index shipper in RW mode"
level=info ts=2024-08-20T15:15:36.2376344Z caller=head_manager.go:308 index-store=tsdb-2020-10-24 component=tsdb-head-manager msg="loaded wals by period" groups=0
level=info ts=2024-08-20T15:15:36.2381709Z caller=manager.go:86 index-store=tsdb-2020-10-24 component=tsdb-manager msg="loaded leftover local indices" err=null successful=true buckets=0 indices=0 failures=0
level=info ts=2024-08-20T15:15:36.2381709Z caller=head_manager.go:308 index-store=tsdb-2020-10-24 component=tsdb-head-manager msg="loaded wals by period" groups=0
level=info ts=2024-08-20T15:15:36.2408523Z caller=mapper.go:47 msg="cleaning up mapped rules directory" path=/tmp/loki/rules-temp
level=info ts=2024-08-20T15:15:36.2459895Z caller=worker.go:130 component=querier msg="Starting querier worker using query-scheduler and scheduler ring for addresses"
level=info ts=2024-08-20T15:15:36.8622658Z caller=module_service.go:82 msg=starting module=server
level=info ts=2024-08-20T15:15:36.8622658Z caller=module_service.go:82 msg=starting module=query-frontend-tripperware
level=info ts=2024-08-20T15:15:36.8622658Z caller=module_service.go:82 msg=starting module=cache-generation-loader
level=info ts=2024-08-20T15:15:36.8622658Z caller=module_service.go:82 msg=starting module=memberlist-kv
level=info ts=2024-08-20T15:15:36.8622658Z caller=module_service.go:82 msg=starting module=query-scheduler-ring
level=info ts=2024-08-20T15:15:36.8622658Z caller=module_service.go:82 msg=starting module=ring
level=info ts=2024-08-20T15:15:36.8622658Z caller=module_service.go:82 msg=starting module=store
level=info ts=2024-08-20T15:15:36.8622658Z caller=ring.go:297 msg="ring doesn't exist in KV store yet"
level=info ts=2024-08-20T15:15:36.8622658Z caller=ring.go:297 msg="ring doesn't exist in KV store yet"
level=info ts=2024-08-20T15:15:36.8622658Z caller=module_service.go:82 msg=starting module=ingester-querier
level=info ts=2024-08-20T15:15:36.8622658Z caller=module_service.go:82 msg=starting module=analytics
level=info ts=2024-08-20T15:15:36.8622658Z caller=basic_lifecycler.go:297 msg="instance not found in the ring" instance=DESKTOP-FHLS07P ring=scheduler
level=info ts=2024-08-20T15:15:36.862774Z caller=basic_lifecycler_delegates.go:63 msg="not loading tokens from file, tokens file path is empty"
level=info ts=2024-08-20T15:15:36.8627989Z caller=module_service.go:82 msg=starting module=distributor
level=info ts=2024-08-20T15:15:36.8627989Z caller=module_service.go:82 msg=starting module=compactor
level=info ts=2024-08-20T15:15:36.8627989Z caller=module_service.go:82 msg=starting module=ruler
level=info ts=2024-08-20T15:15:36.8627989Z caller=module_service.go:82 msg=starting module=ingester
level=info ts=2024-08-20T15:15:36.8627989Z caller=ruler.go:533 msg="ruler up and running"
level=error ts=2024-08-20T15:15:36.8627989Z caller=ratestore.go:109 msg="error getting ingester clients" err="empty ring"
level=info ts=2024-08-20T15:15:36.8627989Z caller=ring.go:297 component=distributor msg="ring doesn't exist in KV store yet"
level=info ts=2024-08-20T15:15:36.8627989Z caller=ingester.go:476 component=ingester msg="recovering from checkpoint"
level=info ts=2024-08-20T15:15:36.8627989Z caller=basic_lifecycler.go:297 msg="instance not found in the ring" instance=DESKTOP-FHLS07P ring=compactor
level=info ts=2024-08-20T15:15:36.8627989Z caller=ringmanager.go:186 msg="waiting until scheduler is JOINING in the ring"
level=info ts=2024-08-20T15:15:36.8627989Z caller=basic_lifecycler_delegates.go:63 msg="not loading tokens from file, tokens file path is empty"
level=info ts=2024-08-20T15:15:36.8627989Z caller=ring.go:297 msg="ring doesn't exist in KV store yet"
level=info ts=2024-08-20T15:15:36.8627989Z caller=basic_lifecycler.go:297 component=distributor msg="instance not found in the ring" instance=DESKTOP-FHLS07P ring=distributor
level=info ts=2024-08-20T15:15:36.8627989Z caller=compactor.go:410 msg="waiting until compactor is JOINING in the ring"
level=info ts=2024-08-20T15:15:36.8638991Z caller=ingester.go:492 component=ingester msg="recovered WAL checkpoint recovery finished" elapsed=1.1002ms errors=false
level=info ts=2024-08-20T15:15:36.8638991Z caller=ingester.go:498 component=ingester msg="recovering from WAL"
level=info ts=2024-08-20T15:15:36.8638991Z caller=ingester.go:514 component=ingester msg="WAL segment recovery finished" elapsed=1.1002ms errors=false
level=info ts=2024-08-20T15:15:36.8638991Z caller=ingester.go:462 component=ingester msg="closing recoverer"
level=info ts=2024-08-20T15:15:36.8638991Z caller=ingester.go:470 component=ingester msg="WAL recovery finished" time=1.1002ms
level=info ts=2024-08-20T15:15:36.8638991Z caller=wal.go:156 msg=started component=wal
level=info ts=2024-08-20T15:15:36.8644686Z caller=lifecycler.go:614 component=ingester msg="not loading tokens from file, tokens file path is empty"
level=info ts=2024-08-20T15:15:36.8644686Z caller=lifecycler.go:639 component=ingester msg="instance not found in ring, adding with no tokens" ring=ingester
level=info ts=2024-08-20T15:15:36.8644686Z caller=lifecycler.go:483 component=ingester msg="auto-joining cluster after timeout" ring=ingester
level=info ts=2024-08-20T15:15:36.8644686Z caller=ingester.go:654 component=ingester msg="sleeping for initial delay before starting periodic flushing" delay=21.782915066s
level=info ts=2024-08-20T15:15:36.9777791Z caller=ringmanager.go:190 msg="scheduler is JOINING in the ring"
level=info ts=2024-08-20T15:15:36.9784082Z caller=ringmanager.go:199 msg="waiting until scheduler is ACTIVE in the ring"
level=info ts=2024-08-20T15:15:37.0563904Z caller=compactor.go:414 msg="compactor is JOINING in the ring"
level=info ts=2024-08-20T15:15:37.0566643Z caller=compactor.go:424 msg="waiting until compactor is ACTIVE in the ring"
level=info ts=2024-08-20T15:15:37.0573708Z caller=compactor.go:428 msg="compactor is ACTIVE in the ring"
level=info ts=2024-08-20T15:15:37.1032384Z caller=ringmanager.go:203 msg="scheduler is ACTIVE in the ring"
level=info ts=2024-08-20T15:15:37.103403Z caller=module_service.go:82 msg=starting module=query-scheduler
level=info ts=2024-08-20T15:15:37.1035695Z caller=module_service.go:82 msg=starting module=query-frontend
level=info ts=2024-08-20T15:15:37.1035695Z caller=module_service.go:82 msg=starting module=querier
level=info ts=2024-08-20T15:15:37.1040918Z caller=loki.go:508 msg="Loki started" startup_time=2.9059102s
level=info ts=2024-08-20T15:15:40.1117282Z caller=scheduler.go:653 msg="this scheduler is in the ReplicationSet, will now accept requests."
level=info ts=2024-08-20T15:15:40.1117282Z caller=worker.go:231 component=querier msg="adding connection" addr=127.0.0.1:9096
level=info ts=2024-08-20T15:15:42.0575595Z caller=compactor.go:489 msg="this instance has been chosen to run the compactor, starting compactor"
level=info ts=2024-08-20T15:15:42.0575595Z caller=compactor.go:518 msg="waiting 10m0s for ring to stay stable and previous compactions to finish before starting compactor"
level=info ts=2024-08-20T15:15:47.1052178Z caller=frontend_scheduler_worker.go:106 msg="adding connection to scheduler" addr=127.0.0.1:9096
level=error ts=2024-08-20T15:16:06.8668199Z caller=recalculate_owned_streams.go:55 msg="failed to get token ranges for ingester" err="zone not set"
level=info ts=2024-08-20T15:16:36.2470491Z caller=table_manager.go:136 index-store=tsdb-2020-10-24 msg="uploading tables"
level=info ts=2024-08-20T15:17:36.2469779Z caller=table_manager.go:136 index-store=tsdb-2020-10-24 msg="uploading tables"

can you help?

Loki doesn’t have “UI”, so there is nothing on the root as I know (so response 404 is correct). Use some official API endpoint, when you need some proper API response - to see something to prove that Loki is responding. E.g. some status endpoint:

1 Like