[release] LoRa (App) Server v2.0.1


#1

Changelog

LoRa App Server v2.0.1

Bugfixes

  • Use gofrs/uuid UUID library as satori/go.uuid is not truly random. (#253)
  • Fix web-interface login form (sometimes a double login was required).

LoRa Server v2.0.1

Bugfixes

  • Use gofrs/uuid UUID library as satori/go.uuid is not truly random. (#342)
  • Flush device- and service-profile cache when migrating from v1 to v2. (lora-app-server#254)
  • Set board and antenna on downlink. (#341)

ERR wrong number of arguments for 'del' command
#2

Trying to do the quick install on a RPi 3 and loraserver is dumping out with an error that looks like is redis related:

Aug 14 11:34:17 pi-sapi systemd[1]: Started LoRa Server.
Aug 14 11:34:17 pi-sapi loraserver[639]: time="2018-08-14T11:34:17-07:00" level=info msg="starting LoRa Server" band=US_902_928 docs="https://docs.loraserver.io/" net_id=010203 version=2.0.1
Aug 14 11:34:17 pi-sapi loraserver[639]: time="2018-08-14T11:34:17-07:00" level=info msg="disabling all channels"
Aug 14 11:34:17 pi-sapi loraserver[639]: time="2018-08-14T11:34:17-07:00" level=info msg="enabling channels" channels="[40 41 42 43 44 45 46 47]"
Aug 14 11:34:17 pi-sapi loraserver[639]: time="2018-08-14T11:34:17-07:00" level=info msg="setup redis connection pool" url="redis://localhost:6379"
Aug 14 11:34:17 pi-sapi loraserver[639]: time="2018-08-14T11:34:17-07:00" level=info msg="connecting to postgresql"
Aug 14 11:34:17 pi-sapi loraserver[639]: time="2018-08-14T11:34:17-07:00" level=info msg="backend/gateway: TLS config is empty"
Aug 14 11:34:17 pi-sapi loraserver[639]: time="2018-08-14T11:34:17-07:00" level=info msg="backend/gateway: connecting to mqtt broker" server="tcp://localhost:1883"
Aug 14 11:34:17 pi-sapi loraserver[639]: time="2018-08-14T11:34:17-07:00" level=info msg="backend/gateway: connected to mqtt server"
Aug 14 11:34:17 pi-sapi loraserver[639]: time="2018-08-14T11:34:17-07:00" level=info msg="backend/gateway: subscribing to rx topic" qos=0 topic=gateway/+/rx
Aug 14 11:34:17 pi-sapi loraserver[639]: time="2018-08-14T11:34:17-07:00" level=info msg="configuring join-server client" ca_cert= server="http://localhost:8003" tls_cert= tls_key=
Aug 14 11:34:17 pi-sapi loraserver[639]: time="2018-08-14T11:34:17-07:00" level=info msg="no network-controller configured"
Aug 14 11:34:17 pi-sapi loraserver[639]: time="2018-08-14T11:34:17-07:00" level=info msg="applying database migrations"
Aug 14 11:34:17 pi-sapi loraserver[639]: time="2018-08-14T11:34:17-07:00" level=info msg="backend/gateway: subscribing to stats topic" qos=0 topic=gateway/+/stats
Aug 14 11:34:17 pi-sapi loraserver[639]: time="2018-08-14T11:34:17-07:00" level=info msg="migrations applied" count=0
Aug 14 11:34:17 pi-sapi loraserver[639]: time="2018-08-14T11:34:17-07:00" level=fatal msg="delete device-profiles from cache error: ERR wrong number of arguments for 'del' command"
Aug 14 11:34:17 pi-sapi systemd[1]: loraserver.service: Main process exited, code=exited, status=1/FAILURE
Aug 14 11:34:17 pi-sapi systemd[1]: loraserver.service: Unit entered failed state.
Aug 14 11:34:17 pi-sapi systemd[1]: loraserver.service: Failed with result 'exit-code'.
Aug 14 11:34:17 pi-sapi systemd[1]: loraserver.service: Service hold-off time over, scheduling restart.
Aug 14 11:34:17 pi-sapi systemd[1]: Stopped LoRa Server.

Versions:

$ loraserver version
WARN[0000] No configuration file found, using defaults. See: https://www.loraserver.io/loraserver/install/config/ 
2.0.1

$ lora-app-server version
WARN[0000] No configuration file found, using defaults. See: https://www.loraserver.io/lora-app-server/install/config/ 
2.0.1

$ psql -V
psql (PostgreSQL) 9.6.10

$ redis-server -v
Redis server v=3.2.6 sha=00000000:0 malloc=jemalloc-3.6.0 bits=32 build=5a93b34a97c2cde8

Why LoRA server is not working?
#3

Looking at the loraserver source it looked like something to do with the profile migration, for which there is none for a new install, so I manually created a fake device_profile record:

loraserver_ns=> insert into device_profile values (now(), now(), '40e6215d-b5c6-4896-987c-f30f3678f608', True, 0, 0, 0, 0, False, 0, '1.0', '1.0', 0, 0, 0, 0, '{0}', 0, 0, False, '1.0', False);

This seemed to work around the issue and after removing the fake record it still works ok.


#4

Good catch! Will fix this immediately. I did test this and I added some testcases. Only it did not test the case when there are none :man_facepalming:


#5

Hi @pni-jmattison, I suffered the same yesterday. Does this temporary solution affect to the performance of loraserver? Btw, thanks for it!

@brocaar Could you tell us when the bug is totally fixed?

Thanks!


#6

It already has been fixed in the master branch and I’m building a new release as we speak :slight_smile:

Please note that this is not a temporary solution. It will only be run once and the migration will then be marked as executed in the database.


#7

@pni-jmattison @promero please update, the issue should be fixed!

sudo apt update && sudo apt upgrade

#8

Everything working properly! Thanks :slight_smile:


#9

@brocaar as usual, excellent work! I was really hoping it wasn’t me doing (or not) something silly!


#10

Hi All;

Excellent. It’s working.

Thank you,
Best regards.