Issue connecting rPi gateway to AWS

Hey all I will describe my setup and issue here and would love if someone can identify the gaps in my understand.

I have an rPi running chirpstack and I’m trying to connect the gateway to my remote vm on AWS. From within the rPi I am able to publish an mqtt message that is received on the aws VM. But I cannot get chirpstack to recognize the gateway and keep getting connection refused in System Logs.

  1. I confirmed the remote server address was correct
  2. using tcp and I set AWS to allow from all (0.0.0.0/0)
  3. I used the correct username and password in chirpstack config GUI

What am I missing here?

Few questions:

  • You installed Chirpstack Gateway OS base install on the Pi? And these ‘connection refused’ logs are from your Pi?
  • You are directing the MQTT forwarder on your Pi to the remote address of your AWS instance, and at port 1883?
  • Any errors on the server side logs?
  1. I installed the Full version of the Gateway OS.
  2. Yea as far as I know (see image)
  3. Here are the logs. The last two entries repeat over and over alternative between two client IDs.

Fri May 30 00:53:52 2025 user.info chirpstack-concentratord-sx1302[2068]: Publishing stats event, rx_received: 0, rx_received_ok: 0, tx_received: 0, tx_emitted: 0

Fri May 30 00:53:52 2025 user.info chirpstack-mqtt-forwarder[2489]: Received gateway stats
Fri May 30 00:53:52 2025 user.info chirpstack-mqtt-forwarder[2489]: Sending gateway stats event, topic: us915_0/gateway/GATEWAYID/event/stats

Fri May 30 00:53:52 2025 daemon.notice mosquitto[1348]: 1748566432: New connection from 127.0.0.1:45488 on port 1883.

Fri May 30 00:53:52 2025 daemon.notice mosquitto[1348]: 1748566432: Client AAAA disconnected, not authorised.

Fri May 30 00:53:53 2025 daemon.notice mosquitto[1348]: 1748566433: New connection from ::1:34178 on port 1883.

Fri May 30 00:53:53 2025 daemon.notice mosquitto[1348]: 1748566433: Client BBBB disconnected, not authorised.

If the Pi is being used purely as a gateway, the full install is unnecessary and you should go with the base install to free up some space on the Pi. It’s not a big deal though.

Okay well the issue is just with the authentication. How did you configure your mosquitto.conf?

Can you mosquitto_sub to your broker using your supposedly correct username/password?

It’s fine there is enough space on the Pi. I’m just focused on getting it to work right now.

Are you asking about the file on the gateway or the remote instance? I am using docker on ec2 instance.

Screenshot 2025-06-01 at 10.05.23 AM

mosquitto.conf

listener 1883
password_file /home/ubuntu/chirpstack-docker/configuration/mosquitto/config/passwd
allow_anonymous false

I was able to send a message from gateway to the remote instance with pub/sub and username password in the request.