Closed Sheng2216 closed 1 year ago
Hello, The MQTT Forwarder tries to connect to the Concentratord using a socket. By default these are the sockets created by the Concentratord:
concentratord.toml
:
# Configuration for the (ZeroMQ based) API.
[concentratord.api]
# Event PUB socket bind.
event_bind="ipc:///tmp/concentratord_event"
# Command REP socket bind.
command_bind="ipc:///tmp/concentratord_command"
chirpstack-mqtt-forwarder.toml
:
# ChirpStack Concentratord backend configuration.
[backend.concentratord]
# Event API URL.
event_url="ipc:///tmp/concentratord_event"
# Command API URL.
command_url="ipc:///tmp/concentratord_command"
I have not tested this, but I expect the solution would be to have a shared volume between the two containers which can be used by the Concentratord for creating the sockets, and for the MQTT Forwarder to connect to the Concentratord using these sockets.
I have not tested this, but I expect the solution would be to have a shared volume between the two containers which can be used by the Concentratord for creating the sockets, and for the MQTT Forwarder to connect to the Concentratord using these sockets.
it works, thank you!
version: "3"
services:
concentratord_slot2:
build:
context: ./chirpstack_concentratord_sx1302_docker/
dockerfile: ./Dockerfile
restart: unless-stopped
volumes:
# Mount the shared volume for the socket files
- concentratord_sockets:/tmp/
- ./configuration/concentratord/concentratord.toml:/app/concentratord.toml:ro
mqtt_forwarder_local:
build:
context: ./chirpstack_mqtt_forwarder_docker/
dockerfile: ./Dockerfile
restart: unless-stopped
ports:
- "1700:1700/udp"
volumes:
# Mount the shared volume for the socket files
- concentratord_sockets:/tmp/
- ./configuration/chirpstack-mqtt-forwarder/chirpstack-mqtt-forwarder-local.toml:/app/chirpstack-mqtt-forwarder.toml:ro
depends_on:
# - chirpstack
- concentratord_slot2
volumes:
concentratord_sockets:
Hello, I have put the concentratord and chirpstack-mqtt-forwarder binaries into two separate containers and created a docker-compose file to ease deployment. However, the chirpstack-mqtt-forwarder container always stops at the 'reading gateway id' step. When I put both binaries in the same container, it works well and the chirpstack-mqtt-forwarder is able to read the gateway ID
I'm new to ZeroMQ, but I'm wondering if the issue is related to the fact that although the two containers are in the same network, ZeroMQ is using a different IP address for communication. Can you please help me understand why the chirpstack-mqtt-forwarder container is unable to read the gateway ID when it is in a separate container from the concentratord container? Thank you.
here is the docker-compose log:
and here is the docker-compose file(The Dockerfile only copies the compiled binaries into the container):
Thank you in advance. I appreciate your help with this.