Weird error chirpstack[83824]: Error: redefinition of table `postgresql` for key `postgresql` at line 6025 column 1

Hi Folks

Clean install on Ubuntu 20.04.1

chirpstack -V => chirpstack 4.0.5
psql (PostgreSQL) 14.5 (Ubuntu 14.5-0ubuntu0.22.04.1) <<< Maybe too new ?

Running CS in either command line under the chirpstack user OR systemctl start I’m getting a weird postgresql error as follows:

chirpstack -c /etc/chirpstack
Error: redefinition of table postgresql for key postgresql at line 6025 column 1

I have deleted the DB and re-created it clean but still no luck.

postgresql integration is disabled so this is only for Chirpstack’s use.
FWIIW:

[postgresql]
  dsn="postgres://chirpstack:chirpstack@localhost/chirpstack?sslmode=disable"
  max_open_connections=10
  min_idle_connections=0

Any suggestions ?

Cheers
Vince

I think this is not a database issue, but a configuration issue. I believe what the error intended to say is that you have defined [postgresql] twice in your configuration (chirpstack.toml).

Thanks Brocaar,

Right you are.
If one is messy and leaves an old version of the config file in /etc/chirpstack it will get picked too up of course. Missed that point in the docs.