Error in tektelic micro gateway

I am using tektelic micro with 3.8 ipk dowloaded and installed on the gateway. When i do tail -f from syslog,I get this message

Apr 10 17:05:44 kona-micro chirpstack-gateway-bridge[3706]: time=“2020-04-10T17:05:44Z” level=error msg=“integration/mqtt: connection error” error=“Network Error : dial tcp 127.0.0.1:1883: connect: connection refused”

do I need to put the real ip of the network server in /etc/default/config.json file? My config,json looks like this per documentation

“SX1301_array_conf”:[ {
“board_freq_band”: “US915”,
“SX1301_conf”:[
{
“chip_enable”: true,
“chan_multiSF_0”: {“chan_rx_freq”: 902300000, “spread_factor”: “7-12” },
“chan_multiSF_1”: {“chan_rx_freq”: 902500000, “spread_factor”: “7-12” },
“chan_multiSF_2”: {“chan_rx_freq”: 902700000, “spread_factor”: “7-12” },
“chan_multiSF_3”: {“chan_rx_freq”: 902900000, “spread_factor”: “7-12” },
“chan_multiSF_4”: {“chan_rx_freq”: 903100000, “spread_factor”: “7-12” },
“chan_multiSF_5”: {“chan_rx_freq”: 903300000, “spread_factor”: “7-12” },
“chan_multiSF_6”: {“chan_rx_freq”: 903500000, “spread_factor”: “7-12” },
“chan_multiSF_7”: {“chan_rx_freq”: 903700000, “spread_factor”: “7-12” },
“chan_LoRa_std” : {“chan_rx_freq”: 903000000, “bandwidth”: 500000, “spread_factor”: 8 },
“chan_FSK” : {“chan_rx_freq”: 903000000, “bandwidth”: 250000, “bit_rate”: 100000 }
}],
“loramac_public”:true,
“aes_key”: “ABCDEF0123456789ABCDEF0123456789”
}],
“gateway_conf”: {
“server_address”: “127.0.0.1”,
“serv_port_up”: 1700,
“serv_port_down”: 1700,

    /* adjust the following parameters for your network */
    "keepalive_interval": 10,
    "stat_interval": 30,
    "push_timeout_ms": 100,
    /* forward only valid packets */
    "forward_crc_valid": true,
    "forward_crc_error": false,
    "forward_crc_disabled": false
}

}
in the file /etc/default/mqtt-bridge.conf i put in the public address of my AWS machine and I enabled port 1883 for everyone(ns_host 34.197.197.48:1883)

where does it get 127.0.0.1:1883 ?

Your config.json for the Semtech packet forwarder should point to where you have the gateway bridge running. If it’s on the gateway, it will be 127.0.0.1. If it’s upstream/cloud, it will be the public-facing hostname.

Thanks for a quick answer.I am running semtech packet forwarder on the gateway. But why i get the error on the gateway

is your mqtt broker listen their port on 127.0.0.1 (localhost)?

in the config of /etc/default/config.json there is 127.0.0.1 but port is 1700 not 1883. how and where do I check mqtt port. if the file /etc/default/mqtt-config.json I put the public ip of the ns.

default mqtt port is 1883 and must be set in each chirpstack app/ns/bridge .toml files
1700 is the gateway bridge port
after you correct port parameters, all will be fine.

I changed file on the host/server in AWS /etc/chirpstack-network-server.toml.In fact in that file server=“tcp://localhost:1883” but now I changed to server=“tcp://34.197.197.48:1883” where NS and AS is installed. I restarted NS server with systemctl restart chirpstack-network-server and received the message in logs Apr 10 19:18:41 ip-172-26-11-1 chirpstack-network-server[22915]: time=“2020-04-10T19:18:41Z” level=info msg=“gateway/mqtt: connecting to mqtt broker” server=“tcp://34.197.197.48:1883”.I then completely restarted the gateway but still get 127.0.0.1:1883

see the chirpstack-gateway-bridge config

chirpstack-gateway-bridge is running on the gateway.Do I need to install on AWS server?

I would re-read https://www.chirpstack.io/overview/architecture/ , I think you may have some confusion on where your MQTT services are running. Make sure you have the optimal locations (for your application) for running the gateway bridge, your MQTT broker, and the network server.

I reviewed the architecture.i have installed gateway-bridge on the same server as NS and AS. I am getting a different error on the gateway

2020 Apr 10 20:21:19 kona-micro time=“2020-04-10T20:21:19Z” level=fatal msg=“setup backend error: new backend error: listen udp error: listen udp 0.0.0.0:1700: bind: address already in use”

The way i understand the message is that 2 processes are binding to 0.0.0.0:1700. But which processes? my monit processes look as following:

Monit 5.25.2 uptime: 47m

Process ‘snmpd’
status OK
monitoring status Monitored
monitoring mode active
on reboot start
pid 1862
parent pid 1
uid 0
effective uid 0
gid 0
uptime 47m
threads 2
children 0
cpu 0.0%
cpu total 0.0%
memory 1.1% [5.6 MB]
memory total 1.1% [5.6 MB]
security attribute -
data collected Fri, 10 Apr 2020 20:20:47

Program ‘snmpverify’
status OK
monitoring status Monitored
monitoring mode active
on reboot start
last exit value 0
last output UCD-SNMP-MIB::memTotalReal.0 = INTEGER: 510356 kB
data collected Fri, 10 Apr 2020 20:20:46

Process ‘pkt-forwarder’
status OK
monitoring status Monitored
monitoring mode active
on reboot start
pid 1947
parent pid 1
uid 0
effective uid 0
gid 0
uptime 47m
threads 6
children 0
cpu 3.2%
cpu total 3.2%
memory 0.4% [1.8 MB]
memory total 0.4% [1.8 MB]
security attribute -
data collected Fri, 10 Apr 2020 20:20:47

File ‘pkt-fwd-token’
status OK
monitoring status Monitored
monitoring mode active
on reboot start
permission 644
uid 0
gid 0
size 0 B
access timestamp Fri, 18 Oct 2019 18:10:18
change timestamp Fri, 18 Oct 2019 18:10:18
modify timestamp Fri, 18 Oct 2019 18:10:18
data collected Fri, 10 Apr 2020 20:20:46

Directory ‘tmp’
status OK
monitoring status Monitored
monitoring mode active
on reboot start
permission 1777
uid 0
gid 0
access timestamp Thu, 01 Jan 1970 00:00:06
change timestamp Fri, 18 Oct 2019 18:10:57
modify timestamp Fri, 18 Oct 2019 18:10:57
data collected Fri, 10 Apr 2020 20:20:46

File ‘commission_db’
status OK
monitoring status Monitored
monitoring mode active
on reboot start
permission 640
uid 0
gid 995
size 6 kB
access timestamp Fri, 18 Oct 2019 18:10:16
change timestamp Fri, 18 Oct 2019 18:10:16
modify timestamp Fri, 18 Oct 2019 18:10:16
data collected Fri, 10 Apr 2020 20:20:46

Process ‘mqtt-bridge’
status OK
monitoring status Monitored
monitoring mode active
on reboot start
pid 1939
parent pid 1
uid 0
effective uid 0
gid 0
uptime 47m
threads 8
children 0
cpu 0.0%
cpu total 0.0%
memory 0.7% [3.3 MB]
memory total 0.7% [3.3 MB]
security attribute -
data collected Fri, 10 Apr 2020 20:20:47

Program ‘mqttbridgeactive’
status OK
monitoring status Monitored
monitoring mode active
on reboot start
last exit value 0
last output 1939
data collected Fri, 10 Apr 2020 20:20:46

Process ‘lora-gateway-bridge’
status Does not exist
monitoring status Monitored
monitoring mode active
on reboot start
data collected Fri, 10 Apr 2020 20:20:46

Process ‘chirpstack-gateway-bridge’
status Does not exist
monitoring status Monitored
monitoring mode active
on reboot start
data collected Fri, 10 Apr 2020 20:20:47

System ‘kona-micro’
status OK
monitoring status Monitored
monitoring mode active
on reboot start
load average [0.35] [0.45] [0.48]
cpu 10.1%us 7.5%sy 0.0%wa
memory usage 17.9 MB [3.6%]
swap usage 0 B [0.0%]
uptime 175d 2h 11m
boot time Fri, 18 Oct 2019 18:09:39
data collected Fri, 10 Apr 2020 20:20:47

What should i stop so the proper process can bind 0.0.0.0:1700?

draw your topology where services is located on which device.

i simply want to use this project to query tektelic kona home sensor using tektelic micro gateway. I loaded AS and NS on amazon virtual instance.I installed AS and NS and GB(gateway-bridge) and amazon instance and loaded tektelic gateway with 3.8.ipk.i am a new to LORA so you need to take it easy on me

what is that?

i suppose in your tektelic installed more than one mqtt bridge.

  1. need to stop one of them.
  2. need to properly configure one of them.

pls. be more informative. and really learn the link from bconway

Then why is your Tektelic packet forwarder pointing at localhost? Why are you also trying to run the gateway bridge on the gateway? ChirpStack is, by nature, a distributed system. It does not look like you are architecting your application correctly.

1 Like

bconway

i said i am new to lora and you need to take it easy on me. When I read project documentation, I thought I needed a gateway to run gateway bridge as my gateway and sensor(s) are at a distance and I needed a gateway to communicate to the sensor(s). Is that not true?

you need to study the LoRaWAN subject more thoroughly. many questions will gone. and you will understand what you are doing.

you need to study the LoRaWAN subject more thoroughly.
Everyone learns a bit different, The best I learn the subject is by doing something in it.In this case I wanted to learn about LORA and perform a simple test not an application yet. Also the best learning is asking experts about best practices and advice. I am doing that with a simple test to get data from sensor. Once I can read data from this sensor, I can think of more generic application where AS, NS,GB and MQTT can be redundant but for now i need to perform easy test. I do not need advice to study LORA i know that i lack that knowledge. I need to know how to read my sensor data.As of now, I did not get this advice from experts

You may have better luck if you start with the docker-compose skeleton, as it includes all of the servers, bridge, and MQTT preconfigured for you: https://www.chirpstack.io/guides/docker-compose/

The only requirement after that is to point your gateway’s packet forwarder at it.

Once you have that working, then considering branching out to running the services independently.

Alex, there is almost 2500 users registered on the forum currently. We’ve all been at the spot where we knew nothing about LoRaWAN and Chirpstack.
Most of us managed to get it working without wasting expert’s time. You failed that one.