[release] LoRa Server 0.22.0 & LoRa App Server 0.14.x (read carefully!)

Dear Brocaar,

I simply ran the following commands and everything works perfectly. Nothing went wrong!

sudo apt-get update -y
sudo apt-get upgrade -y

wget https://dl.loraserver.io/deb/loraserver_0.22.0_amd64.deb
sudo dpkg -i loraserver_0.22.0_amd64.deb

wget https://dl.loraserver.io/deb/lora-app-server_0.14.0_amd64.deb
sudo dpkg -i lora-app-server_0.14.0_amd64.deb

I did not backup anything as I did not have anything important im my server. I use Amazon EC2 and I took a snapshot before upgrading. If something goes wrong, I simply restore from the snapshot! its super easy.

Brocaar, for your information, I paste below more information

The update did not change anything! I didnt back up anything.
Find below my terminal o/p.

 wget https://dl.loraserver.io/deb/loraserver_0.22.0_amd64.deb
--2017-11-06 10:49:01--  https://dl.loraserver.io/deb/loraserver_0.22.0_amd64.deb
Resolving dl.loraserver.io (dl.loraserver.io)... 188.166.134.65
Connecting to dl.loraserver.io (dl.loraserver.io)|188.166.134.65|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4924240 (4.7M) [application/octet-stream]
Saving to: ‘loraserver_0.22.0_amd64.deb’

loraserver_0.22.0_a 100%[===================>]   4.70M  3.68MB/s    in 1.3s    

2017-11-06 10:49:04 (3.68 MB/s) - ‘loraserver_0.22.0_amd64.deb’ saved [4924240/4924240]

ubuntu@ip-XXX:~$ sudo dpkg -i loraserver_0.22.0_amd64.deb
(Reading database ... 128122 files and directories currently installed.)
Preparing to unpack loraserver_0.22.0_amd64.deb ...
Unpacking loraserver (0.22.0) over (0.21.0) ...
Removed symlink /etc/systemd/system/multi-user.target.wants/loraserver.service.
Setting up loraserver (0.22.0) ...
Created symlink from /etc/systemd/system/multi-user.target.wants/loraserver.service to /lib/systemd/system/loraserver.service.
Restarting LoRa Server
ubuntu@ip-XXXXXX:~$ wget https://dl.loraserver.io/deb/lora-app-server_0.14.0_amd64.deb
--2017-11-06 10:49:29--  https://dl.loraserver.io/deb/lora-app-server_0.14.0_amd64.deb
Resolving dl.loraserver.io (dl.loraserver.io)... 188.166.134.65
Connecting to dl.loraserver.io (dl.loraserver.io)|188.166.134.65|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7790470 (7.4M) [application/octet-stream]
Saving to: ‘lora-app-server_0.14.0_amd64.deb’

lora-app-server_0.1 100%[===================>]   7.43M  4.77MB/s    in 1.6s    

2017-11-06 10:49:31 (4.77 MB/s) - ‘lora-app-server_0.14.0_amd64.deb’ saved [7790470/7790470]

ubuntu@ip-XX:~$ sudo dpkg -i lora-app-server_0.14.0_amd64.deb
(Reading database ... 128122 files and directories currently installed.)
Preparing to unpack lora-app-server_0.14.0_amd64.deb ...
Unpacking lora-app-server (0.14.0) over (0.13.2) ...
Removed symlink /etc/systemd/system/multi-user.target.wants/lora-app-server.service.
Setting up lora-app-server (0.14.0) ...
Created symlink from /etc/systemd/system/multi-user.target.wants/lora-app-server.service to /lib/systemd/system/lora-app-server.service.
Restarting LoRa App Server
ubuntu@ip-XXX~$ sudo reboot
Terminated
1 Like

Brocaar,

After doing as you suggested, I now receive this error in its place:

loraserver_1     | time="2017-11-07T01:16:23Z" level=error msg="processing rx packet error: publish data up to application-server error: rpc error: code = InvalidArgument desc = RxInfo must have length > 0" data_base64=gEuiRY0ABwAB9KmYQtiDZSMfyxRMYxHyFn3eDFnO
1 Like

Thanks! I think that is a bug. Could you check the Add gateway meta-data field in the service-profile for now? I did test that when this field is disabled that no gateway data is exposed. However, there is still a validation on it in LoRa App Server, raising this issue. Will fix this.

I’ve created an issue for this:

1 Like

Checking the Add gateway meta-data worked for me, thank you!

1 Like

Great! I’ll fix this issue soon so it can be disabled without any side-effects. Sorry about this :slight_smile:

1 Like

I’ve released an update with some fixes, including the issue you reported.

wget https://dl.loraserver.io/deb/lora-app-server_0.14.1_amd64.deb
sudo dpkg -i lora-app-server_0.14.1_amd64.deb

In the next couple of days, I’ll also make these new versions of LoRa (App) Server in the Debian / Ubuntu repository so you can use apt update && apt upgrade again to upgrade to the latest version :slight_smile:

1 Like

Dear Brocaar,

I successfully upgraded. Why didnt I get this error message?

1 Like

You mean the RxInfo must have... error message? This only occurred in LoRa App Server 0.14.0 and when Add gateway meta-data was disabled.

1 Like

yes Brocaar. I see! thanks! No problems from update thus far and system still is very stable.

2 Likes

Thanks for all the feedback guys! I’ve just pushed the .deb packages to the Debian and Ubuntu repositories so you can now upgrade to the latest version as usual by apt update && apt upgrade :slight_smile:

1 Like

I just updated trough .deb packages.
I expected new menu’s because of the update but found nothing of that.
Also a complet reinstall did not ake that happen.
Did I miss something?

1 Like

Ok, it seems solved now: I had to refresh the cache of my browser. :frowning:

1 Like

hi brocaar, I successfully upgraded, but it have a Error when i running lora-app-server.
what’t mean in this Error?

➜  lora-app-server git:(master) ✗ ./start.sh 
INFO[0000] starting LoRa App Server                      docs="https://docs.loraserver.io/" version=0.14.2
INFO[0000] connecting to postgresql                     
INFO[0000] setup redis connection pool                  
INFO[0000] handler/mqtt: connecting to mqtt broker       server="tcp://localhost:1883"
INFO[0000] applying database migrations                 
INFO[0000] handler/mqtt: connected to mqtt broker       
INFO[0000] handler/mqtt: subscribling to tx topic        topic="application/+/node/+/tx"
INFO[0000] migrations applied                            count=0
ERRO[0000] network-server create routing-profile api error  error="rpc error: code = Unknown desc = pq: relation "routing_profile" does not exist"
ERRO[0000] profiles migration failed                     error="create network-server error: create routing-profile error: rpc error: code = Unknown desc = pq: relation "routing_profile" does not exist"
ERRO[0002] network-server create routing-profile api error  error="rpc error: code = Unknown desc = pq: relation "routing_profile" does not exist"
ERRO[0002] profiles migration failed                     error="create network-server error: create routing-profile error: rpc error: code = Unknown desc = pq: relation "routing_profile" does not exist"
ERRO[0004] network-server create routing-profile api error  error="rpc error: code = Unknown desc = pq: relation "routing_profile" does not exist"
ERRO[0004] profiles migration failed                     error="create network-server error: create routing-profile error: rpc error: code = Unknown desc = pq: relation "routing_profile" does not exist"
ERRO[0006] network-server create routing-profile api error  error="rpc error: code = Unknown desc = pq: relation "routing_profile" does not exist"
ERRO[0006] profiles migration failed                     error="create network-server error: create routing-profile error: rpc error: code = Unknown desc = pq: relation "routing_profile" does not exist"
ERRO[0008] network-server create routing-profile api error  error="rpc error: code = Unknown desc = pq: relation "routing_profile" does not exist"
ERRO[0008] profiles migration failed                     error="create network-server error: create routing-profile error: rpc error: code = Unknown desc = pq: relation "routing_profile" does not exist"
ERRO[0010] network-server create routing-profile api error  error="rpc error: code = Unknown desc = pq: relation "routing_profile" does not exist"
ERRO[0010] profiles migration failed                     error="create network-server error: create routing-profile error: rpc error: code = Unknown desc = pq: relation "routing_profile" does not exist"
ERRO[0012] network-server create routing-profile api error  error="rpc error: code = Unknown desc = pq: relation "routing_profile" does not exist"
ERRO[0012] profiles migration failed                     error="create network-server error: create routing-profile error: rpc error: code = Unknown desc = pq: relation "routing_profile" does not exist"
ERRO[0014] network-server create routing-profile api error  error="rpc error: code = Unknown desc = pq: relation "routing_profile" does not exist"
ERRO[0014] profiles migration failed                     error="create network-server error: create routing-profile error: rpc error: code = Unknown desc = pq: relation "routing_profile" does not exist"

this is my start scripts

#!/bin/bash

sudo systemctl stop lora-app-server.service
./build/lora-app-server \
    --postgres-dsn="postgres://loraserver_as:dbpassword@localhost/loraserver_as?sslmode=disable" \
    --db-automigrate=true \
    --redis-url="redis://localhost:6379/1" \
    --mqtt-server="tcp://localhost:1883" \
    --mqtt-username="loraappserver" \
    --mqtt-password="mqtt" \
    --bind="0.0.0.0:8001" \
    --http-bind="0.0.0.0:8080" \
    --http-tls-cert="/etc/lora-app-server/certs/http.pem" \
    --http-tls-key="/etc/lora-app-server/certs/http-key.pem" \
    --jwt-secret="c6xTHkE4lsqtjoX8B2LWjsfaEqmtJffIN8qp3tC9H5c=" \
    --ns-server="127.0.0.1:8000" \
    --log-level=5
1 Like

It seems that you didn’t upgrade loraserver yet, or at least that the database migrations were not applied.

pq: relation “routing_profile” does not exist"

1 Like

I already upgraded loraserver, and backup the database.

how to migrations database for posgtresql?

1 Like

Also with the --db-automigrate=true flag.

Make sure you see something like this in the loraserver logs:

INFO[0000] applying database migrations

1 Like

yes, I always set the --db-automigrate flag to be true, and I can see the logs:

INFO[0000] applying database migrations                 
INFO[0000] handler/mqtt: connected to mqtt broker       
INFO[0000] handler/mqtt: subscribling to tx topic        topic="application/+/node/+/tx"
INFO[0000] migrations applied                            count=0
INFO[0000] ns-server=127.0.0.1:8000                     
ERRO[0000] network-server create routing-profile api error  error="rpc error: code = Unknown desc = pq: relation "routing_profile" does not exist"
ERRO[0000] profiles migration failed                     error="create network-server error: create routing-profile error: rpc error: code = Unknown desc = pq: relation "routing_profile" does not exist"
INFO[0002] ns-server=127.0.0.1:8000                     
ERRO[0002] network-server create routing-profile api error  error="rpc error: code = Unknown desc = pq: relation "routing_profile" does not exist"
ERRO[0002] profiles migration failed                     error="create network-server error: create routing-profile error: rpc error: code = Unknown desc = pq: relation "routing_profile" does not exist"
1 Like

Please note that these are the logs of LoRa App Server, not LoRa Server.

:disappointed_relieved:, you are right, I don’t set the --db-automigrate flag on LoRa Serve.

Please let us know if that solved the issue :slight_smile: