chirpstack / chirpstack-gateway-bridge

ChirpStack Gateway Bridge abstracts Packet Forwarder protocols into Protobuf or JSON over MQTT.
https://www.chirpstack.io
MIT License
423 stars 272 forks source link

[3.11.0-r2 / Kerlink iFemtoCell] Failed to connect to MQTT broker (OpenVPN) #194

Closed AntoineRichard4137 closed 3 years ago

AntoineRichard4137 commented 3 years ago

Hello,

I open this issue because the version 3.11.0-r2 of Chirpstack Gateway Bridge is unfortunately unusable on our Kerlink iFemtoCell and Kerlink iFemtoCell-evolution gateways.

Here is a description of the involved setup :

Here are the Chirpstack Gateway Bridge startup logs, at maximum logging level. Note that the following informations have been replaced :

Here is the configuration used :

...

[integration]
marshaler="protobuf"

  [integration.mqtt]
  event_topic_template="gateway/{{ .GatewayID }}/event/{{ .EventType }}"
  command_topic_template="gateway/{{ .GatewayID }}/command/#"
  max_reconnect_interval="1m0s"
  terminate_on_connect_error=false

  [integration.mqtt.auth]
  type="generic"

    [integration.mqtt.auth.generic]
    servers=["tcp://{BROKER_IP}:{BROKER_PORT}"]
    qos=1
    clean_session=false
    client_id="{GATEWAY_ID}"
...

I tried to run the software with and without the use of the new connection state messages feature. I also tried to run the software omitting the qos, clean_session, and client_id parameters.

This configuration works perfectly on CSGB v3.10.0-r2.

We use the Kerlink firmware v4.3.3, the latest one up to this date.

brocaar commented 3 years ago

network Error : dial tcp {BROKER_IP}:{BROKER_PORT}: connect: connection refused

That is a network error. The ChirpStack Gateway Bridge is unable to connect to {BROKER_IP}:{BROKER_PORT} because the connection is refused (firewall?).

AntoineRichard4137 commented 3 years ago

network Error : dial tcp {BROKER_IP}:{BROKER_PORT}: connect: connection refused

That is a network error. The ChirpStack Gateway Bridge is unable to connect to {BROKER_IP}:{BROKER_PORT} because the connection is refused (firewall?).

That was not an actual network problem, as I tried the previous version and this one back and forth in the exact same setup.

However, I solved this issue by checking the new version of your documentation out and by installing the generic KerOS version you put out at https://artifacts.chirpstack.io/vendor/kerlink/keros-gws/.

Thank you for your reply.

brocaar commented 3 years ago

Ah, then this issue was probably related to some changes that were made in the latest KerOS firmware. Some paths were updated and the latest generic KerOS package does reflect these changes. Glad to hear the latest package solves the issue :)