# Grafana unable to connect to Loki

**URL:** <https://community.grafana.com/t/grafana-unable-to-connect-to-loki/110898>\
**Category:** Grafana Loki\
**Created:** [December 28, 2023, 7:20pm UTC](https://community.grafana.com/t/grafana-unable-to-connect-to-loki/110898 "2023-12-28T19:20:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sawatson](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@sawatson](https://community.grafana.com/u/sawatson)\
**Post date:** [December 28, 2023, 7:20pm UTC](https://community.grafana.com/t/grafana-unable-to-connect-to-loki/110898/1 "2023-12-28T19:20:56Z")

</div>

![image](https://us1.discourse-cdn.com/grafana/original/3X/8/b/8b8f6b33ae2e053c8f2465b5f7d9f9d5c57d56f2.png)

Grafana cannot connect to loki as a data source however I can shell into the grafana pod and connect to loki.

$ curl [http://loki:3100/ready](http://loki:3100/ready)  
ready

I see this error message in the grafana logs.

Host=loki:3100 lokiPath=/loki/api/v1/query status=error error=“parse error at line 1, col 1: syntax error: unexpected IDENTIFIER”  
logger=tsdb.loki endpoint=checkHealth pluginId=loki dsName=Loki dsUID=edca2408-8616-4c2a-b6eb-954aa51980db uname=admin fromAlert=false t=2023-12-28T18:45:43.266236468Z level=error msg=“Error querying loki” error=“parse error at line 1, col 1: syntax error: unexpected IDENTIFIER”

---

<div class="post-metadata">

**Author:** ![edsoncelio](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/edsoncelio/32/38261_2.png) [@edsoncelio](https://community.grafana.com/u/edsoncelio)\
**Post date:** [December 31, 2023, 8:10pm UTC](https://community.grafana.com/t/grafana-unable-to-connect-to-loki/110898/2 "2023-12-31T20:10:32Z")

</div>

Hi @sawatson,

Could you share which version of Loki and Grafana are you using?  
And If applicable, which helm chart?

There’s a recent issue similar in the Grafana repo and it’s related to the Loki-stack helm chart version.  
Link here: [Grafana Loki Integration: Health check fails when Loki is up and functional · Issue #79846 · grafana/grafana · GitHub](https://github.com/grafana/grafana/issues/79846)

---

<div class="post-metadata">

**Author:** ![sawatson](https://avatars.discourse-cdn.com/v4/letter/s/3e96dc/32.png) [@sawatson](https://community.grafana.com/u/sawatson)\
**Post date:** [January 2, 2024, 4:16pm UTC](https://community.grafana.com/t/grafana-unable-to-connect-to-loki/110898/3 "2024-01-02T16:16:12Z")

</div>

I believe that’s the issue.

NAME CHART APP VERSION  
loki loki-stack-2.9.11 v2.6.1

I was able to get it working by removing grafana and enabling Grafana that’s included in the loki-stack.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/grafana/original/2X/e/ef5308cc58c9e5a13187b5012eb99f406928462f.png) [@system](https://community.grafana.com/u/system)\
**Post date:** [January 1, 2025, 4:16pm UTC](https://community.grafana.com/t/grafana-unable-to-connect-to-loki/110898/4 "2025-01-01T16:16:52Z")

</div>

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