Installation failure: pq: password authentication failed

Hi, all. I’ve been using Chirpstack and LoRaServer for years. Really nice software, and I appreciate all the hard work that has gone into it.

I am now having difficulty installing the latest version (as apt-get delivered it today) onto a freshly-installed Ubuntu 18 server, following the instructions closely.

I’ve got PostgreSQL, REDIS, and MQTT installed. When I install, configure, and try to run the network and application servers, I note the following:

  • The installer creates user-IDs for networkserver and appserver (I will refer to these as the “new” names).
  • The instructions guide the user to set up both Postgres and the config files using chirpstack_ns and chirpstack_as (I will refer to these as the “old” names).
  • The startup scripts in /etc/systemd/system refer to the new names
  • /etc/systemd/system service files use the new names
  • The /etc/chirpstack-* directories have user and group set to the new names

When I try to start the network server, I get the message

error="pq: password authentication failed for user “networkserver”

If I add the new names to Postgres and update the config files accordingly, I still get the authentication failure message. I see the same behavior for the application server. I’ve also tried this on a fresh Ubuntu 20. The result is the same.

Can you please help?

Thank you.

Just a wild guess, it might be the hba.conf?

It might only allow auth on a unix-socket if you installed fresh.

Good thought. I’ve had similar issues with MySQL in the past.

Here’s a curious thing – I re-installed using the “Quick Start” docs here:

Previously, I had followed the more detailed instructions here: (drilling down from there).

Something’s different. Using QuickStart, everything works.

I have not had time to go through the two doc paths and do a diff. But there’s clearly something different!

Thanks for your reply.