@brocaar
I have recently setup a new LoRa server install on AWS - and configured it for AU.
With my Gateway configured to use the Semtech forwarder directly to the Server on port 1700 - everything works fine.
The problem is - when I attempt to run the lora-gateway-bridge on the Gateway.
The bridge seems to be able to connect fine using SSL - but it is not passing data.
Your troubleshooting page was very helpful:
https://docs.loraserver.io/lora-gateway-bridge/install/debug/
The suggested debug command:
journalctl -f -n 100 -u lora-gateway-bridge
Gives no output…
So - I took at look at /var/log/mosquitto/mosquitto.log and I see this:
(since my bridge on the gateway needed a username/password - I borrowed “loraserver_ns” since I wasn’t sure how to add one for my gateway to use, but that’s a different topic)
510750859: New connection from xxx.xxx.xxx.xxx on port 8886.
1510750859: mosquitto_auth_unpwd_check(loraserver_ns)
1510750859: ** checking backend files
1510750859: getuser(loraserver_ns) AUTHENTICATED=1 by files
1510750859: New client connected from xxx.xxx.xxx.xxx as b9d99d32-a71e-4d50-a94b-41d3663bd7b2 (c1, k30, u’loraserver_ns’).
1510750892: mosquitto_auth_acl_check(…, b9d99d32-a71e-4d50-a94b-41d3663bd7b2, loraserver_ns, gateway/c0ee40ffff293464/stats, MOSQ_ACL_WRITE)
1510750892: SUPERUSER: loraserver_ns
1510750892: user is 0
1510750892: USERNAME: loraserver_ns, TOPIC: gateway/c0ee40ffff293464/stats, acc: 2
1510750892: aclcheck(loraserver_ns, gateway/c0ee40ffff293464/stats, 2) AUTHORIZED=0 by (null)
1510750892: Cached [8B7A7DF24C9FEE999DB3B63B96E3734BB4E91C1F] for (b9d99d32-a71e-4d50-a94b-41d3663bd7b2,loraserver_ns,2)
1510750922: mosquitto_auth_acl_check(…, b9d99d32-a71e-4d50-a94b-41d3663bd7b2, loraserver_ns, gateway/c0ee40ffff293464/stats, MOSQ_ACL_WRITE)
1510750922: aclcheck(loraserver_ns, gateway/c0ee40ffff293464/stats, 2) CACHEDAUTH: 12
1510750952: mosquitto_auth_acl_check(…, b9d99d32-a71e-4d50-a94b-41d3663bd7b2, loraserver_ns, gateway/c0ee40ffff293464/stats, MOSQ_ACL_WRITE)
1510750952: aclcheck(loraserver_ns, gateway/c0ee40ffff293464/stats, 2) CACHEDAUTH: 12
1510750982: mosquitto_auth_acl_check(…, b9d99d32-a71e-4d50-a94b-41d3663bd7b2, loraserver_ns, gateway/c0ee40ffff293464/stats, MOSQ_ACL_WRITE)
1510750982: aclcheck(loraserver_ns, gateway/c0ee40ffff293464/stats, 2) CACHEDAUTH: 12
1510751012: mosquitto_auth_acl_check(…, b9d99d32-a71e-4d50-a94b-41d3663bd7b2, loraserver_ns, gateway/c0ee40ffff293464/stats, MOSQ_ACL_WRITE)
1510751012: aclcheck(loraserver_ns, gateway/c0ee40ffff293464/stats, 2) CACHEDAUTH: 12
1510751042: mosquitto_auth_acl_check(…, b9d99d32-a71e-4d50-a94b-41d3663bd7b2, loraserver_ns, gateway/c0ee40ffff293464/stats, MOSQ_ACL_WRITE)
1510751042: aclcheck(loraserver_ns, gateway/c0ee40ffff293464/stats, 2) CACHEDAUTH: 12
1510751072: mosquitto_auth_acl_check(…, b9d99d32-a71e-4d50-a94b-41d3663bd7b2, loraserver_ns, gateway/c0ee40ffff293464/stats, MOSQ_ACL_WRITE)
I compared these logs to a Gateway with the bridge communicating with my EU server which I setup at the same time as the AU server.
The logs on the working EU setup looks like this:
1510750596: New connection from xxx.xxx.xxx.xxx on port 8886.
1510750596: mosquitto_auth_unpwd_check(loraserver_ns)
1510750596: ** checking backend files
1510750596: getuser(loraserver_ns) AUTHENTICATED=1 by files
1510750596: New client connected from xxx.xxx.xxx.xxx as db2fbc37-11a3-46f5-bd4d-8fd04b6ef57d (c1, k30, u’loraserver_ns’).
1510750597: mosquitto_auth_acl_check(…, db2fbc37-11a3-46f5-bd4d-8fd04b6ef57d, loraserver_ns, gateway/c0ee40ffff29377b/rx, MOSQ_ACL_WRITE)
1510750597: SUPERUSER: loraserver_ns
1510750597: user is 0
1510750597: USERNAME: loraserver_ns, TOPIC: gateway/c0ee40ffff29377b/rx, acc: 2
1510750597: aclcheck(loraserver_ns, gateway/c0ee40ffff29377b/rx, 2) AUTHORIZED=0 by (null)
1510750597: Cached [7035F21B8A975F860A9A93E79AB6C61B34CFF714] for (db2fbc37-11a3-46f5-bd4d-8fd04b6ef57d,loraserver_ns,2)
1510750597: Cleanup [005DDA60E2DE2A7610B5B9D3C65E0168C70A9EF9]
1510750597: Cleanup [B0D1B20252D504EE11E96E87B6089DEDE1DD2678]
1510750602: mosquitto_auth_acl_check(…, db2fbc37-11a3-46f5-bd4d-8fd04b6ef57d, loraserver_ns, gateway/c0ee40ffff29377b/rx, MOSQ_ACL_WRITE)
1510750602: aclcheck(loraserver_ns, gateway/c0ee40ffff29377b/rx, 2) CACHEDAUTH: 12
1510750607: mosquitto_auth_acl_check(…, db2fbc37-11a3-46f5-bd4d-8fd04b6ef57d, loraserver_ns, gateway/c0ee40ffff29377b/rx, MOSQ_ACL_WRITE)
1510750607: aclcheck(loraserver_ns, gateway/c0ee40ffff29377b/rx, 2) CACHEDAUTH: 12
1510750612: mosquitto_auth_acl_check(…, db2fbc37-11a3-46f5-bd4d-8fd04b6ef57d, loraserver_ns, gateway/c0ee40ffff29377b/rx, MOSQ_ACL_WRITE)
1510750612: aclcheck(loraserver_ns, gateway/c0ee40ffff29377b/rx, 2) CACHEDAUTH: 12
1510750613: mosquitto_auth_acl_check(…, db2fbc37-11a3-46f5-bd4d-8fd04b6ef57d, loraserver_ns, gateway/c0ee40ffff29377b/stats, MOSQ_ACL_WRITE)
1510750613: SUPERUSER: loraserver_ns
1510750613: user is 0
1510750613: USERNAME: loraserver_ns, TOPIC: gateway/c0ee40ffff29377b/stats, acc: 2
1510750613: aclcheck(loraserver_ns, gateway/c0ee40ffff29377b/stats, 2) AUTHORIZED=0 by (null)
1510750613: Cached [87C8D437163C7DE7EE38FE5216F2E88BDFC43CBC] for (db2fbc37-11a3-46f5-bd4d-8fd04b6ef57d,loraserver_ns,2)
1510750618: mosquitto_auth_acl_check(…, db2fbc37-11a3-46f5-bd4d-8fd04b6ef57d, loraserver_ns, gateway/c0ee40ffff29377b/rx, MOSQ_ACL_WRITE)
1510750618: aclcheck(loraserver_ns, gateway/c0ee40ffff29377b/rx, 2) CACHEDAUTH: 12
1510750623: mosquitto_auth_acl_check(…, db2fbc37-11a3-46f5-bd4d-8fd04b6ef57d, loraserver_ns, gateway/c0ee40ffff29377b/rx, MOSQ_ACL_WRITE)
1510750623: aclcheck(loraserver_ns, gateway/c0ee40ffff29377b/rx, 2) CACHEDAUTH: 12
1510750627: mosquitto_auth_acl_check(…, db2fbc37-11a3-46f5-bd4d-8fd04b6ef57d, loraserver_ns, gateway/c0ee40ffff29377b/rx, MOSQ_ACL_WRITE)
1510750627: aclcheck(loraserver_ns, gateway/c0ee40ffff29377b/rx, 2) CACHEDAUTH: 12
1510750633: mosquitto_auth_acl_check(…, db2fbc37-11a3-46f5-bd4d-8fd04b6ef57d, loraserver_ns, gateway/c0ee40ffff29377b/rx, MOSQ_ACL_WRITE)
To my untrained eye - the logs look pretty much equivalent - except for the “Cached” and “Cleanup” messages in the second (working) log.
I have triple checked that I properly added my gateway to the server - and that the organization allows gateways etc.
I spent hours on this yesterday trying to figure out what was going wrong and didn’t get anywhere.
And again - dumping the bridge and having the Semtech forwarder pointing to port 1700 on the server works perfectly.
Ideas on what I am doing wrong?