Due to the limited local resources, in the public testing environment to build a pgsql environment, from the database local localhost access to normal, the same network segment of the remote machine access reported the following error
"Server closed the connection unexpectedly. This probably means the server terminated abnormally before or while processing the request "
Check the PG Log for error log Fatal:no pg_hba.conf entry for host "XX. Xx. Xx. XX ", the reason for this error is because the client remote access PostgreSQL is limited because PostgreSQL is not able to connect by default except for machines outside the machine. Modify the pg_hba.conf and postgresql.conf two configuration files to resolve.
Please refer to 44810899 for the modification method.
Reference Document Address:
Program link PostgreSQL times wrong "No pg_hba.conf entry"-CSDN Blog
44810899
Pgsql remote machine cannot connect database error handling method