<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.16.3">
</HEAD>
<BODY>
Perhaps : check and adjust the port in the .conf file.<BR>
<BR>
Value in your .conf is port = <B>5433</B>, <BR>
<BR>
but message says no connection on <FONT COLOR="#000000">Is the server running locally and accepting</FONT> <FONT COLOR="#000000">connections on Unix domain socket &quot;/var/run/postgresql/.s.PGSQL.</FONT><FONT COLOR="#000000"><B>5432</B></FONT> <FONT COLOR="#000000">?</FONT><BR>
<BR>
or try uncommenting the line<BR>
<BR>
<FONT COLOR="#000000">#listen_addresses = 'localhost'</FONT><BR>
<BR>
in the .conf file<BR>
<BR>
<BR>
<BR>
<BR>
Le samedi 04 octobre 2008 &#224; 21:35 +0200, Stanislav Bek a &#233;crit&nbsp;:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">&gt;&gt; Hi,</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; I have problem to connect to postgreSQL server from grass.</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; GRASS 6.3.0 (opava):~ &gt; psql -l</FONT>
<FONT COLOR="#000000">&gt;&gt;         List of databases</FONT>
<FONT COLOR="#000000">&gt;&gt;    Name    |  Owner   | Encoding &gt; -----------+----------+----------</FONT>
<FONT COLOR="#000000">&gt;&gt;  gis1      | bekas    | UTF8</FONT>
<FONT COLOR="#000000">&gt;&gt;  postgres  | postgres | UTF8</FONT>
<FONT COLOR="#000000">&gt;&gt;  template0 | postgres | UTF8</FONT>
<FONT COLOR="#000000">&gt;&gt;  template1 | postgres | UTF8</FONT>
<FONT COLOR="#000000">&gt;&gt; (4 rows)</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; GRASS 6.3.0 (opava):~ &gt; db.connect driver=pg database=gis1 &gt; &gt; GRASS 6.3.0 (opava):~ &gt; db.test test=test1</FONT>
<FONT COLOR="#000000">&gt;&gt; create table grass_test1 (i1 integer, d1 double precision, c1 varchar(20))</FONT>
<FONT COLOR="#000000">&gt;&gt; DBMI-Postgres driver error:</FONT>
<FONT COLOR="#000000">&gt;&gt; Cannot connect to Postgres: could not connect to server: No such file or directory</FONT>
<FONT COLOR="#000000">&gt;&gt;         Is the server running locally and accepting</FONT>
<FONT COLOR="#000000">&gt;&gt;         connections on Unix domain socket &quot;/var/run/postgresql/.s.PGSQL.5432&quot;?</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; &gt; ERROR: Unable to open database &lt;gis1&gt;</FONT>
<FONT COLOR="#000000">&gt;&gt; ERROR: EXECUTE: ******** ERROR ********</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; etc.</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; I use PostgreSQL 8.3.3.</FONT>
<FONT COLOR="#000000">&gt;&gt; &gt; Don't you have an idea why it is not working?</FONT>
<FONT COLOR="#000000">&gt;</FONT>
<FONT COLOR="#000000">&gt;The error message is quite clear:</FONT>
<FONT COLOR="#000000">&gt;</FONT>
<FONT COLOR="#000000">&gt;&quot;could not connect to server: No such file or directory</FONT>
<FONT COLOR="#000000">&gt;          Is the server running locally and accepting</FONT>
<FONT COLOR="#000000">&gt;          connections on Unix domain socket &quot;/var/run/postgresql/.s.PGSQL.5432&quot;?&quot;</FONT>
<FONT COLOR="#000000">&gt;</FONT>
<FONT COLOR="#000000">&gt;This is a PostgreSQL issue (you will probably get the same message if you try to connect with 'psql -h localhost gis1').</FONT>

<FONT COLOR="#000000">'psql -h localhost gis1' works, I enter psql environment with this.</FONT>

<FONT COLOR="#000000">&gt;</FONT>
<FONT COLOR="#000000">&gt;This means that PostgreSQL is not installed to accept connections via tcp/. You can change that in the relevant config file (probably something like /etc/postgresql/8.3/main/postgresql.conf - but that depends on your distribution).</FONT>

<FONT COLOR="#000000">I' ve tried to change some items but without success. (I am using Ubuntu Hardy Heron.)</FONT>
<FONT COLOR="#000000">I am sending the important part of the postgresql.conf file:</FONT>
<FONT COLOR="#000000">Thank you very much for your help.</FONT>

<FONT COLOR="#000000">#------------------------------------------------------------------------------</FONT>
<FONT COLOR="#000000"># FILE LOCATIONS</FONT>
<FONT COLOR="#000000">#------------------------------------------------------------------------------</FONT>

<FONT COLOR="#000000"># The default values of these variables are driven from the -D command-line</FONT>
<FONT COLOR="#000000"># option or PGDATA environment variable, represented here as ConfigDir.</FONT>

<FONT COLOR="#000000">data_directory = '/var/lib/postgresql/8.3/main'                # use data in another directory</FONT>
<FONT COLOR="#000000">                                        # (change requires restart)</FONT>
<FONT COLOR="#000000">hba_file = '/etc/postgresql/8.3/main/pg_hba.conf'        # host-based authentication file</FONT>
<FONT COLOR="#000000">                                        # (change requires restart)</FONT>
<FONT COLOR="#000000">ident_file = '/etc/postgresql/8.3/main/pg_ident.conf'        # ident configuration file</FONT>
<FONT COLOR="#000000">                                        # (change requires restart)</FONT>

<FONT COLOR="#000000"># If external_pid_file is not explicitly set, no extra PID file is written.</FONT>
<FONT COLOR="#000000">external_pid_file = '/var/run/postgresql/8.3-main.pid'                # write an extra PID file</FONT>
<FONT COLOR="#000000">                                        # (change requires restart)</FONT>


<FONT COLOR="#000000">#------------------------------------------------------------------------------</FONT>
<FONT COLOR="#000000"># CONNECTIONS AND AUTHENTICATION</FONT>
<FONT COLOR="#000000">#------------------------------------------------------------------------------</FONT>

<FONT COLOR="#000000"># - Connection Settings -</FONT>

<FONT COLOR="#000000">#listen_addresses = 'localhost'                # what IP address(es) to listen on;</FONT>
<FONT COLOR="#000000">                                        # comma-separated list of addresses;</FONT>
<FONT COLOR="#000000">                                        # defaults to 'localhost', '*' = all</FONT>
<FONT COLOR="#000000">                                        # (change requires restart)</FONT>
<FONT COLOR="#000000">port = 5433                                # (change requires restart)</FONT>
<FONT COLOR="#000000">max_connections = 100                        # (change requires restart)</FONT>
<FONT COLOR="#000000"># Note:  Increasing max_connections costs ~400 bytes of shared memory per </FONT>
<FONT COLOR="#000000"># connection slot, plus lock space (see max_locks_per_transaction).  You might</FONT>
<FONT COLOR="#000000"># also need to raise shared_buffers to support more connections.</FONT>
<FONT COLOR="#000000">#superuser_reserved_connections = 3        # (change requires restart)</FONT>
<FONT COLOR="#000000">unix_socket_directory = '/var/run/postgresql'                # (change requires restart)</FONT>
<FONT COLOR="#000000">#unix_socket_group = ''                        # (change requires restart)</FONT>
<FONT COLOR="#000000">#unix_socket_permissions = 0777                # begin with 0 to use octal notation</FONT>
<FONT COLOR="#000000">                                        # (change requires restart)</FONT>
<FONT COLOR="#000000">#bonjour_name = ''                        # defaults to the computer name</FONT>
<FONT COLOR="#000000">                                        # (change requires restart)</FONT>

<FONT COLOR="#000000"># - Security and Authentication -</FONT>

<FONT COLOR="#000000">#authentication_timeout = 1min                # 1s-600s</FONT>
<FONT COLOR="#000000">ssl = true                                # (change requires restart)</FONT>
<FONT COLOR="#000000">#ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH'        # allowed SSL ciphers</FONT>
<FONT COLOR="#000000">                                        # (change requires restart)</FONT>
<FONT COLOR="#000000">#password_encryption = on</FONT>
<FONT COLOR="#000000">#db_user_namespace = off</FONT>

<FONT COLOR="#000000"># Kerberos and GSSAPI</FONT>
<FONT COLOR="#000000">#krb_server_keyfile = ''                # (change requires restart)</FONT>
<FONT COLOR="#000000">#krb_srvname = 'postgres'                # (change requires restart, Kerberos only)</FONT>
<FONT COLOR="#000000">#krb_server_hostname = ''                # empty string matches any keytab entry</FONT>
<FONT COLOR="#000000">                                        # (change requires restart, Kerberos only)</FONT>
<FONT COLOR="#000000">#krb_caseins_users = off                # (change requires restart)</FONT>
<FONT COLOR="#000000">#krb_realm = ''                           # (change requires restart)</FONT>

<FONT COLOR="#000000"># - TCP Keepalives -</FONT>
<FONT COLOR="#000000"># see &quot;man 7 tcp&quot; for details</FONT>

<FONT COLOR="#000000">#tcp_keepalives_idle = 0                # TCP_KEEPIDLE, in seconds;</FONT>
<FONT COLOR="#000000">                                        # 0 selects the system default</FONT>
<FONT COLOR="#000000">#tcp_keepalives_interval = 0                # TCP_KEEPINTVL, in seconds;</FONT>
<FONT COLOR="#000000">                                        # 0 selects the system default</FONT>
<FONT COLOR="#000000">#tcp_keepalives_count = 0                # TCP_KEEPCNT;</FONT>
<FONT COLOR="#000000">                                        # 0 selects the system default</FONT>










<FONT COLOR="#000000">_______________________________________________</FONT>
<FONT COLOR="#000000">grass-user mailing list</FONT>
<FONT COLOR="#000000"><A HREF="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</A></FONT>
<FONT COLOR="#000000"><A HREF="http://lists.osgeo.org/mailman/listinfo/grass-user">http://lists.osgeo.org/mailman/listinfo/grass-user</A></FONT>
</PRE>
</BLOCKQUOTE>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<B>Benoit ANDRE</B><BR>
<I>G&#233;ologue - Hydrologue</I>
</TD>
<TD ALIGN="right">
<A HREF="http://www.bcgeol.be"><IMG SRC="cid:1223161525.4327.83.camel@slump" ALIGN="middle" BORDER="0"></A>
</TD>
</TR>
</TABLE>

<HR SIZE="4">
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<B>Bureau Conseil en G&#233;ologie</B><BR>
Rue de Leuze, 433<BR>
<B><U>B-5300 VEZIN</U></B><BR>
<B><U>BELGIQUE</U></B><BR>
<BR>
T&#233;l.: +32 81 58 26 11<BR>
Fax.: +32 81 58 26 12<BR>
<A HREF="mailto:benoit.andre@bcgeol.be">Contacter...</A><BR>
<A HREF="http://www.bcgeol.be">Bureau Conseil en G&#233;ologie</A> 
<HR SIZE="4">

</TD>
</TR>
</TABLE>
</BODY>
</HTML>