absmach / export

Mainflux Export service that sends messages from one Mainflux cloud to another via MQTT
10 stars 11 forks source link

Error connecting to the broker #33

Closed marijadstankovic closed 3 years ago

marijadstankovic commented 3 years ago

I'm trying to deploy mainflux on raspberry pi 4, mainflux core is working properly, agent. When I try to run export service I get error with message Client export - had error connecting to the broker 2021/11/16 22:37:05 Configuration loaded from file ./export-config.toml {"level":"error","message":"Client export- had error connecting to the broker: Network Error : %!s(<nil>)","ts":"2021-11-17T08:37:05.766113751Z"} {"level":"error","message":"Failed to create service :Network Error : %!s(<nil>)","ts":"2021-11-17T08:37:05.766327877Z"}

I'm following article on medium on using mainflux on edge, but I didn't use this script, I used export-start script (I supposed this was a typo)

Also, I'm not following the article step by step, I built agent and export services on raspberry directly. I also don't use DigitalOcean, mainflux is just deployed on my laptop (and not ui, basic and later I added services missing in comparison to docker-compose in ui). Still agent service on raspberry connected to bootstrap and I got configuration for raspberry.

marijadstankovic commented 3 years ago

Update: when I try to get bootstrap configuration manually I get error "failed to read bootstrap configuration" I changed export-config.toml in export folder and added manually username and password from the same file in agent folder and now the export service is up but how can I check if it's working properly? also in mqtt topic I don't have channel id

mteodor commented 3 years ago

This script creates a config file and sends it to Raspbery via MQTT and agent check https://github.com/mainflux/export/blob/master/scripts/configure.sh#L53

marijadstankovic commented 3 years ago

Yes, thanks! But since I'm using windows and have trouble with the script, I followed the script and wrote the config file manually. at the end of the script there is a command mosquitto_pub -d -u ${thingID} -P ${thingKey} -t channels/$controlChannel/messages/req -h ${MAINFLUX_HOST} -p 1883 -m '[{"bn":"1:", "n":"exec", "vs":"export_start, test"}]' so I started the export_start manually, but I don't understand what this test stands for.