Sens-backend service is failing to start with error

backend.yaml

cat /etc/sensu/backend.yml

state-dir: "/var/lib/sensu"
api-url: "http://localhost:8080"

insecure-skip-tls-verify: true
log-level: "error"
etcd-advertise-client-urls: "http://xxx:2379"
etcd-listen-client-urls: "http://xxx:2379"
etcd-listen-peer-urls: "http://xxx:2380"
etcd-initial-advertise-peer-urls: "http://xxx:2380"
etcd-initial-cluster: "sensu-go1=http://xxx:2380"
etcd-initial-cluster-state: "new"
etcd-initial-cluster-token: "sensu"
etcd-name: "sensu-go1"

when i start the service im seeing below error

root@localhost:~/sensu-go/bin# ./sensu-backend -c /etc/sensu/backend.yml start
{"component":"ent-store","error":"error migrating database to latest version: failed to connect to `host=/tmp user=root database=`: dial error (dial unix /tmp/.s.PGSQL.5432: connect: no such file or directory)","level":"error","msg":"error opening postgres store, retrying...","time":"2022-10-13T06:34:15Z"}

root@localhost:~/sensu-go/bin# sensu-backend version
sensu-backend version 6.8.2+ce

root@localhost:~/sensu-go/bin# etcd --version
etcd Version: 3.5.5
Git SHA: 19002cfc6
Go Version: go1.19.2
Go OS/Arch: linux/amd64

Hmmmm, did you apply a postgres config to your cluster? That looks like Sensu’s trying to open up a connection to postgres and cannot.

I built the OSS executable with the main branch… Later I changed to v*.. branch the issue got resolved.