skip to Main Content

First, I was having pgAdmin fatal error, the application could not be contacted. so I uninstalled pgAdmin and reinstalled it. Now, when I write queries, PostgreSQL says "Connection to pgAdmin server has been lost".

Then, I logged out and into pgAdmin, but it says different error message when I ran my query this time around.

Tried it again and it says another error message-"message contents do not agree with length with message type D"

I have tried refreshing the server and database but it did not solve the problem. enter image description here

2

Answers


  1. Try to connect to your database using psql to check that the problem is not from the database server.

    Navigate to the directory where you have PostgreSQL and then navigate to bin folder then run the following command to connect to your database.

    .psql -U <your_username> -p <your_port_number> <your_database_name>
    

    Then enter the password to connect to your database server.

    If there is no problem with the connection to the database using psql then most probably the connection settings in pgAdmin is not set probably.

    Recheck that the username, password, host and port number are set correct in pgAdmin.

    Login or Signup to reply.
  2. There can be multiple reasons why you might get a fatal error. It can range from admissibility issues to network issues as well.

    What you can do is:

    • Close the server connection and pgAdmin app. Right-click on the pgAdmin app and try running it as an administrator.

    • Ensure you have a stable internet connection and an updated version of pgAdmin.

    • Restart the PostgreSQL connection service by running the following command (If you use Linux)

      #sudo service postgresql restart

    The issue of length mismatch is actually an issue of synchronization if your app uses a multithreaded architecture make sure there is sufficient exclusion implemented.

    If the issue still persists, try using an alternate DB tool such as psql or PSequel to make sure that the problem is not with the configuration settings of pgAdmin

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search