Re: Pgagent is not reading pgpass file either in Windows or Linux.

2018-06-05 Thread Adrian Klaver
On 06/05/2018 07:53 AM, nageswara Bandla wrote: Adrian, I think, it's not problem with pg_hba.conf.  /etc/hosts is configured correctly. psql works fine and is inline with libpq, where as pgagent is not. pgagent still fails when we use hostaddr and host. usr/bin/pgagent_96 -f -l 2 hostaddr=1

Re: Pgagent is not reading pgpass file either in Windows or Linux.

2018-06-05 Thread nageswara Bandla
Adrian, I think, it's not problem with pg_hba.conf. /etc/hosts is configured correctly. psql works fine and is inline with libpq, where as pgagent is not. pgagent still fails when we use hostaddr and host. usr/bin/pgagent_96 -f -l 2 hostaddr=127.0.0.1 host=localhost dbname=linuxpostgresdb user=

Re: Pgagent is not reading pgpass file either in Windows or Linux.

2018-06-04 Thread Adrian Klaver
On 06/04/2018 03:31 PM, nageswara Bandla wrote: I have figured out the issue with pgAgent both in Windows and Linux. PgAgent seems to ignore pgpass.conf/.pgpass whenever it has 127.0.0.1 (127.0.0.1:5432:*:postgres:postgres) throws an error: Could it be that hosts is not set up for?: 127.0.0.

Re: Pgagent is not reading pgpass file either in Windows or Linux.

2018-06-04 Thread George Neuner
On 6/4/2018 6:31 PM, nageswara Bandla wrote: I have figured out the issue with pgAgent both in Windows and Linux. PgAgent seems to ignore pgpass.conf/.pgpass whenever it has 127.0.0.1 (127.0.0.1:5432:*:postgres:postgres) throws an error: *DEBUG: Creating DB connection: user=postgres port=543

Re: Pgagent is not reading pgpass file either in Windows or Linux.

2018-06-04 Thread Ron
I've noticed that .pgpass is case sensitive, so am not surprised that it also wouldn't note the difference between 127.0.0.1 and localhost. On 06/04/2018 05:31 PM, nageswara Bandla wrote: I have figured out the issue with pgAgent both in Windows and Linux. PgAgent seems to ignore pgpass.conf/.

Re: Pgagent is not reading pgpass file either in Windows or Linux.

2018-06-04 Thread nageswara Bandla
I have figured out the issue with pgAgent both in Windows and Linux. PgAgent seems to ignore pgpass.conf/.pgpass whenever it has 127.0.0.1 (127.0.0.1:5432:*:postgres:postgres) throws an error: *DEBUG: Creating DB connection: user=postgres port=5432 hostaddr=127.0.0.1 dbname=linuxpostgresdb*

Re: Pgagent is not reading pgpass file either in Windows or Linux.

2018-06-01 Thread nageswara Bandla
On Thu, May 31, 2018 at 5:16 PM, George Neuner wrote: > On Thu, 31 May 2018 15:40:21 -0500, nageswara Bandla > wrote: > > >On Thu, May 31, 2018 at 12:57 PM, George Neuner > >wrote: > > > >> It just occurred to me that you said PGPASSFILE was set to > >> > >> %APPDATA%/postgresql/pgpass.conf

Re: Pgagent is not reading pgpass file either in Windows or Linux.

2018-05-31 Thread George Neuner
On Thu, 31 May 2018 15:40:21 -0500, nageswara Bandla wrote: >On Thu, May 31, 2018 at 12:57 PM, George Neuner >wrote: > >> It just occurred to me that you said PGPASSFILE was set to >> >> %APPDATA%/postgresql/pgpass.conf >> >> >> The problem may be that when LocalSystem expands %APPDATA%, it

Re: Pgagent is not reading pgpass file either in Windows or Linux.

2018-05-31 Thread nageswara Bandla
On Thu, May 31, 2018 at 12:57 PM, George Neuner wrote: > On Thu, 31 May 2018 11:24:18 -0500, nageswara Bandla > wrote: > > >On Wed, May 30, 2018 at 7:45 PM, George Neuner > wrote: > > > >> LocalSystem has administrator permissions to virtually everything. > >> https://msdn.microsoft.com/en-us/l

Re: Pgagent is not reading pgpass file either in Windows or Linux.

2018-05-31 Thread George Neuner
On Thu, 31 May 2018 11:24:18 -0500, nageswara Bandla wrote: >On Wed, May 30, 2018 at 7:45 PM, George Neuner wrote: > >> LocalSystem has administrator permissions to virtually everything. >> https://msdn.microsoft.com/en-us/library/windows/desktop/ >> ms684190(v=vs.85).aspx >> >> It should be abl

Re: Pgagent is not reading pgpass file either in Windows or Linux.

2018-05-31 Thread nageswara Bandla
On Wed, May 30, 2018 at 7:45 PM, George Neuner wrote: > On Tue, 29 May 2018 13:32:46 -0700, Adrian Klaver > wrote: > > >On 05/29/2018 12:14 PM, nageswara Bandla wrote: > > > >> As per the link- > >> (https://www.postgresql.org/docs/9.6/static/libpq-pgpass.html) I set > >> PGPASSFILE environment

Re: Pgagent is not reading pgpass file either in Windows or Linux.

2018-05-30 Thread George Neuner
On Tue, 29 May 2018 13:32:46 -0700, Adrian Klaver wrote: >On 05/29/2018 12:14 PM, nageswara Bandla wrote: > >> As per the link- >> (https://www.postgresql.org/docs/9.6/static/libpq-pgpass.html) I set >> PGPASSFILE environment variable to point to pgpass.conf location. Even >> then, it’s throwi

Re: Pgagent is not reading pgpass file either in Windows or Linux.

2018-05-30 Thread Adrian Klaver
On 05/30/2018 08:48 AM, nageswara Bandla wrote: On Tue, May 29, 2018 at 6:15 PM, Adrian Klaver mailto:adrian.kla...@aklaver.com>> wrote: On 05/29/2018 03:57 PM, nageswara Bandla wrote: #1. Windows: My guess because the LocalSystem user does not have permissions

Re: Pgagent is not reading pgpass file either in Windows or Linux.

2018-05-30 Thread nageswara Bandla
On Wed, May 30, 2018 at 5:11 AM, Stéphane Dunand wrote: > > Le 29/05/2018 à 21:14, nageswara Bandla a écrit : > > > > The intention of this post is to find out ways to run pgagent without > passing password in its connection string. > > > > *Windows:* > > I have installed pgagent on windows and c

Re: Pgagent is not reading pgpass file either in Windows or Linux.

2018-05-30 Thread nageswara Bandla
On Tue, May 29, 2018 at 6:15 PM, Adrian Klaver wrote: > On 05/29/2018 03:57 PM, nageswara Bandla wrote: > >> #1. Windows: >> >> My guess because the LocalSystem user does not have permissions on your: >> %APPDATA%/postgresql/pgpass.co nf >> file. This seems to be confirmed by it

Re: Pgagent is not reading pgpass file either in Windows or Linux.

2018-05-30 Thread Stéphane Dunand
Le 29/05/2018 à 21:14, nageswara Bandla a écrit : The intention of this post is to find out ways to run pgagent without passing password in its connection string. *Windows:* I have installed pgagent on windows and configured to run under Local System account. Command:- C:\PostgreSQL\big

Re: Pgagent is not reading pgpass file either in Windows or Linux.

2018-05-29 Thread Adrian Klaver
On 05/29/2018 03:57 PM, nageswara Bandla wrote: #1. Windows: My guess because the LocalSystem user does not have permissions on your: %APPDATA%/postgresql/pgpass.co nf file. This seems to be confirmed by it working when you run pgagent as the login user. Also: passfile     S

Re: Pgagent is not reading pgpass file either in Windows or Linux.

2018-05-29 Thread nageswara Bandla
#1. Windows: My guess because the LocalSystem user does not have permissions on your: %APPDATA%/postgresql/pgpass.conf file. This seems to be confirmed by it working when you run pgagent as the login user. Also: passfile Specifies the name of the file used to store passwords (see Section 33.15

Re: Pgagent is not reading pgpass file either in Windows or Linux.

2018-05-29 Thread Adrian Klaver
On 05/29/2018 12:14 PM, nageswara Bandla wrote: The intention of this post is to find out ways to run pgagent without passing password in its connection string. *Windows:* I have installed pgagent on windows and configured to run under Local System account. Command:- C:\PostgreSQL\bigsql\p

Pgagent is not reading pgpass file either in Windows or Linux.

2018-05-29 Thread nageswara Bandla
The intention of this post is to find out ways to run pgagent without passing password in its connection string. *Windows:* I have installed pgagent on windows and configured to run under Local System account. Command:- C:\PostgreSQL\bigsql\pgagent\bin\pgagent.exe INSTALL pgagent -l 2 -u L