[GRASS-user] Grass 7 and postgresql

Hi all,

Our GIS infrastructure is based on Grass 6.4.4, postrgresql 9.x and Qgis. Those all together are perfectly working.

We want to update from 6.4.4 to 7.0.4. But we are confronted to a problem with the database : connection to postgresql is no more possible for all our maps (but still working with 6.4.4, and all the other soft overlying on postgresql). The message is the ‘normal’ message wen the connection is no possible (in french) :

DBMI-PostgreSQL erreur de pilote :
Connection failed.
n’a pas pu se connecter au serveur : Aucun fichier ou dossier de ce type
Le serveur est-il actif localement et accepte-t-il les connexions sur la
socket Unix « /var/run/postgresql/.s.PGSQL.5432 » ?

I really don’t understand the problem.

Any idea ?

Best regards,

Benoit

(attachments)

btn_liprofile_blue_80x15_fr_FR.png
bcg_logo.gif
BCG_bas.gif
In-2C-21px-TM.png
icone_fb.gif
Modere_SocialMarketer_logomark.png

···

Benoit André
Directeur - Gérant

benoit.andre@bcgeol.be
Tel. | +32 475 61 84 94
skype | benoit_andre_bcg
Voir le profil de Benoit André sur LinkedIn

BCG SPRL
Tél. | +32(0)81 58 26 11
Fax | +32(0)81 58 26 12
Chemin de la Foliette, 4 Bte 2
B-5000 - Namur
www.bcgeol.be - plan d’accès

BCG LOGO

Suivez-nous sur Lien LinkedinLien Facebook

Allons plus loin dans le respect de l’environnement : N’utilisons que des produits sans empreinte écologiqueLogo Modere

On 02/09/16 11:38, Benoit ANDRE wrote:

Hi all,

Our GIS infrastructure is based on Grass 6.4.4, postrgresql 9.x and
Qgis. Those all together are perfectly working.

We want to update from 6.4.4 to 7.0.4. But we are confronted to a
problem with the database : connection to postgresql is no more possible
for all our maps (but still working with 6.4.4, and all the other soft
overlying on postgresql). The message is the 'normal' message wen the
connection is no possible (in french) :

/DBMI-PostgreSQL erreur de pilote ://
//Connection failed.//
//n'a pas pu se connecter au serveur : Aucun fichier ou dossier de ce type//
// Le serveur est-il actif localement et accepte-t-il les connexions
sur la//
// socket Unix « /var/run/postgresql/.s.PGSQL.5432 » ?/

I really don't understand the problem.

Any idea ?

We need a bit more information to be able to help you. What command leads to this error ? What did you do to move from grass6 to grass7 ? How is the data connection defined ('v.db.connect -p' and 'db.connect -p') ?

Moritz

Moritz,

First, I move from 6 to 7 with v.build or v.build.all (depends on locations)

Here, connections are already gone…

I connect with :
db.connect driver=pg database=“host=192.168.1.200,dbname=administration”

db.connect -p :
driver: pg
database: host=192.168.1.200,dbname=administration
schema: public
group:

db.login --overwrite user=benoit
ATTENTION: DB connection <pg/host=192.168.1.200,dbname=administration>
already exists and will be overwritten

When I try a db.tables -p, I get :
DBMI-PostgreSQL erreur de pilote :
Connection failed.
n’a pas pu se connecter au serveur : Aucun fichier ou dossier de ce type
Le serveur est-il actif localement et accepte-t-il les connexions sur la
socket Unix « /var/run/postgresql/.s.PGSQL.5432 » ?

DBMI-PostgreSQL erreur de pilote :
Connection failed.
n’a pas pu se connecter au serveur : Aucun fichier ou dossier de ce type
Le serveur est-il actif localement et accepte-t-il les connexions sur la
socket Unix « /var/run/postgresql/.s.PGSQL.5432 » ?

ERREUR :Unable to open database <host=192.168.1.200,dbname=administration>

v.db.connect (dialog box) isn’t usable, because the field ‘Name of attribute table’ is empty…

Il I try : v.db.connect -o map=survey_bcg@benoit table=survey_bcg key=cat layer=1 (for facility, table name is the same as map name), result is
DBMI-PostgreSQL erreur de pilote :
Connection failed.
n’a pas pu se connecter au serveur : Aucun fichier ou dossier de ce type
Le serveur est-il actif localement et accepte-t-il les connexions sur la
socket Unix « /var/run/postgresql/.s.PGSQL.5432 » ?

DBMI-PostgreSQL erreur de pilote :
Connection failed.
n’a pas pu se connecter au serveur : Aucun fichier ou dossier de ce type
Le serveur est-il actif localement et accepte-t-il les connexions sur la
socket Unix « /var/run/postgresql/.s.PGSQL.5432 » ?

ATTENTION: Impossible d’ouvrir la base de données
<host=192.168.1.200,dbname=administration> avec le driver
ATTENTION: Impossible d’ouvrir la base de données
<host=192.168.1.200,dbname=administration> avec le driver
ERREUR :La table <survey_bcg7> n’existe pas dans la base de données

(attachments)

bcg_logo.gif
BCG_bas.gif
In-2C-21px-TM.png
icone_fb.gif
Modere_SocialMarketer_logomark.png

···

Le 02/09/16 12:04, Moritz Lennert a écrit :

On 02/09/16 11:38, Benoit ANDRE wrote:

Hi all,

Our GIS infrastructure is based on Grass 6.4.4, postrgresql 9.x and
Qgis. Those all together are perfectly working.

We want to update from 6.4.4 to 7.0.4. But we are confronted to a
problem with the database : connection to postgresql is no more possible
for all our maps (but still working with 6.4.4, and all the other soft
overlying on postgresql). The message is the ‘normal’ message wen the
connection is no possible (in french) :

/DBMI-PostgreSQL erreur de pilote ://
//Connection failed.//
//n’a pas pu se connecter au serveur : Aucun fichier ou dossier de ce type//
// Le serveur est-il actif localement et accepte-t-il les connexions
sur la//
// socket Unix « /var/run/postgresql/.s.PGSQL.5432 » ?/

I really don’t understand the problem.

Any idea ?

We need a bit more information to be able to help you. What command leads to this error ? What did you do to move from grass6 to grass7 ? How is the data connection defined (‘v.db.connect -p’ and ‘db.connect -p’) ?

Moritz

Benoit André
Directeur - Gérant

benoit.andre@bcgeol.be
Tel. | +32 475 61 84 94
skype | benoit_andre_bcg
Voir le profil de Benoit André sur LinkedIn

BCG SPRL
Tél. | +32(0)81 58 26 11
Fax | +32(0)81 58 26 12
Chemin de la Foliette, 4 Bte 2
B-5000 - Namur
www.bcgeol.be - plan d’accès

BCG LOGO

Suivez-nous sur Lien LinkedinLien Facebook

Allons plus loin dans le respect de l’environnement : N’utilisons que des produits sans empreinte écologiqueLogo Modere

On 02/09/16 12:51, Benoit ANDRE wrote:

Moritz,

First, I move from 6 to 7 with /v.build/ or /v.build.all/ (depends on
locations)

Here, connections are already gone...

I connect with :
/db.connect driver=pg database="host=192.168.1.200,dbname=administration"/

/db.connect -p/ :
driver: pg
database: host=192.168.1.200,dbname=administration
schema: public
group:

/db.login --overwrite user=benoit/
ATTENTION: DB connection <pg/host=192.168.1.200,dbname=administration>
           already exists and will be overwritten

When I try a /db.tables -p/, I get :
DBMI-PostgreSQL erreur de pilote :
Connection failed.
n'a pas pu se connecter au serveur : Aucun fichier ou dossier de ce type
    Le serveur est-il actif localement et accepte-t-il les connexions sur la
     socket Unix « /var/run/postgresql/.s.PGSQL.5432 » ?

DBMI-PostgreSQL erreur de pilote :
Connection failed.
n'a pas pu se connecter au serveur : Aucun fichier ou dossier de ce type
    Le serveur est-il actif localement et accepte-t-il les connexions sur la
     socket Unix « /var/run/postgresql/.s.PGSQL.5432 » ?

ERREUR :Unable to open database <host=192.168.1.200,dbname=administration>

/v.db.connect/ (dialog box) isn't usable, because the field 'Name of
attribute table' is empty...

Il I try : /v.db.connect -o map=survey_bcg@benoit table=survey_bcg
key=cat layer=1/ (for facility, table name is the same as map name),
result is
DBMI-PostgreSQL erreur de pilote :
Connection failed.
n'a pas pu se connecter au serveur : Aucun fichier ou dossier de ce type
    Le serveur est-il actif localement et accepte-t-il les connexions sur la
     socket Unix « /var/run/postgresql/.s.PGSQL.5432 » ?

DBMI-PostgreSQL erreur de pilote :
Connection failed.
n'a pas pu se connecter au serveur : Aucun fichier ou dossier de ce type
    Le serveur est-il actif localement et accepte-t-il les connexions sur la
     socket Unix « /var/run/postgresql/.s.PGSQL.5432 » ?

ATTENTION: Impossible d'ouvrir la base de données
           <host=192.168.1.200,dbname=administration> avec le driver <pg>
ATTENTION: Impossible d'ouvrir la base de données
           <host=192.168.1.200,dbname=administration> avec le driver <pg>
ERREUR :La table <survey_bcg7> n'existe pas dans la base de données

***********************

On my computer (192.168.1.11) : psql -V is psql (PostgreSQL) 9.2.8
The server (192.168.1.200) : psql -V is psql (PostgreSQL) 9.2.15

All the other programs using postresql, including grass 6.4.4 work fine

Weird.

I tried to reproduce using the GRASS 6 data subset [1]:

grass64 -c /data/GRASS/DATA/nc_basic_spm/gisdemo_ncspm/pg
db.connect driver=pg database="host=127.0.0.1,dbname=testgrass"
db.login user=mlennert
for map in $(g.mlist type=vect pat="*" mapset=PERMANENT); do g.copy vect=$map,${map}_pg; done

grass70 /data/GRASS/DATA/nc_basic_spm/gisdemo_ncspm/pg
v.build.all

All database connections are still there and I can connect to the database without any problems.

So, I don't understand why all your database connections were lost after v.build/v.build.all.

Martin, any idea ?

[1] https://grass.osgeo.org/sampledata/north_carolina/nc_basic_spm.tar.gz

Benoit ANDRE wrote:

Moritz,

First, I move from 6 to 7 with /v.build/ or /v.build.all/ (depends on
locations)

Here, connections are already gone...

I connect with :
/db.connect driver=pg database="host=192.168.1.200,dbname=administration"/

/db.connect -p/ :
driver: pg
database: host=192.168.1.200,dbname=administration
schema: public
group:

/db.login --overwrite user=benoit/
ATTENTION: DB connection <pg/host=192.168.1.200,dbname=administration>
           already exists and will be overwritten

When I try a /db.tables -p/, I get :
DBMI-PostgreSQL erreur de pilote :
Connection failed.
n'a pas pu se connecter au serveur : Aucun fichier ou dossier de ce type
    Le serveur est-il actif localement et accepte-t-il les connexions sur la
     socket Unix « /var/run/postgresql/.s.PGSQL.5432 » ?

DBMI-PostgreSQL erreur de pilote :
Connection failed.
n'a pas pu se connecter au serveur : Aucun fichier ou dossier de ce type
    Le serveur est-il actif localement et accepte-t-il les connexions sur la
     socket Unix « /var/run/postgresql/.s.PGSQL.5432 » ?

ERREUR :Unable to open database <host=192.168.1.200,dbname=administration>

/v.db.connect/ (dialog box) isn't usable, because the field 'Name of
attribute table' is empty...

Il I try : /v.db.connect -o map=survey_bcg@benoit table=survey_bcg
key=cat layer=1/ (for facility, table name is the same as map name),
result is
DBMI-PostgreSQL erreur de pilote :
Connection failed.
n'a pas pu se connecter au serveur : Aucun fichier ou dossier de ce type
    Le serveur est-il actif localement et accepte-t-il les connexions sur la
     socket Unix « /var/run/postgresql/.s.PGSQL.5432 » ?

DBMI-PostgreSQL erreur de pilote :
Connection failed.
n'a pas pu se connecter au serveur : Aucun fichier ou dossier de ce type
    Le serveur est-il actif localement et accepte-t-il les connexions sur la
     socket Unix « /var/run/postgresql/.s.PGSQL.5432 » ?

ATTENTION: Impossible d'ouvrir la base de données
           <host=192.168.1.200,dbname=administration> avec le driver <pg>
ATTENTION: Impossible d'ouvrir la base de données
           <host=192.168.1.200,dbname=administration> avec le driver <pg>
ERREUR :La table <survey_bcg7> n'existe pas dans la base de données

***********************

On my computer (192.168.1.11) : psql -V is psql (PostgreSQL) 9.2.8
The server (192.168.1.200) : psql -V is psql (PostgreSQL) 9.2.15

All the other programs using postresql, including grass 6.4.4 work fine

Moritz Lennert:

Weird.

I tried to reproduce using the GRASS 6 data subset [1]:

grass64 -c /data/GRASS/DATA/nc_basic_spm/gisdemo_ncspm/pg
db.connect driver=pg database="host=127.0.0.1,dbname=testgrass"
db.login user=mlennert
for map in $(g.mlist type=vect pat="*" mapset=PERMANENT); do g.copy
vect=$map,${map}_pg; done

grass70 /data/GRASS/DATA/nc_basic_spm/gisdemo_ncspm/pg
v.build.all

All database connections are still there and I can connect to the
database without any problems.

So, I don't understand why all your database connections were lost after
v.build/v.build.all.

Martin, any idea ?

[1] https://grass.osgeo.org/sampledata/north_carolina/nc_basic_spm.tar.gz

I cannot connect via grass73 into a postgres data base (one that I can
access via QGIS or else via psql through the command line):

GRASS 7.3.svn (wgs84):~ > db.login driver=pg database='****' user=***** password='**********' port=5432 host=localhost --o
WARNING: DB connection <pg/****> already exists and will be overwritten
The password was stored in file (/home/nik/.grass7/dblogin)

GRASS 7.3.svn (wgs84):~ > db.tables -p
DBMI-PostgreSQL driver error:
Connection failed.
could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/run/postgresql/.s.PGSQL.5432"?

DBMI-PostgreSQL driver error:
Connection failed.
could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/run/postgresql/.s.PGSQL.5432"?

ERROR: Unable to open database <host=localhost,dbname=****>

Nikos

On Sep 2, 2016 6:45 PM, “Nikos Alexandris” <nik@nikosalexandris.net> wrote:

GRASS 7.3.svn (wgs84):~ > db.tables -p
DBMI-PostgreSQL driver error:
Connection failed.
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/run/postgresql/.s.PGSQL.5432”?

Can you connect with the psql command?

Is the service reachable at port 5432?

Markus

Nikos Alexandris:

...

GRASS 7.3.svn (wgs84):~ > db.tables -p
DBMI-PostgreSQL driver error:
Connection failed.
could not connect to server: No such file or directory
   Is the server running locally and accepting
   connections on Unix domain socket "/run/postgresql/.s.PGSQL.5432"?

Markus Neteler:

Can you connect with the psql command?
Is the service reachable at port 5432?

Yes

Nikos

When I tried grass 7.0.0 when it has been released, in 2015, I remember it was working. But it was only a test and I continued To work whit 6.4.4.

Le 2 septembre 2016 20:52:28 Markus Neteler neteler@osgeo.org a écrit :

On Sep 2, 2016 6:45 PM, “Nikos Alexandris” <nik@nikosalexandris.net> wrote:

GRASS 7.3.svn (wgs84):~ > db.tables -p
DBMI-PostgreSQL driver error:
Connection failed.
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/run/postgresql/.s.PGSQL.5432”?

Can you connect with the psql command?

Is the service reachable at port 5432?

Markus


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

I confirm what I said saturday.

I just recompile and reinstall 7.0.0. This version has no problem with postgresql and works fine.

Can that help you to find the problem ?

Benoit

(attachments)

btn_liprofile_blue_80x15_fr_FR.png
bcg_logo.gif
BCG_bas.gif
In-2C-21px-TM.png
icone_fb.gif
Modere_SocialMarketer_logomark.png

···

Le 03/09/16 18:43, Benoit ANDRE a écrit :

When I tried grass 7.0.0 when it has been released, in 2015, I remember it was working. But it was only a test and I continued To work whit 6.4.4.

Le 2 septembre 2016 20:52:28 Markus Neteler neteler@osgeo.org a écrit :

On Sep 2, 2016 6:45 PM, “Nikos Alexandris” <nik@nikosalexandris.net> wrote:

GRASS 7.3.svn (wgs84):~ > db.tables -p
DBMI-PostgreSQL driver error:
Connection failed.
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/run/postgresql/.s.PGSQL.5432”?

Can you connect with the psql command?

Is the service reachable at port 5432?

Markus


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

_______________________________________________
grass-user mailing list
[grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[http://lists.osgeo.org/mailman/listinfo/grass-user](http://lists.osgeo.org/mailman/listinfo/grass-user)

Benoit André
Directeur - Gérant

benoit.andre@bcgeol.be
Tel. | +32 475 61 84 94
skype | benoit_andre_bcg
Voir le profil de Benoit André sur LinkedIn

BCG SPRL
Tél. | +32(0)81 58 26 11
Fax | +32(0)81 58 26 12
Chemin de la Foliette, 4 Bte 2
B-5000 - Namur
www.bcgeol.be - plan d’accès

BCG LOGO

Suivez-nous sur Lien LinkedinLien Facebook

Allons plus loin dans le respect de l’environnement : N’utilisons que des produits sans empreinte écologiqueLogo Modere

hi,

I compile GRASS 7.3. Postgresql connection not possible too.

Very annoying

Benoit

(attachments)

btn_liprofile_blue_80x15_fr_FR.png
bcg_logo.gif
BCG_bas.gif
In-2C-21px-TM.png
icone_fb.gif
Modere_SocialMarketer_logomark.png

···

Le 05/09/16 09:35, Benoit ANDRE a écrit :

I confirm what I said saturday.

I just recompile and reinstall 7.0.0. This version has no problem with postgresql and works fine.

Can that help you to find the problem ?

Benoit

Benoit André
Directeur - Gérant

benoit.andre@bcgeol.be
Tel. | +32 475 61 84 94
skype | benoit_andre_bcg
Voir le profil de Benoit André sur LinkedIn

BCG SPRL
Tél. | +32(0)81 58 26 11
Fax | +32(0)81 58 26 12
Chemin de la Foliette, 4 Bte 2
B-5000 - Namur
www.bcgeol.be - plan d’accès

BCG LOGO

Suivez-nous sur Lien LinkedinLien Facebook

Allons plus loin dans le respect de l’environnement : N’utilisons que des produits sans empreinte écologiqueLogo Modere

Le 03/09/16 18:43, Benoit ANDRE a écrit :

When I tried grass 7.0.0 when it has been released, in 2015, I remember it was working. But it was only a test and I continued To work whit 6.4.4.

Le 2 septembre 2016 20:52:28 Markus Neteler neteler@osgeo.org a écrit :

On Sep 2, 2016 6:45 PM, “Nikos Alexandris” <nik@nikosalexandris.net> wrote:

GRASS 7.3.svn (wgs84):~ > db.tables -p
DBMI-PostgreSQL driver error:
Connection failed.
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/run/postgresql/.s.PGSQL.5432”?

Can you connect with the psql command?

Is the service reachable at port 5432?

Markus


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

_______________________________________________
grass-user mailing list
[grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[http://lists.osgeo.org/mailman/listinfo/grass-user](http://lists.osgeo.org/mailman/listinfo/grass-user)

Benoit André
Directeur - Gérant

benoit.andre@bcgeol.be
Tel. | +32 475 61 84 94
skype | benoit_andre_bcg
Voir le profil de Benoit André sur LinkedIn

BCG SPRL
Tél. | +32(0)81 58 26 11
Fax | +32(0)81 58 26 12
Chemin de la Foliette, 4 Bte 2
B-5000 - Namur
www.bcgeol.be - plan d’accès

BCG LOGO

Suivez-nous sur Lien LinkedinLien Facebook

Allons plus loin dans le respect de l’environnement : N’utilisons que des produits sans empreinte écologiqueLogo Modere