Hi all,
I am running a postgresql cluster using Patroni on consul 1.8 and have added 2 services called pgwrite and pgread, one for read and the other for write requests, and it works just fine. Now I need to add a replica from outside the cluster and join it to the cluster using consul ingress. Here are my config file and the command that I run the ingress:
Kind = "ingress-gateway"
Name = "ingress-pgwrite"
Listeners = [
{
Port = 5555
Protocol = "tcp"
Services = [
{
Name = "pgwrite"
}
]
}
]
docker run --restart always -d --network host --name ingress-pgwrite consul-envoy:1.8.4 -gateway=ingress -proxy-id ingress-pgwrite -admin-bind localhost:19002 -address "****:5555" -token=**********
Now the service is registered and is also healthy. But when I want to request to the postgres service using the ingress, it gives me this error:
psycopg2.OperationalError: expected authentication request from server, but received H
and I have no clue what is it about. My guess is that the port is visible but when the client tries to connect to the server it encounters an unknown response.
I also set the intentions so the ingress-pgwrite can talk to pgwrite service but it really doesn’t make any difference.
Can anyone tell me where would the problem be?
Thanks