Re: [GRASS-user] Unable to link to postgis/postgresql

2016-09-28 Thread Martin Landa
Hi,

2016-09-27 15:25 GMT+02:00 Benoit ANDRE :
> 3th :
> - db.connect driver=pg database=administration
> - db.login driver=pg database=administration user=benoit password=rien 
> host=192.168.1.200 port=5432
>
> No matter if a password is necessary in my case

this issue should be fixed in r69599 [1]. You can test it in 7.0.5svn by:

db.login driver=pg database=administration host=192.168.1.200 port=5432 --o
db.tables -p

Martin

[1] https://trac.osgeo.org/grass/ticket/3167#comment:23

-- 
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Unable to link to postgis/postgresql

2016-09-28 Thread Moritz Lennert

On 27/09/16 14:52, Stefan Lüdtke wrote:

Hi,

if I do not set all parameters with db.login I do have empty fields in
that file, even though I put that parameters in the db.connect command.

If everything is in db.login, I can connect to the db (as reported
earlier) and list tables. However I can neither link nor import them
because they are not listed in the gui box.


Thanks, I can confirm this.

You should be able to import your layers on the command line using:

v.in.ogr input="PG:dbname=YourDatabase host=YourRemoteServer" 
layer=YourTable out=OutputName


If possible for you, could you please give future feedback in the trac 
ticket: https://trac.osgeo.org/grass/ticket/3167 ? This would help 
archive all the discussions in one place.


Thanks !

Moritz



Cheers,
Stefan

On 27/09/16 13:11, Moritz Lennert wrote:

Hi Benoît and Stefan,

On 26/09/16 14:20, Benoit ANDRE wrote:

Hi Moritz,

I tried with last release (7.0.5RC2) on my server (where postgresql is
running) and not on a remote workstation.  Connection to database is
then a local connection.  Here, there is no problem to work with
postgresql.  The problem seems thus to be linked with a remote acces...


I think I have found the origin of the problem. Please see the
discussion in the relevant bug report [1].

Both of you say that you did set usernam and password in db.login. Could
you check the contents of .grass7/dblogin ? Are there empty fields
before the host entry ?

Moritz

[1] https://trac.osgeo.org/grass/ticket/3167



Benoit

Le 14/09/16 12:26, Moritz Lennert a écrit :

This really is a serious issue.

Would it be possible for you to provide a reproducible example ? Ideally
starting out from the North Caroline data. Something that creates a new
postgresql database, redefined db.connect to link to that, g.copy a few
maps and then see if the connection problem still happens ?

Ideally this should go into a bug ticket and IMHO it should definitely
be a blocker for the upcoming releases as I would consider this basic
functionality.

Moritz


Le Wed, 14 Sep 2016 11:22:57 +0200,
Benoit ANDRE  a écrit :


Hi list,

Always the same problem with a remote Postgresql connection, with
grass 7.0.4 and above (7.2 and 7.3).  With grass 7.0.0, the
connection to postgresql is perfect.  I don't try with 7.0.1, 7.0.2
and 7.0.3

All my other soft using Postgresql work fine (i.e. pgadmin, odoo,
caldav, carddav, libreoffice, ...)

The problem is the for all the PC on my network (server under Centos
7, workstations under Fedora 19, 21 or 22)

Le 12/09/16 13:22, Stefan Lüdtke a écrit :

Hi list,

I hope this is not a duplicate, but I could not find any solution
on the web by know.

I trying to connect to a remote postgresql database, without
success.

What I have done:

1)
db.connect driver=pg
database="host=vmhydro27,dbname=cedim_rfra,port=5432"

2)db.login driver=pg database=cedim_rfra user=sluedtke
password=# host=vmhydro27

3) 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
"/var/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
"/var/run/postgresql/.s.PGSQL.5432"?
ERROR: Unable to open database

Re: [GRASS-user] Unable to link to postgis/postgresql

2016-09-27 Thread Benoit ANDRE

Hi Moritz,

It works fine with your suggestion... Thank you.

First : I erase ./grass7/dblogin (outside grass)
2nd : I go into grass 7.0.4
3th :
- db.connect driver=pg database=administration
- db.login driver=pg database=administration user=benoit 
password=rien host=192.168.1.200 port=5432


No matter if a password is necessary in my case

Then, I had to reconnect map to table with
4th : v.db.connect -o map=survey_bcg@benoit driver=pg 
database=administration table=public.survey_bcg


The only place where host and port arise is in the 'db.login' function.

OK.  Now, I'm able to make the jump to grass 7.

Thank you again, Moritz.

Cheers,

Ben.

Le 27/09/16 14:52, Stefan Lüdtke a écrit :

Hi,

if I do not set all parameters with db.login I do have empty fields in
that file, even though I put that parameters in the db.connect command.

If everything is in db.login, I can connect to the db (as reported
earlier) and list tables. However I can neither link nor import them
because they are not listed in the gui box.

Cheers,
Stefan

On 27/09/16 13:11, Moritz Lennert wrote:

Hi Benoît and Stefan,

On 26/09/16 14:20, Benoit ANDRE wrote:

Hi Moritz,

I tried with last release (7.0.5RC2) on my server (where postgresql is
running) and not on a remote workstation.  Connection to database is
then a local connection.  Here, there is no problem to work with
postgresql.  The problem seems thus to be linked with a remote acces...

I think I have found the origin of the problem. Please see the
discussion in the relevant bug report [1].

Both of you say that you did set usernam and password in db.login. Could
you check the contents of .grass7/dblogin ? Are there empty fields
before the host entry ?

Moritz

[1] https://trac.osgeo.org/grass/ticket/3167


Benoit

Le 14/09/16 12:26, Moritz Lennert a écrit :

This really is a serious issue.

Would it be possible for you to provide a reproducible example ? Ideally
starting out from the North Caroline data. Something that creates a new
postgresql database, redefined db.connect to link to that, g.copy a few
maps and then see if the connection problem still happens ?

Ideally this should go into a bug ticket and IMHO it should definitely
be a blocker for the upcoming releases as I would consider this basic
functionality.

Moritz


Le Wed, 14 Sep 2016 11:22:57 +0200,
Benoit ANDRE  a écrit :


Hi list,

Always the same problem with a remote Postgresql connection, with
grass 7.0.4 and above (7.2 and 7.3).  With grass 7.0.0, the
connection to postgresql is perfect.  I don't try with 7.0.1, 7.0.2
and 7.0.3

All my other soft using Postgresql work fine (i.e. pgadmin, odoo,
caldav, carddav, libreoffice, ...)

The problem is the for all the PC on my network (server under Centos
7, workstations under Fedora 19, 21 or 22)

Le 12/09/16 13:22, Stefan Lüdtke a écrit :

Hi list,

I hope this is not a duplicate, but I could not find any solution
on the web by know.

I trying to connect to a remote postgresql database, without
success.

What I have done:

1)
db.connect driver=pg
database="host=vmhydro27,dbname=cedim_rfra,port=5432"

2)db.login driver=pg database=cedim_rfra user=sluedtke
password=# host=vmhydro27

3) 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
"/var/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
"/var/run/postgresql/.s.PGSQL.5432"?
ERROR: Unable to open database

Re: [GRASS-user] Unable to link to postgis/postgresql

2016-09-27 Thread Stefan Lüdtke
Hi,

if I do not set all parameters with db.login I do have empty fields in
that file, even though I put that parameters in the db.connect command.

If everything is in db.login, I can connect to the db (as reported
earlier) and list tables. However I can neither link nor import them
because they are not listed in the gui box.

Cheers,
Stefan

On 27/09/16 13:11, Moritz Lennert wrote:
> Hi Benoît and Stefan,
> 
> On 26/09/16 14:20, Benoit ANDRE wrote:
>> Hi Moritz,
>>
>> I tried with last release (7.0.5RC2) on my server (where postgresql is
>> running) and not on a remote workstation.  Connection to database is
>> then a local connection.  Here, there is no problem to work with
>> postgresql.  The problem seems thus to be linked with a remote acces...
> 
> I think I have found the origin of the problem. Please see the
> discussion in the relevant bug report [1].
> 
> Both of you say that you did set usernam and password in db.login. Could
> you check the contents of .grass7/dblogin ? Are there empty fields
> before the host entry ?
> 
> Moritz
> 
> [1] https://trac.osgeo.org/grass/ticket/3167
> 
>>
>> Benoit
>>
>> Le 14/09/16 12:26, Moritz Lennert a écrit :
>>> This really is a serious issue.
>>>
>>> Would it be possible for you to provide a reproducible example ? Ideally
>>> starting out from the North Caroline data. Something that creates a new
>>> postgresql database, redefined db.connect to link to that, g.copy a few
>>> maps and then see if the connection problem still happens ?
>>>
>>> Ideally this should go into a bug ticket and IMHO it should definitely
>>> be a blocker for the upcoming releases as I would consider this basic
>>> functionality.
>>>
>>> Moritz
>>>
>>>
>>> Le Wed, 14 Sep 2016 11:22:57 +0200,
>>> Benoit ANDRE  a écrit :
>>>
 Hi list,

 Always the same problem with a remote Postgresql connection, with
 grass 7.0.4 and above (7.2 and 7.3).  With grass 7.0.0, the
 connection to postgresql is perfect.  I don't try with 7.0.1, 7.0.2
 and 7.0.3

 All my other soft using Postgresql work fine (i.e. pgadmin, odoo,
 caldav, carddav, libreoffice, ...)

 The problem is the for all the PC on my network (server under Centos
 7, workstations under Fedora 19, 21 or 22)

 Le 12/09/16 13:22, Stefan Lüdtke a écrit :
> Hi list,
>
> I hope this is not a duplicate, but I could not find any solution
> on the web by know.
>
> I trying to connect to a remote postgresql database, without
> success.
>
> What I have done:
>
> 1)
> db.connect driver=pg  
> database="host=vmhydro27,dbname=cedim_rfra,port=5432"
>
> 2)db.login driver=pg database=cedim_rfra user=sluedtke
> password=# host=vmhydro27
>
> 3) 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
> "/var/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
> "/var/run/postgresql/.s.PGSQL.5432"?
> ERROR: Unable to open database
> 

Re: [GRASS-user] Unable to link to postgis/postgresql

2016-09-27 Thread Moritz Lennert

Hi Benoît and Stefan,

On 26/09/16 14:20, Benoit ANDRE wrote:

Hi Moritz,

I tried with last release (7.0.5RC2) on my server (where postgresql is
running) and not on a remote workstation.  Connection to database is
then a local connection.  Here, there is no problem to work with
postgresql.  The problem seems thus to be linked with a remote acces...


I think I have found the origin of the problem. Please see the 
discussion in the relevant bug report [1].


Both of you say that you did set usernam and password in db.login. Could 
you check the contents of .grass7/dblogin ? Are there empty fields 
before the host entry ?


Moritz

[1] https://trac.osgeo.org/grass/ticket/3167



Benoit

Le 14/09/16 12:26, Moritz Lennert a écrit :

This really is a serious issue.

Would it be possible for you to provide a reproducible example ? Ideally
starting out from the North Caroline data. Something that creates a new
postgresql database, redefined db.connect to link to that, g.copy a few
maps and then see if the connection problem still happens ?

Ideally this should go into a bug ticket and IMHO it should definitely
be a blocker for the upcoming releases as I would consider this basic
functionality.

Moritz


Le Wed, 14 Sep 2016 11:22:57 +0200,
Benoit ANDRE  a écrit :


Hi list,

Always the same problem with a remote Postgresql connection, with
grass 7.0.4 and above (7.2 and 7.3).  With grass 7.0.0, the
connection to postgresql is perfect.  I don't try with 7.0.1, 7.0.2
and 7.0.3

All my other soft using Postgresql work fine (i.e. pgadmin, odoo,
caldav, carddav, libreoffice, ...)

The problem is the for all the PC on my network (server under Centos
7, workstations under Fedora 19, 21 or 22)

Le 12/09/16 13:22, Stefan Lüdtke a écrit :

Hi list,

I hope this is not a duplicate, but I could not find any solution
on the web by know.

I trying to connect to a remote postgresql database, without
success.

What I have done:

1)
db.connect driver=pg
database="host=vmhydro27,dbname=cedim_rfra,port=5432"

2)db.login driver=pg database=cedim_rfra user=sluedtke
password=# host=vmhydro27

3) 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
"/var/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
"/var/run/postgresql/.s.PGSQL.5432"?
ERROR: Unable to open database

Re: [GRASS-user] Unable to link to postgis/postgresql

2016-09-26 Thread Benoit ANDRE

Hi Moritz,

I tried with last release (7.0.5RC2) on my server (where postgresql is 
running) and not on a remote workstation.  Connection to database is 
then a local connection.  Here, there is no problem to work with 
postgresql.  The problem seems thus to be linked with a remote acces...


Benoit

Le 14/09/16 12:26, Moritz Lennert a écrit :

This really is a serious issue.

Would it be possible for you to provide a reproducible example ? Ideally
starting out from the North Caroline data. Something that creates a new
postgresql database, redefined db.connect to link to that, g.copy a few
maps and then see if the connection problem still happens ?

Ideally this should go into a bug ticket and IMHO it should definitely
be a blocker for the upcoming releases as I would consider this basic
functionality.

Moritz


Le Wed, 14 Sep 2016 11:22:57 +0200,
Benoit ANDRE  a écrit :


Hi list,

Always the same problem with a remote Postgresql connection, with
grass 7.0.4 and above (7.2 and 7.3).  With grass 7.0.0, the
connection to postgresql is perfect.  I don't try with 7.0.1, 7.0.2
and 7.0.3

All my other soft using Postgresql work fine (i.e. pgadmin, odoo,
caldav, carddav, libreoffice, ...)

The problem is the for all the PC on my network (server under Centos
7, workstations under Fedora 19, 21 or 22)

Le 12/09/16 13:22, Stefan Lüdtke a écrit :

Hi list,

I hope this is not a duplicate, but I could not find any solution
on the web by know.

I trying to connect to a remote postgresql database, without
success.

What I have done:

1)
db.connect driver=pg
database="host=vmhydro27,dbname=cedim_rfra,port=5432"

2)db.login driver=pg database=cedim_rfra user=sluedtke
password=# host=vmhydro27

3) 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
"/var/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
"/var/run/postgresql/.s.PGSQL.5432"?
ERROR: Unable to open database

Re: [GRASS-user] Unable to link to postgis/postgresql

2016-09-21 Thread Stefan Lüdtke
I'll give it a go ... that sounds doable ;-)



On 21/09/16 14:00, Markus Neteler wrote:
> On Sep 21, 2016 1:50 PM, "Stefan Lüdtke"  > wrote:
>>
>> Hi,
>>
>> I have not tried again in order to provide debug messages. Because I am
>> not sure whether they show anything new/different to the messages Benoit
>> ANDRE showed to us but its quite a bit of effort to compile from svn.
> 
> On Linux that's not more than
> 
> svn update
> make
> 
> Since most was compiled before, it will take something like 60sec...
> 
> Finally perhaps (not me, I just run GRASS GIS directly from the compiled
> source code directory):
> make install
> 
>> Is that output from my side still required??
> 
> Does it work for you?
> 
> Markus
> 

-- 
Stefan Lüdtke

Section 5.4- Hydrology
Phone: +49(0)331-288-2821
Fax: +49(0)331-288-1570
Email: slued...@gfz-potsdam.de
___

Helmholtz Centre Potsdam
GFZ German Research Centre for Geosciences
Foundation under public law of the federal state
of Brandenburg
Telegrafenberg, D-14473 Potsdam



signature.asc
Description: OpenPGP digital signature
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Unable to link to postgis/postgresql

2016-09-21 Thread Markus Neteler
On Sep 21, 2016 1:50 PM, "Stefan Lüdtke"  wrote:
>
> Hi,
>
> I have not tried again in order to provide debug messages. Because I am
> not sure whether they show anything new/different to the messages Benoit
> ANDRE showed to us but its quite a bit of effort to compile from svn.

On Linux that's not more than

svn update
make

Since most was compiled before, it will take something like 60sec...

Finally perhaps (not me, I just run GRASS GIS directly from the compiled
source code directory):
make install

> Is that output from my side still required??

Does it work for you?

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

Re: [GRASS-user] Unable to link to postgis/postgresql

2016-09-21 Thread Stefan Lüdtke
Hi,

I have not tried again in order to provide debug messages. Because I am
not sure whether they show anything new/different to the messages Benoit
ANDRE showed to us but its quite a bit of effort to compile from svn.

Is that output from my side still required??

Stefan



On 21/09/16 13:42, Benoit ANDRE wrote:
> Hi Martin,
> 
> I tried again with last release (7.0.5RC2) announced by Markus, but
> without results.  Problem 's staying the same : no connection.  The
> arguments to call 'psql' seems missing.
> 
> 
> 
> 
> Le 16/09/16 21:12, Stefan Lüdtke a écrit :
>> Hi there,
>>
>> the suggestion below works. The other one suggested later on with "dri"
>> instead of "driver"  by Martin with 7.0.5svn as well. I get a list of
>> tables with db.tables -p.
>>
>> But non of them shows a list of vectors/rasters when I go for the "link"
>> or "import" within the gui. I can select a db from that server I am
>> connected to, but no table is shown.
>>
>> ???
>>
>> Did the debug output from Benoit ANDRE helps anything? I guess mine
>> would still be interresting?
>>
>> Cheers,
>>
>> Stefan
>>
>>
>> On 14/09/16 13:06, Martin Landa wrote:
>>> Hi,
>>>
>>> 2016-09-12 13:22 GMT+02:00 Stefan Lüdtke :
 1)
 db.connect driver=pg
 database="host=vmhydro27,dbname=cedim_rfra,port=5432"

 2)db.login driver=pg database=cedim_rfra user=sluedtke password=#
 host=vmhydro27
>>> please try out:
>>>
>>> db.connect driver=pg database=edim_rfra
>>> db.login driver=pg database=cedim_rfra user=sluedtke password=#
>>> host=vmhydro27 port=5432
>>>
>>> Ma
>>>
>>
>>
>> ___
>> grass-user mailing list
>> grass-user@lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
> 
> -- 
> 
>   
> 
> *Benoit André*
> *Directeur - Gérant*
> 
> benoit.an...@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 Linkedin
>  Lien
> Facebook
> 
> 
> 
> Allons plus loin dans le respect de l'environnement : N'utilisons que
> des produits sans empreinte écologiqueLogo Modere
> 
> 

-- 
Stefan Lüdtke

Section 5.4- Hydrology
Phone: +49(0)331-288-2821
Fax: +49(0)331-288-1570
Email: slued...@gfz-potsdam.de
___

Helmholtz Centre Potsdam
GFZ German Research Centre for Geosciences
Foundation under public law of the federal state
of Brandenburg
Telegrafenberg, D-14473 Potsdam



signature.asc
Description: OpenPGP digital signature
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Unable to link to postgis/postgresql

2016-09-21 Thread Benoit ANDRE

Hi Martin,

I tried again with last release (7.0.5RC2) announced by Markus, but 
without results.  Problem 's staying the same : no connection.  The 
arguments to call 'psql' seems missing.





Le 16/09/16 21:12, Stefan Lüdtke a écrit :

Hi there,

the suggestion below works. The other one suggested later on with "dri"
instead of "driver"  by Martin with 7.0.5svn as well. I get a list of
tables with db.tables -p.

But non of them shows a list of vectors/rasters when I go for the "link"
or "import" within the gui. I can select a db from that server I am
connected to, but no table is shown.

???

Did the debug output from Benoit ANDRE helps anything? I guess mine
would still be interresting?

Cheers,

Stefan


On 14/09/16 13:06, Martin Landa wrote:

Hi,

2016-09-12 13:22 GMT+02:00 Stefan Lüdtke :

1)
db.connect driver=pg
database="host=vmhydro27,dbname=cedim_rfra,port=5432"

2)db.login driver=pg database=cedim_rfra user=sluedtke password=#
host=vmhydro27

please try out:

db.connect driver=pg database=edim_rfra
db.login driver=pg database=cedim_rfra user=sluedtke password=#
host=vmhydro27 port=5432

Ma




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


--



*Benoit André*
*Directeur - Gérant*

benoit.an...@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 Linkedin 
 
Lien Facebook 
 



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



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

Re: [GRASS-user] Unable to link to postgis/postgresql

2016-09-16 Thread Stefan Lüdtke
Hi there,

the suggestion below works. The other one suggested later on with "dri"
instead of "driver"  by Martin with 7.0.5svn as well. I get a list of
tables with db.tables -p.

But non of them shows a list of vectors/rasters when I go for the "link"
or "import" within the gui. I can select a db from that server I am
connected to, but no table is shown.

???

Did the debug output from Benoit ANDRE helps anything? I guess mine
would still be interresting?

Cheers,

Stefan


On 14/09/16 13:06, Martin Landa wrote:
> Hi,
> 
> 2016-09-12 13:22 GMT+02:00 Stefan Lüdtke :
>> 1)
>> db.connect driver=pg
>> database="host=vmhydro27,dbname=cedim_rfra,port=5432"
>>
>> 2)db.login driver=pg database=cedim_rfra user=sluedtke password=#
>> host=vmhydro27
> 
> please try out:
> 
> db.connect driver=pg database=edim_rfra
> db.login driver=pg database=cedim_rfra user=sluedtke password=#
> host=vmhydro27 port=5432
> 
> Ma
> 

-- 
Stefan Lüdtke

Section 5.4- Hydrology
Phone: +49(0)331-288-2821
Fax: +49(0)331-288-1570
Email: slued...@gfz-potsdam.de
___

Helmholtz Centre Potsdam
GFZ German Research Centre for Geosciences
Foundation under public law of the federal state
of Brandenburg
Telegrafenberg, D-14473 Potsdam



signature.asc
Description: OpenPGP digital signature
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Unable to link to postgis/postgresql

2016-09-14 Thread Martin Landa
Hi,

2016-09-14 17:43 GMT+02:00 Benoit ANDRE :
> `--> db.login dri=pg datab=administration host=192.168.1.200 user=benoit
> port=5432

btw, no password needed for connection?

Ma

-- 
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Unable to link to postgis/postgresql

2016-09-14 Thread Stefan Lüdtke
Hi,

I will work through that during the weekend.

An example is not that easy with a remote database ...

Cheers,

Stefan


On 14/09/16 13:52, Martin Landa wrote:
> Hi,
> 
> 2016-09-14 13:40 GMT+02:00 Martin Landa :
>> works. Could you try to enable debug message and post here relevant 
>> information:
>>
>> g.gisenv set=debug=3
>> db.tables -p 2>&1 | grep open_database
>>
>> (be aware that the log will contain all login information including
>> real password - good idea to change it before post here :-)
> 
> hm, with 7.0.4 you will not get relevant info, I fix debug message in
> r69481. Could you try 7.0.5svn? You should get:
> 
> D3/5: db_driver_open_database(): host = myhost, port = 5432, options =
> (null), tty = (null), dbname = mydb, user = myuser, password = mypw
> schema = (null)
> 
> Ma
> 

-- 
Stefan Lüdtke

Section 5.4- Hydrology
Phone: +49(0)331-288-2821
Fax: +49(0)331-288-1570
Email: slued...@gfz-potsdam.de
___

Helmholtz Centre Potsdam
GFZ German Research Centre for Geosciences
Foundation under public law of the federal state
of Brandenburg
Telegrafenberg, D-14473 Potsdam
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Unable to link to postgis/postgresql

2016-09-14 Thread Benoit ANDRE

Hi Martin,

Here is my log :

.-(/disques/divers/linux-1/archive/GIS/grass/grass-7.0/pyrite/grass-7.0.svn_src_snapshot_2016_09_10)(benoit@pyrite)-
`--> db.connect dri=pg datab=administration
D1/3: G_set_program_name(): db.connect
D2/3: G_file_name(): path = /disques/grassdata/BCG_V7/benoit
D2/3: dbDbmscap(): opendir 
[/disques/divers/linux-1/archive/GIS/grass/grass-7.0/pyrite/grass-7.0.svn_src_snapshot_2016_09_10/dist.i686-pc-linux-gnu/driver/db/]

D3/3: db_get_login(): drv=[pg] db=[administration]
D3/3: read_file(): DB login file = 
.-(/disques/divers/linux-1/archive/GIS/grass/grass-7.0/pyrite/grass-7.0.svn_src_snapshot_2016_09_10)(benoit@pyrite)-
`--> db.login dri=pg datab=administration host=192.168.1.200 user=benoit 
port=5432

D1/3: G_set_program_name(): db.login
D2/3: G_file_name(): path = /disques/grassdata/BCG_V7/benoit
D2/3: dbDbmscap(): opendir 
[/disques/divers/linux-1/archive/GIS/grass/grass-7.0/pyrite/grass-7.0.svn_src_snapshot_2016_09_10/dist.i686-pc-linux-gnu/driver/db/]
D3/3: db_set_login(): drv=[pg] db=[administration] usr=[benoit] 
pwd=[(null)] host=[192.168.1.200] port=[5432]

D3/3: read_file(): DB login file = 
D3/3: write_file(): DB login file = 
.-(/disques/divers/linux-1/archive/GIS/grass/grass-7.0/pyrite/grass-7.0.svn_src_snapshot_2016_09_10)(benoit@pyrite)-
`--> db.tables -p
D1/3: G_set_program_name(): db.tables
D2/3: G_file_name(): path = /disques/grassdata/BCG_V7/benoit
D2/3: dbDbmscap(): opendir 
[/disques/divers/linux-1/archive/GIS/grass/grass-7.0/pyrite/grass-7.0.svn_src_snapshot_2016_09_10/dist.i686-pc-linux-gnu/driver/db/]
D2/3: dbDbmscap(): opendir 
[/disques/divers/linux-1/archive/GIS/grass/grass-7.0/pyrite/grass-7.0.svn_src_snapshot_2016_09_10/dist.i686-pc-linux-gnu/driver/db/]

D1/3: db_d_init_error(): PostgreSQL
D3/3: db_get_login(): drv=[pg] db=[administration]
D3/3: read_file(): DB login file = 
D3/3: ret = 3 : drv=[pg] db=[administration] usr=[benoit] pwd=[] 
host=[], port=[]
D3/3: db_driver_open_database(): driver=pg database definition = 
'administration'

D3/3: parse_conn: 'administration'
D3/3: db_driver_open_database(): host = (null), port = (null), options = 
(null), tty = (null), dbname = administration, user = (null), password = 
(null), host = (null), port = (null) schema = (null)

D3/3: db_get_login(): drv=[pg] db=[administration]
D3/3: read_file(): DB login file = 
D3/3: ret = 3 : drv=[pg] db=[administration] usr=[benoit] pwd=[] 
host=[], port=[]

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 
.-(/disques/divers/linux-1/archive/GIS/grass/grass-7.0/pyrite/grass-7.0.svn_src_snapshot_2016_09_10)(benoit@pyrite)-
`--> db.tables -p 2>&1 | grep open_database
D3/3: db_driver_open_database(): driver=pg database definition = 
'administration'
D3/3: db_driver_open_database(): host = (null), port = (null), options = 
(null), tty = (null), dbname = administration, user = (null), password = 
(null), host = (null), port = (null) schema = (null)

.-(/disques/divers/linux-1/archive/GIS/grass/grass-7.0/pyrite/grass-7.0.svn_src_snapshot_2016_09_10)(benoit@pyrite)-
`-->




Le 14/09/16 13:40, Martin Landa a écrit :

Hi,

2016-09-14 13:06 GMT+02:00 Martin Landa :

I tested with 7.0.5.svn:

db.connect dri=pg datab=mydb
db.login dri=pg datab=mydb host=myhost user=myuser pass=mypw port=5432
db.tables -p

works. Could you try to enable debug message and post here relevant information:

g.gisenv set=debug=3
db.tables -p 2>&1 | grep open_database

(be aware that the log will contain all login information including
real password - good idea to change it before post here :-)

Ma



--



*Benoit André*
*Directeur - Gérant*

benoit.an...@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 

Re: [GRASS-user] Unable to link to postgis/postgresql

2016-09-14 Thread Martin Landa
Hi,

2016-09-14 13:06 GMT+02:00 Martin Landa :

I tested with 7.0.5.svn:

db.connect dri=pg datab=mydb
db.login dri=pg datab=mydb host=myhost user=myuser pass=mypw port=5432
db.tables -p

works. Could you try to enable debug message and post here relevant information:

g.gisenv set=debug=3
db.tables -p 2>&1 | grep open_database

(be aware that the log will contain all login information including
real password - good idea to change it before post here :-)

Ma

-- 
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Unable to link to postgis/postgresql

2016-09-14 Thread Martin Landa
Hi,

2016-09-12 13:22 GMT+02:00 Stefan Lüdtke :
> 1)
> db.connect driver=pg
> database="host=vmhydro27,dbname=cedim_rfra,port=5432"
>
> 2)db.login driver=pg database=cedim_rfra user=sluedtke password=#
> host=vmhydro27

please try out:

db.connect driver=pg database=edim_rfra
db.login driver=pg database=cedim_rfra user=sluedtke password=#
host=vmhydro27 port=5432

Ma

-- 
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Unable to link to postgis/postgresql

2016-09-14 Thread Moritz Lennert
This really is a serious issue.

Would it be possible for you to provide a reproducible example ? Ideally
starting out from the North Caroline data. Something that creates a new
postgresql database, redefined db.connect to link to that, g.copy a few
maps and then see if the connection problem still happens ?

Ideally this should go into a bug ticket and IMHO it should definitely
be a blocker for the upcoming releases as I would consider this basic
functionality.

Moritz


Le Wed, 14 Sep 2016 11:22:57 +0200,
Benoit ANDRE  a écrit :

> Hi list,
> 
> Always the same problem with a remote Postgresql connection, with
> grass 7.0.4 and above (7.2 and 7.3).  With grass 7.0.0, the
> connection to postgresql is perfect.  I don't try with 7.0.1, 7.0.2
> and 7.0.3
> 
> All my other soft using Postgresql work fine (i.e. pgadmin, odoo, 
> caldav, carddav, libreoffice, ...)
> 
> The problem is the for all the PC on my network (server under Centos
> 7, workstations under Fedora 19, 21 or 22)
> 
> Le 12/09/16 13:22, Stefan Lüdtke a écrit :
> > Hi list,
> >
> > I hope this is not a duplicate, but I could not find any solution
> > on the web by know.
> >
> > I trying to connect to a remote postgresql database, without
> > success.
> >
> > What I have done:
> >
> > 1)
> > db.connect driver=pg
> > database="host=vmhydro27,dbname=cedim_rfra,port=5432"
> >
> > 2)db.login driver=pg database=cedim_rfra user=sluedtke
> > password=# host=vmhydro27
> >
> > 3) 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
> > "/var/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
> > "/var/run/postgresql/.s.PGSQL.5432"?
> > ERROR: Unable to open database
> > 

Re: [GRASS-user] Unable to link to postgis/postgresql

2016-09-14 Thread Benoit ANDRE

Hi list,

Always the same problem with a remote Postgresql connection, with grass 
7.0.4 and above (7.2 and 7.3).  With grass 7.0.0, the connection to 
postgresql is perfect.  I don't try with 7.0.1, 7.0.2 and 7.0.3


All my other soft using Postgresql work fine (i.e. pgadmin, odoo, 
caldav, carddav, libreoffice, ...)


The problem is the for all the PC on my network (server under Centos 7, 
workstations under Fedora 19, 21 or 22)


Le 12/09/16 13:22, Stefan Lüdtke a écrit :

Hi list,

I hope this is not a duplicate, but I could not find any solution on the
web by know.

I trying to connect to a remote postgresql database, without success.

What I have done:

1)
db.connect driver=pg
database="host=vmhydro27,dbname=cedim_rfra,port=5432"

2)db.login driver=pg database=cedim_rfra user=sluedtke password=#
host=vmhydro27

3) 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
"/var/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
"/var/run/postgresql/.s.PGSQL.5432"?
ERROR: Unable to open database 

Re: [GRASS-user] Unable to link to postgis/postgresql

2016-09-13 Thread Stefan Lüdtke
Hi Moritz,

thanks for the hints but non of them worked.

As additional info. I have configured a couple of odbc connections I use
in R. Using these connections in GRASS do not give an error but do not
show any tables. Those odbc connections work as well from libreoffice.

That's it from my side so far.

Stefan

On 13/09/16 10:19, Moritz Lennert wrote:
> Le Mon, 12 Sep 2016 13:22:29 +0200,
> Stefan Lüdtke  a écrit :
> 
>> Hi list,
>>
>> I hope this is not a duplicate, but I could not find any solution on
>> the web by know.
>>
>> I trying to connect to a remote postgresql database, without success.
>>
>> What I have done:
>>
>> 1)
>> db.connect driver=pg 
>> database="host=vmhydro27,dbname=cedim_rfra,port=5432"
> 
> As this is the standard port, you could try without the port=5432 part
> in the database definition string.
>  
>> 2)db.login driver=pg database=cedim_rfra user=sluedtke password=#
>> host=vmhydro27
> 
> Try with either no database info in the db.login call, or with the port
> parameter set, i.e.
> 
> db.login user=sluedtke password=##
> 
> or
> 
> db.login driver=pg database=cedim_rfra user=sluedtke password=#
> host=vmhydro27 port=5432
> 
> Moritz
> 

-- 
Stefan Lüdtke

Section 5.4- Hydrology
Phone: +49(0)331-288-2821
Fax: +49(0)331-288-1570
Email: slued...@gfz-potsdam.de
___

Helmholtz Centre Potsdam
GFZ German Research Centre for Geosciences
Foundation under public law of the federal state
of Brandenburg
Telegrafenberg, D-14473 Potsdam



signature.asc
Description: OpenPGP digital signature
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Re: [GRASS-user] Unable to link to postgis/postgresql

2016-09-13 Thread Moritz Lennert
Le Mon, 12 Sep 2016 13:22:29 +0200,
Stefan Lüdtke  a écrit :

> Hi list,
> 
> I hope this is not a duplicate, but I could not find any solution on
> the web by know.
> 
> I trying to connect to a remote postgresql database, without success.
> 
> What I have done:
> 
> 1)
> db.connect driver=pg  
> database="host=vmhydro27,dbname=cedim_rfra,port=5432"

As this is the standard port, you could try without the port=5432 part
in the database definition string.
 
> 2)db.login driver=pg database=cedim_rfra user=sluedtke password=#
> host=vmhydro27

Try with either no database info in the db.login call, or with the port
parameter set, i.e.

db.login user=sluedtke password=##

or

db.login driver=pg database=cedim_rfra user=sluedtke password=#
host=vmhydro27 port=5432

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