@@ -629,9 +629,8 @@ DETAIL: Failed system call was semget(5440126, 17, 03600).
629
629
630
630
<para>
631
631
<screen>
632
- psql: could not connect to server: Connection refused
633
- Is the server running on host "server.joe.com" and accepting
634
- TCP/IP connections on port 5432?
632
+ psql: error: connection to server at "server.joe.com" (123.123.123.123), port 5432 failed: Connection refused
633
+ Is the server running on that host and accepting TCP/IP connections?
635
634
</screen>
636
635
This is the generic <quote>I couldn't find a server to talk
637
636
to</quote> failure. It looks like the above when TCP/IP
@@ -640,19 +639,22 @@ psql: could not connect to server: Connection refused
640
639
</para>
641
640
642
641
<para>
643
- Alternatively, you'll get this when attempting Unix-domain socket
642
+ Alternatively, you might get this when attempting Unix-domain socket
644
643
communication to a local server:
645
644
<screen>
646
- psql: could not connect to server: No such file or directory
647
- Is the server running locally and accepting
648
- connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
645
+ psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
646
+ Is the server running locally and accepting connections on that socket?
649
647
</screen>
648
+ If the server is indeed running, check that the client's idea of the
649
+ socket path (here <literal>/tmp</literal>) agrees with the server's
650
+ <xref linkend="guc-unix-socket-directories"/> setting.
650
651
</para>
651
652
652
653
<para>
653
- The last line is useful in verifying that the client is trying to
654
+ A connection failure message always shows the server address or socket
655
+ path name, which is useful in verifying that the client is trying to
654
656
connect to the right place. If there is in fact no server
655
- running there, the kernel error message will typically be either
657
+ listening there, the kernel error message will typically be either
656
658
<computeroutput>Connection refused</computeroutput> or
657
659
<computeroutput>No such file or directory</computeroutput>, as
658
660
illustrated. (It is important to realize that
@@ -663,7 +665,7 @@ psql: could not connect to server: No such file or directory
663
665
linkend="client-authentication-problems"/>.) Other error messages
664
666
such as <computeroutput>Connection timed out</computeroutput> might
665
667
indicate more fundamental problems, like lack of network
666
- connectivity.
668
+ connectivity, or a firewall blocking the connection .
667
669
</para>
668
670
</sect2>
669
671
</sect1>
0 commit comments