Loki: Bad Gateway. 502 and 404 page not found errors (binary setup)

Hi,
I’m new to Loki, I’ve just installed the binary (version 2.3.0) on Linux Ubuntu 21.04.
Copied it to /usr/local/bin and launched it with: /usr/local/bin/loki-linux-amd64 -config.file=/etc/loki/loki-local-config.yaml
The service is properly running on ports 3100 and 9096.
Trying to create a datasource in Grafana, an error shows up: Loki: Bad Gateway. 502. Trying to open http://localhost:9100, 404 page not found error shows up…
/var/log/syslog doesn’t show any error…
Any clue?

I’m new to Loki, I’ve just installed the binary (version 2.3.0) on Linux
Ubuntu 21.04.

Out of interest, what instructions did you follow to install it?

Copied it to /usr/local/bin and launched it with:
/usr/local/bin/loki-linux-amd64 -config.file=/etc/loki/loki-local-config.yaml
The service is properly running on ports 3100 and 9096.

Okay…

Trying to create a datasource in Grafana, an error shows up: Loki: Bad
Gateway. 502.

So, Grafana can’t find the service listening where it expects it to be.

Trying to open http://localhost:9100,

Why port 9100, when you say the service is running on ports 3100 and 9096?

404 page not found error shows up… /var/log/syslog doesn’t show any
error…
Any clue?

Which port/s have you told Loki to listen on, and which port/s are you telling
Grafana to look for it on?

Antony.

Sorry my mistake… FGS…
There was a typo in the datasource URL (locahost instead of localhost…)
Datasource is now working!