Issues with data after upgrading loraserver to 2.6.0


#1

I upgraded loraserver to 2.6.0 and now devices don’t seem to send data as expected.

data:

frames:

I tried downgrading to 2.5.0 but I got this error:

Mar 08 16:37:11 LoRaServer-production loraserver[19311]: time="2019-03-08T16:37:11Z" level=info msg="disabling all channels"
Mar 08 16:37:11 LoRaServer-production loraserver[19311]: time="2019-03-08T16:37:11Z" level=info msg="enabling channels" channels="[8 9 10 11 12 13 14 15]"
Mar 08 16:37:11 LoRaServer-production loraserver[19311]: time="2019-03-08T16:37:11Z" level=info msg="setup redis connection pool" url="redis://localhost:6379"
Mar 08 16:37:11 LoRaServer-production loraserver[19311]: time="2019-03-08T16:37:11Z" level=info msg="connecting to postgresql"
Mar 08 16:37:11 LoRaServer-production loraserver[19311]: time="2019-03-08T16:37:11Z" level=info msg="gateway/mqtt: connecting to mqtt broker" server="tcp://localhost:1883"
Mar 08 16:37:11 LoRaServer-production loraserver[19311]: time="2019-03-08T16:37:11Z" level=info msg="no geolocation-server configured"
Mar 08 16:37:11 LoRaServer-production loraserver[19311]: time="2019-03-08T16:37:11Z" level=info msg="configuring join-server client" ca_cert= server="http://localhost:8003" tls_cert= tls_key=
Mar 08 16:37:11 LoRaServer-production loraserver[19311]: time="2019-03-08T16:37:11Z" level=info msg="no network-controller configured"
Mar 08 16:37:11 LoRaServer-production loraserver[19311]: time="2019-03-08T16:37:11Z" level=info msg="applying database migrations"
Mar 08 16:37:11 LoRaServer-production loraserver[19311]: time="2019-03-08T16:37:11Z" level=info msg="backend/gateway: connected to mqtt server"
Mar 08 16:37:11 LoRaServer-production loraserver[19311]: time="2019-03-08T16:37:11Z" level=info msg="gateway/mqtt: subscribing to rx topic" qos=0 topic=gateway/+/rx
Mar 08 16:37:11 LoRaServer-production loraserver[19311]: time="2019-03-08T16:37:11Z" level=info msg="gateway/mqtt: subscribing to stats topic" qos=0 topic=gateway/+/stats
Mar 08 16:37:11 LoRaServer-production loraserver[19311]: time="2019-03-08T16:37:11Z" level=info msg="backend/gateway: subscribing to ack topic" qos=0 topic=gateway/+/ack
Mar 08 16:37:11 LoRaServer-production loraserver[19311]: time="2019-03-08T16:37:11Z" level=fatal msg="applying migrations failed: Unable to create migration plan because of 0020_device_add_mode.sql: unknown migration in database"
Mar 08 16:37:11 LoRaServer-production systemd[1]: loraserver.service: Main process exited, code=exited, status=1/FAILURE
Mar 08 16:37:11 LoRaServer-production systemd[1]: loraserver.service: Failed with result 'exit-code'.
Mar 08 16:37:11 LoRaServer-production systemd[1]: loraserver.service: Service hold-off time over, scheduling restart.
Mar 08 16:37:11 LoRaServer-production systemd[1]: loraserver.service: Scheduled restart job, restart counter is at 2.
Mar 08 16:37:11 LoRaServer-production systemd[1]: Stopped LoRa Server.

Any suggestion on the best way to proceed?

The sensors are Laird Sentrius RS191 and a Multitech gateway.


#2

I was able to downgrade loraserver by manually following the downgrade steps listed in 0020_device_add_mode.sql via psql and deleting the gorp_migration entry. After that, the devices sent data as they normally were.

Interestingly I didn’t seem to have this issue on the Tektelik KONA devices I was also testing with so IDK what the issue is.