No Logfile from lora-gateway-bridge

Hello!

I have installed a Lora-Gateway-Bridge on my Multitech MTCDT 246A Gateway following the instructions on
https://www.loraserver.io/lora-gateway-bridge/install/gateway/
http://www.multitech.net/developer/software/lora/conduit-mlinux-convert-to-basic-packet-forwarder/ and https://www.loraserver.io/lora-gateway-bridge/install/config/
On https://www.loraserver.io/guides/troubleshooting/gateway/ in section “LoRa Gateway Bridge receives data?” is described that the Lora-Gateway-Bridges logs into file /var/log/lora-gateway-bridge/lora-gateway-bridge.log. A created the directory lora-gateway-bridge, but there isn’t a logfile. Where is this to configure?.

Thanks in advance
Peter

1 Like

It describes two ways for getting the logs. Depending your setup, it is one or the other.

I have read the instructions on website https://www.loraserver.io/lora-gateway-bridge/install/debian/. OS on the the Multitech GW is mLinux which supports start/stop through init.d. But directory /var/log/lora-gateway-bridge is empty.

2 Likes

Same too me. I installed all the 4 modules (lora-app-server, lora-gateway-bridge, lora-geo-server, loraserver) but no logs are produced.
You got empty file. To me, for example, the file doesn’t exist:

root@loraserver:~# ls -l /var/log/loraserver/
totale 0

Can someone help us?

Ah, ok. With systemd there are no log files we need a:
journalctl -u loraserver -f -n 50

In your case:
journalctl -u lora-gateway-bridge -f -n 50

Sorry, but on mLinux runs no systemd and for this reason journalctl and systemctl are unknown commands. So there should be an logfile as described on website https://www.loraserver.io/lora-gateway-bridge/install/debian/.

init.d

All logs are written to /var/log/lora-gateway-bridge/lora-gateway-bridge.log . To view and follow this logfile:

tail -f /var/log/lora-gateway-bridge/lora-gateway-bridge.log

The example that you give applies to the .deb packages, which does not apply for the Conduit.

There are no log written for the Conduit as the /var/log is (I believe) an in-memory file-system (as you don’t want to write to the NAND flash constantly). Given that the device only has 256MB which is used for booting the system + some in-memory FS mounts, there is not much space for writing logs.

You could also start the lora-gateway-bridge process manualy for debugging and use the -c flag to point it to the lora-gateway-bridge.toml file.

1 Like

HI Team,

I am using Multitech MTCDT-247A Gateway using Packet Forwarding option and I have installed lora-gateway-bridge in Multitech gateway. Updated MY cloud server IP in lora-gateway-bridge config file in Multitech gateway.

Google Cloud i have launched server Ubuntu 18.04 LTS & 16.04 Version. I have installed Loraserver & Lora-app-server.

am using Lora-app-server 3.3.1 & Loraserver 3.2.1 & lora-gateway-bridge 3.3.1 version in cloud server.

I have Created Network Servers,Gateway,Service,Device,Gateway,Application profile successfully.

I have added My Multitech gateway in gateway profile with out any issue.

I got error in logs creating Device/activating/reactivating device. Please find the below error.

unary call with code NotFound" error=“rpc error: code = NotFound desc = object does not exist” grpc.code=NotFound grpc.method=GetActivation grpc.service=api.DeviceService grpc.start_time=“2019-10-04T06:43:55Z” grpc.time_ms=4.474 peer.address=“127.0.0.1:58600” span.kind=server system=grpc

client unary call" error=“rpc error: code = NotFound desc = object does not exist” grpc.code=NotFound grpc.method=DeactivateDevice grpc.service=ns.NetworkServerService grpc.time_ms=0.986 span.kind=client system=grpc

Loraserver log everytime this only:-

Oct 04 08:55:29 mosquitto-2 loraserver[1431]: time=“2019-10-04T08:55:29Z” level=info msg=“metrics saved” aggregation="[MINUTE HOUR DAY MONTH]" name=“gw:00800000a000474d”
Oct 04 08:55:49 mosquitto-2 loraserver[1431]: time=“2019-10-04T08:55:49Z” level=info msg=“gateway/mqtt: gateway stats packet received” gateway_id=00800000a000474d
Oct 04 08:55:49 mosquitto-2 loraserver[1431]: time=“2019-10-04T08:55:49Z” level=info msg=“gateway updated” gateway_id=00800000a000474d
Oct 04 08:55:49 mosquitto-2 loraserver[1431]: time=“2019-10-04T08:55:49Z” level=info msg=“gateway/mqtt: publishing gateway command” command=config gateway_id=00800000a000474d qos=0 topic=gateway/00800000a000474d/command/config
Oct 04 08:55:49 mosquitto-2 loraserver[1431]: time=“2019-10-04T08:55:49Z” level=info msg=“metrics saved” aggregation="[MINUTE HOUR DAY MONTH]" name=“gw:00800000a000474d”

Please any one idea please give me a solution.

Thanks
Panneer Selvam.G

Hi at all

i also searched a way to get the logs from the chirpstack gateway brdige. As brocaar said, you should not log directly to the NAND Flash. So i did the following:

  • installed rsyslogd and configured it to send all logs to the syslog instead of the /var/log/messages
  • i had to write a new start/stop file in /etc/init.d/
    – i could not use exec in the command anymore, so i have this line to start:
    $DAEMON_BIN --config /var/config/$NAME/$NAME.toml 2>&1 | logger -t “chirpstack-gateway-bridge” &

if someone wants more information, just message me.

1 Like

Hi there! I can’t see any log in my Dragino LPS8 but I assume what you did will work for me. Could you please be more clear on how you were able to see the bridge logs please?

Thanks!!

first of all, i use multitech gateways. so this could be a bit different in your case.

But here a bit more detailed what i did:

  1. Installed rsyslog on the gateway (https://www.rsyslog.com)
  2. Configured rsyslog, so it sends the messages directly to a syslog Server (ofc you need to havev a syslog-server somewhere) see https://www.rsyslog.com/doc/v8-stable/configuration/sysklogd_format.html#actions
    3.) as the chirpstack-gw-bridge normaly does not log i had to change the start script of the chirpstack-gw bridge. you will find a line in the “do_start” part of the script. As i am in hollidays at the moment i cant tell you the exact line. replace this with the line from my last posting. this should work then and you will see the logs with the tag (-t option) “chirpstack-gateway-bridge” on your syslog server.

as said, i am in holliday, so can’t be more detailed at the moment, if it does not help. send me a message, i will replay more detailed after hollidays.

Another approach that doesn’t involve installing packages or editing startup scripts is to enable syslog at the top of the Gateway Bridge configuration file (2nd item): https://www.chirpstack.io/gateway-bridge/install/config/

It is likely that your gateway already has something syslog-compatible installed.

syslog is enabled in the configuration file but anyway the service doesn’t really log anything in a Dragino LPS8 device using OpenWRT.
My solution was to install syslog-ng and edit the init file as @sil mentioned.

Thanks for both of you