Thread: Can't connect to the postgresql server

Can't connect to the postgresql server

From
"Chris Guo"
Date:
<div class="Section1"><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Dear all,</span></font><p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">I just installed postgresql 0.8.3 on the fedora core linux 3, I also installed pgadmin 1.0.2 in my
computer.But I am having trouble connecting postgresql by using pgadmin, it shows me the error message” An error
occurred:Error connecting to the server: could connect to server: Connection refused (0x0000274D/10061) Is the server
runningon host “192.168.3.118” and accepting TCP/IP connections on port 5432?”</span></font><p class="MsoNormal"><font
face="Arial"size="2"><span style="font-size:10.0pt; 
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">I am pretty sure that the postgresql server is running, but I figured it’s because the command I use
torun the postgresql serve is not quite right and the port 5432 is not open to listen to the request since I didn’t
findport 5432 after using namp to check the open port on the linux server. </span></font><p class="MsoNormal"><font
face="Arial"size="2"><span style="font-size:10.0pt; 
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Anybody has idea how to solve this problem? </span></font><p class="MsoNormal"><font face="Arial"
size="2"><spanstyle="font-size:10.0pt; 
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Thanks in advance.</span></font><p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Chris </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial"> </span></font></div>

Re: Can't connect to the postgresql server

From
Raphaël Enrici
Date:
Chris Guo wrote:
> Dear all,
> 
>  
> 
> I just installed postgresql 0.8.3 on the fedora core linux 3, I also
> installed pgadmin 1.0.2 in my computer. But I am having trouble connecting
> postgresql by using pgadmin, it shows me the error message" An error
> occurred: Error connecting to the server: could connect to server:
> Connection refused (0x0000274D/10061) Is the server running on host
> "192.168.3.118" and accepting TCP/IP connections on port 5432?"
> 
> I am pretty sure that the postgresql server is running, but I figured it's
> because the command I use to run the postgresql serve is not quite right and
> the port 5432 is not open to listen to the request since I didn't find port
> 5432 after using namp to check the open port on the linux server. 

Hi Chris,

please make sure that you have "tcpip_socket = true" in the
postgresql.conf file (located in /etc/postgresql on my system).
After that tune the parameters in the pg_hba.conf file located in the
same directory as postgresql.conf. Then restart your PostgreSQL server
and everything should be ok.
In the next release of pgAdmin it should be possible to connect directly
to the local socket without needing to configure TCP/IP listening on
server side.

Regards,
Raphaël