Loki: Loki: Bad Gateway. 502

Created on 4 Jul 2019  路  6Comments  路  Source: grafana/loki

I am running Loki & Grafana as a standalone container in same host, containers are running fine with NO error.

when I adding Loki data source with local IP (host IP) I am getting following error.

image

But when I adding Loki data source with PUBLIC IP, I got connection.

image

For security reason its not meaning that I have to connect with Public IP.

Please advice.

kinquestion

Most helpful comment

If you're on macos you can try this dns instead: http://docker.for.mac.localhost:3100/

All 6 comments

Hello,

Are you running 2 container ? one for Grafana and one for Loki ?

If so you can't use localhost in Grafana as they don't share the same network stack.

If you need to connect those two containers within the same docker network. https://docs.docker.com/engine/reference/commandline/network_create/#connect-containers

Yes, I am running 2 container. One for Grafana and another one for Loki .

But when I am adding data source not using localhost , using host IP.

If you're on macos you can try this dns instead: http://docker.for.mac.localhost:3100/

I am using Linux but want use using as a standard host ip

Did you tried --network=host?

@Kuqd

Sorry delay in reply.

I tried with --network=host but no luck.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

steven-sheehy picture steven-sheehy  路  4Comments

SuperQ picture SuperQ  路  5Comments

setevoy2 picture setevoy2  路  4Comments

naughtyGitCat picture naughtyGitCat  路  3Comments

kylos101 picture kylos101  路  4Comments