chirpstack-fuota-server
chirpstack-fuota-server copied to clipboard
Parsing error if double quote (") character is present in postgreSQL user password
ChirpStack FUOTA server will fail to start if double quote (") character is present in postgreSQL user password.
Dec 11 18:00:25 dev-chirpstack chirpstack-fuota-server[76143]: time="2023-12-11T18:00:25Z" level=warning msg="storage: ping PostgreSQL database error, will retry in 2s" error="parse "postgres://user:XXXXXX*{\"NY+": invalid port ":XXXXXX*{\"NY+" after host"
Escaping the double quote using a \ does not help. Using englobing single quote and leave the double quote character unescaped does not work either.
NOTE: this issue does not occur in chirpstack (latest version). We use the same escaped password and the connection to postgresql database establishes correctly.
Used DSN format:
postgres://user:password@server/db?sslmode=require
Just in case others stumble on this issue, a workaround is to use the dsn string format 'user=chirpstack_ns dbname=chirpstack_ns sslmode=disable'
.