Cisco DCNM: pgAdmin Management Tool gives error could not connect to server: Connection refused

Summary: When connecting to a PostgreSQL server using pgAdmin Management Tools, the following message is seen "Error: could not connect to server: Connection refused (0x0000274D/10061)"

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

Before anyone can use the pgAdmin client to manage the objects that reside on your Postgres server, a user must define a connection to the server. User is prompted to enter the password of the user that is associated with the defined server. (the default user create during the installation is 'dcnmuser')

After entering the password and clicking OK user receives a connection error message indicating it was refused, and it will give a port number. 

Below is the error message that you see indicating port 5433. (depending on the port it is using it could show port 5432)
Error: could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5433?
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5433?
 

Cause

Most likely this is due to the port on the post postgresql.conf file is not the same as in the pgAdmin4 connection port.

Resolution

To resolve the port issue, follow the steps below from the pgAdmin Management Tool. 

1. Right-click PostgreSQL 10 Choose properties.
2. At the top, select connection.
3. Try changing the port from 5433 to 5432 or conversely.
 
NOTE: If user receives a message asking to disconnect from the server and then reconnect, this is a must to apply the changes. 
Article Properties
Article Number: 000224730
Article Type: Solution
Last Modified: 06 May 2024
Version:  1
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.