Azure Database for PostgreSQL server connection is not working when using a macbook pro.With windows is ok

I can’t connect to my posture database when I’m working with mac. Windows i confect with no problem. Already added to firewall rule, all ip address. Already turn off firewall on mac book, tried with sql shell, and the error is that:˜server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.”