LoRaServer database postgresql failed


#1

Hi!
I’m trying to install LoRaServer on a Dell running Ubuntu Server 18.04 and when I start LoRaServer, it displays this:

Oct 29 14:40:48 CMTJM42 loraserver[3785]: time=“2018-10-29T14:40:48Z” level=info msg=“connecting to postgresql”
Oct 29 14:40:48 CMTJM42 loraserver[3785]: time=“2018-10-29T14:40:48Z” level=error msg=“ping database error, will retry in 2s: pq: password authentication failed for user “loraserver””

And displays the same error (switching the user) for Lora Gateway Bridge and Lora App Server.

I think the error is clear, there is a password database problem, but I’m starting on this and don’t know what to do.
I have read all the posts about this topic, and made the modifications on:
loraserver.toml

POSTGRES_DSN="postgres://loraserver_ns:dbpassword@localhost/loraserver_ns?sslmode=disable"

lora-gateway-bridge.toml

POSTGRES_DSN="postgres://loraserver_as:dbpassword@localhost/loraserver_as?sslmode=disable"

And made the config postgre database where I modify the listen_addresses and add 2 lines on the end of hba.conf.

But the problem is still the same…

root@CMTJM42:/# sudo journalctl -f -n 10 -u loraserver
-- Logs begin at Mon 2018-10-29 10:36:02 UTC. --
Nov 06 10:37:21 CMTJM42 loraserver[1167]: time="2018-11-06T10:37:21Z" level=error msg="ping database error, will retry in 2s: pq: password authentication failed for user \"loraserver\""
root@CMTJM42:/# lora-gateway-bridge
INFO[0000] starting LoRa Gateway Bridge                  docs="https://www.loraserver.io/lora-gateway-bridge/" version=2.6.1
INFO[0000] backend: set max reconnect interval: 10m0s
INFO[0000] backend: TLS config is empty
INFO[0000] backend: connecting to mqtt broker            server="tcp://127.0.0.1:1883"
INFO[0000] gateway: starting gateway udp listener        addr="0.0.0.0:1700"
FATA[0000] could not setup gateway backend: listen udp 0.0.0.0:1700: bind: address already in use
root@CMTJM42:/# lora-app-server
INFO[0000] starting LoRa App Server                      docs="https://www.loraserver.io/" version=2.3.0
INFO[0000] connecting to postgresql
ERRO[0000] ping database error, will retry in 2s: pq: password authentication failed for user "root"
ERRO[0002] ping database error, will retry in 2s: pq: password authentication failed for user "root"
ERRO[0004] ping database error, will retry in 2s: pq: password authentication failed for user "root"
^C
root@CMTJM42:/# loraserver
FATA[0000] read configuration file error                 error="While parsing config: (221, 51): unexpected token"

When I try to start LoRa Server from the CLI:

root@CMTJM42:/# sudo -u loraserver loraserver -c /etc/loraserver/loraserver.toml
FATA[0000] error loading config file                     config=/etc/loraserver/loraserver.toml error="While parsing config: (221, 51): unexpected token"

Thanks in advance :slight_smile:


#2

A post was merged into an existing topic: Error, will retry in 2s: pq: password authentication failed for user “loraserver”"


#3