The rest of the error is "before or while processing the request."
I have a CentOS server running Postgres on an internal network scheme 192.168.11.0/24 for which I also have pgAdmin4 also installed and running. pgAdmin is connecting via localhost and I can successfully connect to my database.
I am running a windows 10 client on 192.168.11.100 with Lazarus trying to get a TPQConnection object to connect. This error comes up when I click the "Connected" property with all the connection information filled in.
The server is running on 192.168.11.25.
I have the Postgres client libraries extracted and in my system path (the bin directory) for the version of Postgres I'm running (12.5)
My pg_hba.conf file is set up to allow the connecton - Here are the relevant lines:
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 md5
host all all 192.168.11.0/24 md5
# IPv6 local connections:
host all all ::1/128 md5
I've set the password for the postgres user and verified that the account works with pgAdmin.
I'm not sure if this has to do with Lazarus or if this is a postgres client library problem.
I have also tried installing the Postgres ODBC client and attempted to create a DSN and was unsuccessful with that as well. I'm guessing this could be a configuration problem on the server not sure though.
Rich
question from:
https://stackoverflow.com/questions/65849006/connection-to-the-database-failed-server-closed-the-connection-unexpectedly-t 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…