Config flags issue on Windows

I’m using loraserver on windows machine.
I’ve installed Postgres, redis, mosquitto and I’m using loraserver.exe and lora-app-server.exe.

Everithing works fine and I’m able to connect to the GUI from my browser typing https://localhost:8080.

The problem is that it seems the posgres db is not correctly created by loraserver. Infact in postgres I’ve 2 Dbs : 1 for lora-app-server created with several tables and 1 for loraserver which is empty (no tables).
Using now the GUI I’ve the following error :"relation channel_configuration_id " doesn’t exists…

What should I do?

Could you share your loraserver configuration / the parameters which you use for starting loraserver.exe?

loraserver --net-id 010203 --band EU_863_870 --gw-server-jwt-secret VX0DfnL3QyUHUNUeETjPBvKPJ3GOdnxtsRDakIPnXdY= --postgres-dsn postgres://loraserver_ns:loraserver_ns@localhost/loraserver_ns?sslmode=disable --log-node-frames true --db-automigrate true --gw-mqtt-username loraserver_ns --gw-mqtt-password loraserver_ns --gw-mqtt-password password --gw-create-on-stats --gw-stats-aggregation-intervals “minute,hour,day”

Hmm, --db-automigrate is set to true. That should create all the tables… Could you post the logoutput too (from the moment when you start LoRa Server)?

C:\Users\idomu\go_prj\bin\lora>loraserver --net-id 010203 --band EU_863_870 --gw-server-jwt-secret VX0DfnL3QyUHUNUeETjPBvKPJ3GOdnxtsRDakIPnXdY= --postgres-dsn postgres://loraserver_ns:loraserver_ns@localhost/loraserver_ns?sslmode=disable --log-node-frames true --db-automigrate true --gw-mqtt-username loraserver_ns --gw-mqtt-password loraserver_ns --gw-mqtt-password password --gw-create-on-stats --gw-stats-aggregation-intervals "minute,hour,day"
e[34mINFOe[0m[0000] starting LoRa Server                          e[34mbande[0m="EU_863_870" e[34mdocse[0m="https://docs.loraserver.io/" e[34mnet_ide[0m=010203 e[34mversione[0m=0.20.1
e[34mINFOe[0m[0000] setup redis connection pool                   e[34murle[0m="redis://localhost:6379"
e[34mINFOe[0m[0000] connecting to postgresql
e[34mINFOe[0m[0000] backend/gateway: connecting to mqtt broker    e[34mservere[0m="tcp://localhost:1883"
e[34mINFOe[0m[0000] connecting to application-server              e[34mca-certe[0m= e[34mservere[0m="127.0.0.1:8001" e[34mtls-certe[0m= e[34mtls-keye[0m=
e[34mINFOe[0m[0000] backend/gateway: connected to mqtt server
e[34mINFOe[0m[0000] backend/gateway: subscribing to rx topic      e[34mtopice[0m="gateway/+/rx"
e[34mINFOe[0m[0000] no network-controller configured
e[34mINFOe[0m[0000] backend/gateway: subscribing to stats topic   e[34mtopice[0m="gateway/+/stats"
e[34mINFOe[0m[0001] migrated node-sessions to new format          e[34merrorse[0m=0 e[34mmigratede[0m=0
e[34mINFOe[0m[0001] starting api server                           e[34mbinde[0m="0.0.0.0:8000" e[34mca-certe[0m= e[34mtls-certe[0m= e[34mtls-keye[0m=
e[34mINFOe[0m[0001] starting gateway api server                   e[34mbinde[0m="0.0.0.0:8002" e[34mca-certe[0m= e[34mtls-certe[0m= e[34mtls-keye[0m=

It looks like the loraserver.exe is not picking up the --db-automigrate flag. Please note that just that flag, without true should be enough. Please compare with the lora-app-server.exe config as in both cases the config flag is parsed the same way.

When everything works, you should see a log message migrations applied with a count=X indicating the number of migrations applied.

problem solved by typing --db-automigrate just after the --band option.

I had a similar pproblem with --jwt-secret: typing at the end of the command line it wasn’t catch by the runtime, I had to move it at the beginning of the command line.

Solved!

1 Like