[Ubuntu package] Lora APP error Migration


#1

Hi,
I have read other post about “Migration error”, I have try the solution suggested but in my case the problem persist.
I have recently installed all on a Ubuntu 18.04 server.
When I start lora-app-server via systemctl I receive:

Dec 19 10:18:33 LoRaWAN systemd[1]: Started LoRa App Server.
Dec 19 10:18:33 LoRaWAN lora-app-server[8197]: time=“2018-12-19T10:18:33+01:00” level=info msg=“starting LoRa App Server” docs="" version=2.4.1
Dec 19 10:18:33 LoRaWAN lora-app-server[8197]: time=“2018-12-19T10:18:33+01:00” level=info msg=“connecting to postgresql”
Dec 19 10:18:33 LoRaWAN lora-app-server[8197]: time=“2018-12-19T10:18:33+01:00” level=info msg=“setup redis connection pool”
Dec 19 10:18:33 LoRaWAN lora-app-server[8197]: time=“2018-12-19T10:18:33+01:00” level=info msg=“handler/mqtt: TLS config is empty”
Dec 19 10:18:33 LoRaWAN lora-app-server[8197]: time=“2018-12-19T10:18:33+01:00” level=info msg=“handler/mqtt: connecting to mqtt broker” server=“tcp://localhost:1883”
Dec 19 10:18:33 LoRaWAN lora-app-server[8197]: time=“2018-12-19T10:18:33+01:00” level=info msg=“applying database migrations”
Dec 19 10:18:33 LoRaWAN lora-app-server[8197]: time=“2018-12-19T10:18:33+01:00” level=info msg=“handler/mqtt: connected to mqtt broker”
Dec 19 10:18:33 LoRaWAN lora-app-server[8197]: time=“2018-12-19T10:18:33+01:00” level=info msg=“handler/mqtt: subscribing to tx topic” qos=0 topic=application/+/device/+/tx
Dec 19 10:18:33 LoRaWAN lora-app-server[8197]: time=“2018-12-19T10:18:33+01:00” level=fatal msg=“applying migrations error: Unable to create migration plan because of 0002_node_frame_log.sql: unknown migration in database”
Dec 19 10:18:33 LoRaWAN systemd[1]: lora-app-server.service: Main process exited, code=exited, status=1/FAILURE
Dec 19 10:18:33 LoRaWAN systemd[1]: lora-app-server.service: Failed with result ‘exit-code’.
Dec 19 10:18:33 LoRaWAN systemd[1]: lora-app-server.service: Service hold-off time over, scheduling restart.
Dec 19 10:18:33 LoRaWAN systemd[1]: lora-app-server.service: Scheduled restart job, restart counter is at 1.
Dec 19 10:18:33 LoRaWAN systemd[1]: Stopped LoRa App Server.
Dec 19 10:18:33 LoRaWAN systemd[1]: Started LoRa App Server.
Dec 19 10:18:34 LoRaWAN lora-app-server[8220]: time=“2018-12-19T10:18:34+01:00” level=info msg=“starting LoRa App Server” docs="" version=2.4.1
Dec 19 10:18:34 LoRaWAN lora-app-server[8220]: time=“2018-12-19T10:18:34+01:00” level=info msg=“connecting to postgresql”
Dec 19 10:18:34 LoRaWAN lora-app-server[8220]: time=“2018-12-19T10:18:34+01:00” level=info msg=“setup redis connection pool”
Dec 19 10:18:34 LoRaWAN lora-app-server[8220]: time=“2018-12-19T10:18:34+01:00” level=info msg=“handler/mqtt: TLS config is empty”
Dec 19 10:18:34 LoRaWAN lora-app-server[8220]: time=“2018-12-19T10:18:34+01:00” level=info msg=“handler/mqtt: connecting to mqtt broker” server=“tcp://localhost:1883”
Dec 19 10:18:34 LoRaWAN lora-app-server[8220]: time=“2018-12-19T10:18:34+01:00” level=info msg=“applying database migrations”
Dec 19 10:18:34 LoRaWAN lora-app-server[8220]: time=“2018-12-19T10:18:34+01:00” level=info msg=“handler/mqtt: connected to mqtt broker”
Dec 19 10:18:34 LoRaWAN lora-app-server[8220]: time=“2018-12-19T10:18:34+01:00” level=info msg=“handler/mqtt: subscribing to tx topic” qos=0 topic=application/+/device/+/tx
Dec 19 10:18:34 LoRaWAN lora-app-server[8220]: time=“2018-12-19T10:18:34+01:00” level=fatal msg=“applying migrations error: Unable to create migration plan because of 0002_node_frame_log.sql: unknown migration in database”
Dec 19 10:18:34 LoRaWAN systemd[1]: lora-app-server.service: Main process exited, code=exited, status=1/FAILURE
Dec 19 10:18:34 LoRaWAN systemd[1]: lora-app-server.service: Failed with result ‘exit-code’.
Dec 19 10:18:34 LoRaWAN systemd[1]: lora-app-server.service: Service hold-off time over, scheduling restart.
Dec 19 10:18:34 LoRaWAN systemd[1]: lora-app-server.service: Scheduled restart job, restart counter is at 2.
Dec 19 10:18:34 LoRaWAN systemd[1]: Stopped LoRa App Server.
Dec 19 10:18:34 LoRaWAN systemd[1]: Started LoRa App Server.
Dec 19 10:18:34 LoRaWAN lora-app-server[8242]: time=“2018-12-19T10:18:34+01:00” level=info msg=“starting LoRa App Server” docs="" version=2.4.1
Dec 19 10:18:34 LoRaWAN lora-app-server[8242]: time=“2018-12-19T10:18:34+01:00” level=info msg=“connecting to postgresql”
Dec 19 10:18:34 LoRaWAN lora-app-server[8242]: time=“2018-12-19T10:18:34+01:00” level=info msg=“setup redis connection pool”
Dec 19 10:18:34 LoRaWAN lora-app-server[8242]: time=“2018-12-19T10:18:34+01:00” level=info msg=“handler/mqtt: TLS config is empty”
Dec 19 10:18:34 LoRaWAN lora-app-server[8242]: time=“2018-12-19T10:18:34+01:00” level=info msg=“handler/mqtt: connecting to mqtt broker” server=“tcp://localhost:1883”
Dec 19 10:18:34 LoRaWAN lora-app-server[8242]: time=“2018-12-19T10:18:34+01:00” level=info msg=“applying database migrations”
Dec 19 10:18:34 LoRaWAN lora-app-server[8242]: time=“2018-12-19T10:18:34+01:00” level=info msg=“handler/mqtt: connected to mqtt broker”
Dec 19 10:18:34 LoRaWAN lora-app-server[8242]: time=“2018-12-19T10:18:34+01:00” level=info msg=“handler/mqtt: subscribing to tx topic” qos=0 topic=application/+/device/+/tx
Dec 19 10:18:34 LoRaWAN lora-app-server[8242]: time=“2018-12-19T10:18:34+01:00” level=fatal msg=“applying migrations error: Unable to create migration plan because of 0002_node_frame_log.sql: unknown migration in database”
Dec 19 10:18:34 LoRaWAN systemd[1]: lora-app-server.service: Main process exited, code=exited, status=1/FAILURE
Dec 19 10:18:34 LoRaWAN systemd[1]: lora-app-server.service: Failed with result ‘exit-code’.
Dec 19 10:18:34 LoRaWAN systemd[1]: lora-app-server.service: Service hold-off time over, scheduling restart.
Dec 19 10:18:34 LoRaWAN systemd[1]: lora-app-server.service: Scheduled restart job, restart counter is at 3.
Dec 19 10:18:34 LoRaWAN systemd[1]: Stopped LoRa App Server.
Dec 19 10:18:34 LoRaWAN systemd[1]: Started LoRa App Server.
Dec 19 10:18:35 LoRaWAN lora-app-server[8260]: time=“2018-12-19T10:18:35+01:00” level=info msg=“starting LoRa App Server” docs="" version=2.4.1
Dec 19 10:18:35 LoRaWAN lora-app-server[8260]: time=“2018-12-19T10:18:35+01:00” level=info msg=“connecting to postgresql”
Dec 19 10:18:35 LoRaWAN lora-app-server[8260]: time=“2018-12-19T10:18:35+01:00” level=info msg=“setup redis connection pool”
Dec 19 10:18:35 LoRaWAN lora-app-server[8260]: time=“2018-12-19T10:18:35+01:00” level=info msg=“handler/mqtt: TLS config is empty”
Dec 19 10:18:35 LoRaWAN lora-app-server[8260]: time=“2018-12-19T10:18:35+01:00” level=info msg=“handler/mqtt: connecting to mqtt broker” server=“tcp://localhost:1883”
Dec 19 10:18:35 LoRaWAN lora-app-server[8260]: time=“2018-12-19T10:18:35+01:00” level=info msg=“applying database migrations”
Dec 19 10:18:35 LoRaWAN lora-app-server[8260]: time=“2018-12-19T10:18:35+01:00” level=info msg=“handler/mqtt: connected to mqtt broker”
Dec 19 10:18:35 LoRaWAN lora-app-server[8260]: time=“2018-12-19T10:18:35+01:00” level=info msg=“handler/mqtt: subscribing to tx topic” qos=0 topic=application/+/device/+/tx
Dec 19 10:18:35 LoRaWAN lora-app-server[8260]: time=“2018-12-19T10:18:35+01:00” level=fatal msg=“applying migrations error: Unable to create migration plan because of 0002_node_frame_log.sql: unknown migration in database”
Dec 19 10:18:35 LoRaWAN systemd[1]: lora-app-server.service: Main process exited, code=exited, status=1/FAILURE
Dec 19 10:18:35 LoRaWAN systemd[1]: lora-app-server.service: Failed with result ‘exit-code’.
Dec 19 10:18:35 LoRaWAN systemd[1]: lora-app-server.service: Service hold-off time over, scheduling restart.
Dec 19 10:18:35 LoRaWAN systemd[1]: lora-app-server.service: Scheduled restart job, restart counter is at 4.
Dec 19 10:18:35 LoRaWAN systemd[1]: Stopped LoRa App Server.
Dec 19 10:18:35 LoRaWAN systemd[1]: Started LoRa App Server.
Dec 19 10:18:35 LoRaWAN lora-app-server[8282]: time=“2018-12-19T10:18:35+01:00” level=info msg=“starting LoRa App Server” docs="" version=2.4.1
Dec 19 10:18:35 LoRaWAN lora-app-server[8282]: time=“2018-12-19T10:18:35+01:00” level=info msg=“connecting to postgresql”
Dec 19 10:18:35 LoRaWAN lora-app-server[8282]: time=“2018-12-19T10:18:35+01:00” level=info msg=“setup redis connection pool”
Dec 19 10:18:35 LoRaWAN lora-app-server[8282]: time=“2018-12-19T10:18:35+01:00” level=info msg=“handler/mqtt: TLS config is empty”
Dec 19 10:18:35 LoRaWAN lora-app-server[8282]: time=“2018-12-19T10:18:35+01:00” level=info msg=“handler/mqtt: connecting to mqtt broker” server=“tcp://localhost:1883”
Dec 19 10:18:35 LoRaWAN lora-app-server[8282]: time=“2018-12-19T10:18:35+01:00” level=info msg=“applying database migrations”
Dec 19 10:18:35 LoRaWAN lora-app-server[8282]: time=“2018-12-19T10:18:35+01:00” level=info msg=“handler/mqtt: connected to mqtt broker”
Dec 19 10:18:35 LoRaWAN lora-app-server[8282]: time=“2018-12-19T10:18:35+01:00” level=info msg=“handler/mqtt: subscribing to tx topic” qos=0 topic=application/+/device/+/tx
Dec 19 10:18:35 LoRaWAN lora-app-server[8282]: time=“2018-12-19T10:18:35+01:00” level=fatal msg=“applying migrations error: Unable to create migration plan because of 0002_node_frame_log.sql: unknown migration in database”
Dec 19 10:18:35 LoRaWAN systemd[1]: lora-app-server.service: Main process exited, code=exited, status=1/FAILURE
Dec 19 10:18:35 LoRaWAN systemd[1]: lora-app-server.service: Failed with result ‘exit-code’.
Dec 19 10:18:35 LoRaWAN systemd[1]: lora-app-server.service: Service hold-off time over, scheduling restart.
Dec 19 10:18:35 LoRaWAN systemd[1]: lora-app-server.service: Scheduled restart job, restart counter is at 5.
Dec 19 10:18:35 LoRaWAN systemd[1]: Stopped LoRa App Server.
Dec 19 10:18:35 LoRaWAN systemd[1]: lora-app-server.service: Start request repeated too quickly.
Dec 19 10:18:35 LoRaWAN systemd[1]: lora-app-server.service: Failed with result ‘exit-code’.
Dec 19 10:18:35 LoRaWAN systemd[1]: Failed to start LoRa App Server.

I think that there is some problem in DB.
It’s a fresh installation.
How can I fix it?

Regards


#2

Are you using the same database for LoRa Server and LoRa App Server? They must use separate databases.


#3

Ehm… yes I have put in the lora-app-server conf the same DB name.
So I must create a new DB?

The documentation it’s not clear for that (or I am too dummy :slight_smile: )

I re-read all the installation docs.

Regards.


#4

Hi, thanks! I have create a new DB and now it’s works.
Thanks again!


#5

It mentioned here (https://www.loraserver.io/guides/debian-ubuntu/):