jonas-werner / EdgeX_Tutorial

Repository holding files for EdgeX Foundry tutorial (NOTE: Work in progress as of August 2020)
14 stars 9 forks source link

[Bonus: Visualize data] InfluxDB Error: Bad Gateway #3

Closed C-monC closed 3 years ago

C-monC commented 3 years ago

Hi,

After running the eclipse-mosquitto, influxdb and grafana dockers, I get the following error when I try add a datasource in grafana InfluxDB Error: Bad Gateway.

I am not using a VM - It's a fresh ubuntu 20.04 install. My app.py looks like the following:

broker_address  = "0.0.0.0"
topic           = "edgex-tutorial"
dbhost          = "0.0.0.0"
dbport          = 8086
dbuser          = "root"
dbpassword      = "pass"
dbname          = "sensordata"

and the docker compose:

WRITABLE_PIPELINE_FUNCTIONS_MQTTSEND_ADDRESSABLE_ADDRESS: 0.0.0.0
        WRITABLE_PIPELINE_FUNCTIONS_MQTTSEND_ADDRESSABLE_PORT: 1883
        WRITABLE_PIPELINE_FUNCTIONS_MQTTSEND_ADDRESSABLE_PROTOCOL: tcp
        WRITABLE_PIPELINE_FUNCTIONS_MQTTSEND_ADDRESSABLE_TOPIC: "edgex-tutorial"
        WRITABLE_PIPELINE_FUNCTIONS_MQTTSEND_PARAMETERS_AUTORECONNECT: "true"
        WRITABLE_PIPELINE_FUNCTIONS_MQTTSEND_PARAMETERS_RETAIN: "true"
        WRITABLE_PIPELINE_FUNCTIONS_MQTTSEND_PARAMETERS_PERSISTONERROR: "false"

"Note: There are two entries! Don’t use the loopback address (127.0.0.1) as the ports will clash with the mosquitto MQTT broker."

In the writeup you mention not to use the loopback address. Is using 0.0.0.0 correct if everything is running on the same machine?

C-monC commented 3 years ago

Solved by #2