Packet forwarder configuration

Hello,
Apologies if this is not the right place for this enquirey, please redirect me if so.
I’ve just set up a TTN lora gateway using a RAK2247 and a Rasperry Pi booted from RAK’s bootable SD image. It works but I’m getting HUGE volumes of log data to /var/log/daemon.log. Is there any way to control the verbosity of logging?
Much of the logging is to do with the wireless AP which I have disabled by blacklisting the wifi driver - I’m running over ethernet and want to conserve power - is there a way of configuring the software to not implement the wifi AP?
Thanks.

Use the command "sudo gateway-config",
1.

2.Select 2 Enable Client Mode, this will turn off ap mode.
2019-11-05%2009%3A08%3A53

Thank you, I should have spotted that. Could you also help me understand whats going on with these log lines:

Nov 5 09:25:53 rak-gateway loraserver[571]: time=“2019-11-05T09:25:53Z” level=error msg=“gateway/mqtt: connecting to mqtt broker failed, will retry in 2s: Network Error : dial tcp [::1]:1883: connect: connection refused”
Nov 5 09:25:53 rak-gateway lora-app-server[572]: time=“2019-11-05T09:25:53Z” level=error msg=“integration/mqtt: connecting to broker error, will retry in 2s: Network Error : dial tcp [::1]:1883: connect: connection refused”
Nov 5 09:25:54 rak-gateway lora-gateway-bridge[569]: time=“2019-11-05T09:25:54Z” level=error msg=“integration/mqtt: connection error” error=“Network Error : dial tcp 127.0.0.1:1883: connect: connection refused”
Nov 5 09:25:55 rak-gateway loraserver[571]: time=“2019-11-05T09:25:55Z” level=error msg=“gateway/mqtt: connecting to mqtt broker failed, will retry in 2s: Network Error : dial tcp [::1]:1883: connect: connection refused”
Nov 5 09:25:55 rak-gateway lora-app-server[572]: time=“2019-11-05T09:25:55Z” level=error msg=“integration/mqtt: connecting to broker error, will retry in 2s: Network Error : dial tcp [::1]:1883: connect: connection refused”
Nov 5 09:25:56 rak-gateway lora-gateway-bridge[569]: time=“2019-11-05T09:25:56Z” level=error msg=“integration/mqtt: connection error” error=“Network Error : dial tcp 127.0.0.1:1883: connect: connection refused”
Nov 5 09:25:57 rak-gateway loraserver[571]: time=“2019-11-05T09:25:57Z” level=error msg=“gateway/mqtt: connecting to mqtt broker failed, will retry in 2s: Network Error : dial tcp [::1]:1883: connect: connection refused”
Nov 5 09:25:57 rak-gateway lora-app-server[572]: time=“2019-11-05T09:25:57Z” level=error msg=“integration/mqtt: connecting to broker error, will retry in 2s: Network Error : dial tcp [::1]:1883: connect: connection refused”
Nov 5 09:25:58 rak-gateway lora-gateway-bridge[569]: time=“2019-11-05T09:25:58Z” level=error msg=“integration/mqtt: connection error” error=“Network Error : dial tcp 127.0.0.1:1883: connect: connection refused”
Nov 5 09:25:59 rak-gateway loraserver[571]: time=“2019-11-05T09:25:59Z” level=error msg=“gateway/mqtt: connecting to mqtt broker failed, will retry in 2s: Network Error : dial tcp [::1]:1883: connect: connection refused”
Nov 5 09:25:59 rak-gateway lora-app-server[572]: time=“2019-11-05T09:25:59Z” level=error msg=“integration/mqtt: connecting to broker error, will retry in 2s: Network Error : dial tcp [::1]:1883: connect: connection refused”
Nov 5 09:26:00 rak-gateway lora-gateway-bridge[569]: time=“2019-11-05T09:26:00Z” level=error msg=“integration/mqtt: connection error” error=“Network Error : dial tcp 127.0.0.1:1883: connect: connection refused”
Nov 5 09:26:01 rak-gateway loraserver[571]: time=“2019-11-05T09:26:01Z” level=error msg=“gateway/mqtt: connecting to mqtt broker failed, will retry in 2s: Network Error : dial tcp [::1]:1883: connect: connection refused”
Nov 5 09:26:01 rak-gateway lora-app-server[572]: time=“2019-11-05T09:26:01Z” level=error msg=“integration/mqtt: connecting to broker error, will retry in 2s: Network Error : dial tcp [::1]:1883: connect: connection refused”
Nov 5 09:26:02 rak-gateway lora-gateway-bridge[569]: time=“2019-11-05T09:26:02Z” level=error msg=“integration/mqtt: connection error” error=“Network Error : dial tcp 127.0.0.1:1883: connect: connection refused”
Nov 5 09:26:03 rak-gateway loraserver[571]: time=“2019-11-05T09:26:03Z” level=error msg=“gateway/mqtt: connecting to mqtt broker failed, will retry in 2s: Network Error : dial tcp [::1]:1883: connect: connection refused”
Nov 5 09:26:03 rak-gateway lora-app-server[572]: time=“2019-11-05T09:26:03Z” level=error msg=“integration/mqtt: connecting to broker error, will retry in 2s: Network Error : dial tcp [::1]:1883: connect: connection refused”

Which appear continuously.
Thanks again.

OK, So I tried killing the lora-app-server, lora-gateway-bridge and loraserver tasks and my ttn feed still works fine, so I guess I only need the lora-pkt-fwd service. So how do I configure the system so it doesn’t launch the unwanted services?
Thanks again.

This are the commands to disable all ChirpStack (former LoRaSever) process:
sudo systemctl disable loraserver
sudo systemctl disable lora-app-server
sudo systemctl disable lora-gateway-bridge
sudo systemctl disable postgresql
sudo systemctl disable mosquitto
sudo systemctl disable redis

Regards,
Todor

1 Like

Thank you, perfect, will do.

Hello again. Having done all I can to eliminate error & warning lines written to daemon.log by rak-gateway, I’m still left with a log file that grows by 100 lines of apparent stream-of-consciousness junk every 2 minutes. I’m wondering if this is normal? If so, is there a way I can reduce the verbosity so that only errors and warnings are logged. I can post a sample 100 junk lines if that would help. Thanking you in advance for your advice.

Hi. Yes, please give us error log here.

OK, you asked for it, I get this block every 2 mins:
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: src/jitqueue.c:448:jit_print_queue(): INFO: [jit] queue is empty
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ### [GPS] ###
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # Valid time reference (age: 0 sec)
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # GPS coordinates: latitude 53.70829, longitude -2.00370, altitude 263 m
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ##### END #####
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: JSON up: {“stat”:{“time”:“2019-11-22 12:04:38 GMT”,“lati”:53.70829,“long”:-2.00370,“alti”:263,“rxnb”:0,“rxok”:0,“rxfw”:0,“ackr”:0.0,“dwnb”:0,“txnb”:0}}
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: [up] PUSH_ACK received in 26 ms
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: [down] PULL_ACK received in 24 ms
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: [down] PULL_ACK received in 34 ms
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: [down] PULL_ACK received in 24 ms
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: Disabling GPS mode for concentrator’s counter…
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: host/sx1301 time offset=(1574424245s:894482µs) - drift=67500517µs
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: Enabling GPS mode for concentrator’s counter.
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ##### 2019-11-22 12:05:08 GMT #####
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ### [UPSTREAM] ###
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # RF packets received by concentrator: 1
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # CRC_OK: 0.00%, CRC_FAIL: 100.00%, NO_CRC: 0.00%
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # RF packets forwarded: 0 (0 bytes)
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # PUSH_DATA datagrams sent: 1 (154 bytes)
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # PUSH_DATA acknowledged: 100.00%
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ### [DOWNSTREAM] ###
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # PULL_DATA sent: 3 (100.00% acknowledged)
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # PULL_RESP(onse) datagrams received: 0 (0 bytes)
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # RF packets sent to concentrator: 0 (0 bytes)
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # TX errors: 0
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # BEACON queued: 0
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # BEACON sent so far: 0
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # BEACON rejected: 0
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ### [JIT] ###
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # SX1301 time (PPS): 62679086
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: src/jitqueue.c:448:jit_print_queue(): INFO: [jit] queue is empty
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ### [GPS] ###
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # Valid time reference (age: 0 sec)
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # GPS coordinates: latitude 53.70828, longitude -2.00371, altitude 257 m
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ##### END #####
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: JSON up: {“stat”:{“time”:“2019-11-22 12:05:08 GMT”,“lati”:53.70828,“long”:-2.00371,“alti”:257,“rxnb”:1,“rxok”:0,“rxfw”:0,“ackr”:100.0,“dwnb”:0,“txnb”:0}}
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: [up] PUSH_ACK received in 25 ms
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: [down] PULL_ACK received in 23 ms
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: [down] PULL_ACK received in 24 ms
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: [down] PULL_ACK received in 24 ms
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ##### 2019-11-22 12:05:38 GMT #####
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ### [UPSTREAM] ###
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # RF packets received by concentrator: 0
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # RF packets forwarded: 0 (0 bytes)
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # PUSH_DATA datagrams sent: 1 (156 bytes)
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # PUSH_DATA acknowledged: 100.00%
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ### [DOWNSTREAM] ###
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # PULL_DATA sent: 3 (100.00% acknowledged)
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # PULL_RESP(onse) datagrams received: 0 (0 bytes)
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # RF packets sent to concentrator: 0 (0 bytes)
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # TX errors: 0
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # BEACON queued: 0
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # BEACON sent so far: 0
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # BEACON rejected: 0
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ### [JIT] ###
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # SX1301 time (PPS): 92105739
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: src/jitqueue.c:448:jit_print_queue(): INFO: [jit] queue is empty
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ### [GPS] ###
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # Valid time reference (age: 0 sec)
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # GPS coordinates: latitude 53.70824, longitude -2.00356, altitude 246 m
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ##### END #####
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: JSON up: {“stat”:{“time”:“2019-11-22 12:05:38 GMT”,“lati”:53.70824,“long”:-2.00356,“alti”:246,“rxnb”:0,“rxok”:0,“rxfw”:0,“ackr”:100.0,“dwnb”:0,“txnb”:0}}
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: [up] PUSH_ACK received in 25 ms
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: [down] PULL_ACK received in 24 ms
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: [down] PULL_ACK received in 23 ms
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: [down] PULL_ACK received in 24 ms
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: Disabling GPS mode for concentrator’s counter…
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: host/sx1301 time offset=(1574424245s:894762µs) - drift=280µs
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: Enabling GPS mode for concentrator’s counter.
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ##### 2019-11-22 12:06:08 GMT #####
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ### [UPSTREAM] ###
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # RF packets received by concentrator: 0
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # CRC_OK: 0.00%, CRC_FAIL: 0.00%, NO_CRC: 0.00%
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # RF packets forwarded: 0 (0 bytes)
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # PUSH_DATA datagrams sent: 1 (156 bytes)
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # PUSH_DATA acknowledged: 100.00%
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ### [DOWNSTREAM] ###
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # PULL_DATA sent: 3 (100.00% acknowledged)
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # PULL_RESP(onse) datagrams received: 0 (0 bytes)
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # RF packets sent to concentrator: 0 (0 bytes)
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # TX errors: 0
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # BEACON queued: 0
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # BEACON sent so far: 0
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # BEACON rejected: 0
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ### [JIT] ###
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # SX1301 time (PPS): 122679147
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: src/jitqueue.c:448:jit_print_queue(): INFO: [jit] queue is empty
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ### [GPS] ###
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # Valid time reference (age: 0 sec)
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: # GPS coordinates: latitude 53.70827, longitude -2.00360, altitude 251 m
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ##### END #####
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: JSON up: {“stat”:{“time”:“2019-11-22 12:06:08 GMT”,“lati”:53.70827,“long”:-2.00360,“alti”:251,“rxnb”:0,“rxok”:0,“rxfw”:0,“ackr”:100.0,“dwnb”:0,“txnb”:0}}
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: [up] PUSH_ACK received in 25 ms
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: [down] PULL_ACK received in 24 ms
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: [down] PULL_ACK received in 23 ms
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: INFO: [down] PULL_ACK received in 24 ms
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ##### 2019-11-22 12:06:38 GMT #####
Nov 22 12:06:38 rak-gateway ttn-gateway[506]: ### [UPSTREAM] ###

Oh… This is the normal log from packet forwarder. You have to check for a command or setting for periodically cleaning the logs file. Or you have to find another workaround. I will check such when have some time…

1 Like