The first problem solved as i found a reference in another post an execute below command(s):
loraserver --config /etc/loraserver/loraserver.toml
lora-app-server --config /etc/lora-app-server/lora-app-server.toml
Everything seems to run ok, except two fatal errors:
As a result, i can’t establish communication between loraserver and lora-gateway-bridge (which communicates with packet forwarder).
Any idea/advice about possible reasons of this error?
From your errors, ports 8000 and 8001 are in use, probably because you didn’t stop the services before running them manually.
Thanks for the reply @iegomez.
I will try tomorrow morning stop services first and run manually them, as you mentioned. If you know, is it better to run services automatically or manually using “loraserver --config /etc/loraserver/loraserver.toml”?
PS: This is the reason of not showing in loraserver (client) the data (which send between lora-gateway-bridge and IC880a-spi, the concentrator)
Usually when deploying to production you want your programs to run as a service, but if you are developing over Orne’s code you are fine running it manually to debug different configurations, try new implementations, etc. Just be sure you have the correct conf files and permissions when you run things as a service.
I followed the instruction to install lora server and lora app server under Ubuntu16.04,and i have two problems and i am very confused.
first,the instuction on the lora server says:
“How you need to (re)start and stop LoRa Server depends on if your distribution uses init.d or systemd.
sudo /etc/init.d/loraserver [start|stop|restart|status]
sudo systemctl [start|stop|restart|status] loraserver
Now you’ve setup LoRa Server, it is a good time to verify that LoRa Server is actually up-and-running. This can be done by looking at the LoRa Server log output.
Like the previous step, which command you need to use for viewing the log output depends on if your distribution uses init.d or systemd.
All logs are written to /var/log/loraserver/loraserver.log. To view and follow this logfile:
tail -f /var/log/loraserver/loraserver.log
journalctl -u loraserver -f -n 50”
I think it means i can use the lora server log to confirm if my lora server is working well.there is no directory in the /var/log/loraserver/loraserver.log,so i think my distribution uses system to start.
when i use
“sudo systemctl start loraserver
journalctl -u loraserver -f -n 50” it gets a error.
and then i find a command in a post.
loraserver --config /etc/loraserver/loraserver.toml
lora-app-server --config /etc/lora-app-server/lora-app-server.toml.
when i use this command ,it is ok?does it mean my lora server is well done ?but why i use "journalctl -u loraserver -f -n 50"it makes error?i think it does not load the configration file in the /etc/loraserver/loraserver.toml,do i right?what i need to do？
Thank you very much for your reply.
Did you change the
postgresql.dsn value ?
For loraserver in
For lora-app-server in
thanks your reply.you are very careful:blush:
yes, i have changed my value.
and in /etc/lora-app-server/lora-app-server.toml
i think it is right.
i don’t know how to do .
thanks a lot
Have you tried to restart loraserver (so that it can load the updated configuration)?
Edit: I have moved your post as this question has already been asked. The solution might already be in this thread
thank you brocaar,you are very kind.
when i restart,something different happens.
i use "journalctl -u loraserver -f -n 50 "and “ loraserver --config /etc/loraserver/loraserver.toml
”for lora server.
"journalctl -u lora-app-server -f -n 50"and “lora-app-server --config /etc/lora-app-server/lora-app-server.toml”for lora-app-server
from the before replies in this topic,i think my problem is ports 8000 and 8080 are in use,the friend said "probably because you didn’t stop the services before them manully ."but i have already restart loraserver and lora-app-server.what should i do next?thank you very much for your reply.
hello，i have the same problem with you，can you tell me how to deal with error:bind address already in use? i have tried several solutions but don’t work.
brocaar,thank you for your help with me ! I am so stupid:sob:
Hi guys, please help me on this. I have exactly followed the instructions of quick install given on https://www.loraserver.io/install/quick-install/. But when I try to reboot the lora server and try to see the logs then it gives me this error. I tried all sorts of online resources but couldn’t resolve it. could anyone help me on where i’m going wrong.
I have created loraserver_ns and loraserver_as as databases for the lora server.I have set two different passwords for lora_ns and lora_as.
– set up the users and the passwords
– (note that it is important to use single quotes and a semicolon at the end!)
create role loraserver_as with login password ‘ABC’;
create role loraserver_ns with login password ‘XYZ’;
– create the database for the servers
create database loraserver_as with owner loraserver_as;
create database loraserver_ns with owner loraserver_ns;
– change to the LoRa App Server database
– enable the pq_trgm extension
– (this is needed to facilidate the search feature)
create extension pg_trgm;
– exit psql
MY DSN CONFIG IN POSTGRES is as follows:
The DB user trying to connect is wrong (it says
loraserver instead of
loraserver_ns), which is probably due to a wrong dsn. At your loraserver.toml you should have something like this (following your given steps):
The same advice goes for lora-app-server if you have a similar problem.
Thanks for quick response. As i have posted in my question the dsn is already configured as you said . Still it says loraserver instead of loraserver_ns.
I have configure it as follows.
Then check the location of your
toml file is correct. Also, if you modify it, you need to restart the service for it to pick up any changes.
I have restarted it many times but still got the same error. That means i might be wrong with the location of toml file.
Could you please expand on what exactly you mean by the location of toml file?. Thanks a lot.
You may see where the conf file may be located (or how to define a location) here: https://www.loraserver.io/loraserver/install/config/. The other modules (app server and gateway bridge) have analogous docs.
my message is:
level=error msg=“ping database error, will retry in 2s: dial tcp [::1]:5432: connect: connection refused”