Grafana Unable to connect with Loki. Please check the server logs for more details

Hiya folks – this error is rather generic and be caused by a lot of different factors. I’m going to close this thread as a result, but with a summary of what we’re discussing here, and some pointers on what to check out.

You can open an additional question but please provide more information and please try these items first.

Summary: The thread discusses issues with connecting Grafana to Loki as a data source, primarily focusing on DNS resolution and service accessibility within Kubernetes and OpenShift environments. People face issues due to incorrect service URL configuration, and it’s really important to check component logs for errors and report what they say so others can help. @phamthanhalv suggested updating the Loki image to version 2.9.3, which resolved their issue.

Recommendations if you’re having this problem

  • Ensure correct DNS resolution for Loki’s service URL in your Grafana configuration.
  • Verify that the Loki service is accessible from the Grafana pod using the correct namespace and service name.
  • Consider updating the Loki image to the latest stable version if encountering persistent issues.
  • Check the logs of Loki components for any errors or misconfigurations.
  • If using multi-tenant mode, ensure the X-Scope-OrgID header is correctly configured in Grafana.
  • For OpenShift users, ensure that the Loki distributed mode is correctly set up and all components are functioning.

Other resources which might help:

1 Like