pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedFacing authentication error on postgres 9.2 -> dblink functions
7+ messages / 3 participants
[nested] [flat]
* Facing authentication error on postgres 9.2 -> dblink functions
@ 2013-02-06 13:09 Dev Kumkar <devdas.kumkar@gmail.com>
0 siblings, 2 replies; 7+ messages in thread
From: Dev Kumkar @ 2013-02-06 13:09 UTC (permalink / raw)
To: pgsql-sql; pgsql-admin@postgresql.org; pgsql-hackers@postgresql.org
Hello Everyone,
I am using postgres 9.2 and when executing function dblink facing a fatal
error while trying to execute dblink_connect as follows:
* SELECT * FROM dblink_connect('host=127.0.0.1 port=5432 dbname=postgres
password=test')*
*ERROR*: could not establish connection DETAIL: FATAL: password
authentication failed for user "NETWORK SERVICE"
What this error is related to? Do I need to modify pg_hba.conf file by any
chance?
Thanks..
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [ADMIN] Facing authentication error on postgres 9.2 -> dblink functions
@ 2013-02-06 13:30 Albe Laurenz <laurenz.albe@wien.gv.at>
parent: Dev Kumkar <devdas.kumkar@gmail.com>
1 sibling, 1 reply; 7+ messages in thread
From: Albe Laurenz @ 2013-02-06 13:30 UTC (permalink / raw)
To: Dev Kumkar *EXTERN* <devdas.kumkar@gmail.com>; pgsql-sql; pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>; pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Dev Kumkar wrote:
> I am using postgres 9.2 and when executing function dblink facing a fatal error while trying to
> execute dblink_connect as follows:
>
> SELECT * FROM dblink_connect('host=127.0.0.1 port=5432 dbname=postgres password=test')
>
> ERROR: could not establish connection DETAIL: FATAL: password authentication failed for user
> "NETWORK SERVICE"
>
> What this error is related to? Do I need to modify pg_hba.conf file by any chance?
You should specify a user=username option in the connection string,
otherwise that defaults to your operating system user name.
Yours,
Laurenz Albe
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: [HACKERS] Facing authentication error on postgres 9.2 -> dblink functions
@ 2013-02-06 13:42 Andrew Dunstan <andrew@dunslane.net>
parent: Dev Kumkar <devdas.kumkar@gmail.com>
1 sibling, 1 reply; 7+ messages in thread
From: Andrew Dunstan @ 2013-02-06 13:42 UTC (permalink / raw)
To: Dev Kumkar <devdas.kumkar@gmail.com>; +Cc: pgsql-sql; pgsql-admin@postgresql.org; pgsql-hackers@postgresql.org
On 02/06/2013 08:09 AM, Dev Kumkar wrote:
> Hello Everyone,
>
> I am using postgres 9.2 and when executing function dblink facing a
> fatal error while trying to execute dblink_connect as follows:
>
> /SELECT * FROM dblink_connect('host=127.0.0.1 port=5432
> dbname=postgres password=test')/
>
> *ERROR*: could not establish connection DETAIL: FATAL: password
> authentication failed for user "NETWORK SERVICE"
>
> What this error is related to? Do I need to modify pg_hba.conf file by
> any chance?
>
> Thanks..
>
Do NOT send questions to multiple lists. That is a waste of everybody's
time. So do NOT follow up this email. This question belongs on
pgsql-general. If you have further questions pleease ask there.
The short answer is that you need to provide the user name in your
connect string.
cheers
andrew
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Facing authentication error on postgres 9.2 -> dblink functions
@ 2013-02-06 17:55 Dev Kumkar <devdas.kumkar@gmail.com>
parent: Albe Laurenz <laurenz.albe@wien.gv.at>
0 siblings, 1 reply; 7+ messages in thread
From: Dev Kumkar @ 2013-02-06 17:55 UTC (permalink / raw)
To: Albe Laurenz <laurenz.albe@wien.gv.at>; +Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Great.. thanks a lot Laurenz Albe!
Works perfect !!
Regards - Dev
On Wed, Feb 6, 2013 at 7:00 PM, Albe Laurenz <laurenz.albe@wien.gv.at>wrote:
> Dev Kumkar wrote:
> > I am using postgres 9.2 and when executing function dblink facing a
> fatal error while trying to
> > execute dblink_connect as follows:
> >
> > SELECT * FROM dblink_connect('host=127.0.0.1 port=5432
> dbname=postgres password=test')
> >
> > ERROR: could not establish connection DETAIL: FATAL: password
> authentication failed for user
> > "NETWORK SERVICE"
> >
> > What this error is related to? Do I need to modify pg_hba.conf file by
> any chance?
>
> You should specify a user=username option in the connection string,
> otherwise that defaults to your operating system user name.
>
> Yours,
> Laurenz Albe
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Facing authentication error on postgres 9.2 -> dblink functions
@ 2013-02-06 17:59 Dev Kumkar <devdas.kumkar@gmail.com>
parent: Andrew Dunstan <andrew@dunslane.net>
0 siblings, 0 replies; 7+ messages in thread
From: Dev Kumkar @ 2013-02-06 17:59 UTC (permalink / raw)
To: Andrew Dunstan <andrew@dunslane.net>; +Cc: pgsql-hackers@postgresql.org
Apologies for posting on multiple lists, surely will take care of this next
time.
Yup adding user=username resolved this. Thanks to 'Laurenz Albe' and you
too.
Regards - Dev
On Wed, Feb 6, 2013 at 7:12 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
>
> On 02/06/2013 08:09 AM, Dev Kumkar wrote:
>
>> Hello Everyone,
>>
>> I am using postgres 9.2 and when executing function dblink facing a fatal
>> error while trying to execute dblink_connect as follows:
>>
>> /SELECT * FROM dblink_connect('host=127.0.0.1 port=5432 dbname=postgres
>> password=test')/
>>
>> *ERROR*: could not establish connection DETAIL: FATAL: password
>> authentication failed for user "NETWORK SERVICE"
>>
>>
>> What this error is related to? Do I need to modify pg_hba.conf file by
>> any chance?
>>
>> Thanks..
>>
>>
>
> Do NOT send questions to multiple lists. That is a waste of everybody's
> time. So do NOT follow up this email. This question belongs on
> pgsql-general. If you have further questions pleease ask there.
>
> The short answer is that you need to provide the user name in your connect
> string.
>
> cheers
>
> andrew
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Facing authentication error on postgres 9.2 -> dblink functions
@ 2013-02-06 19:19 Dev Kumkar <devdas.kumkar@gmail.com>
parent: Dev Kumkar <devdas.kumkar@gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Dev Kumkar @ 2013-02-06 19:19 UTC (permalink / raw)
To: Albe Laurenz <laurenz.albe@wien.gv.at>; +Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Hey went ahead and tried to query across machines and facing following
error:
SELECT * FROM dblink_connect('host=x.x.x.x port=5432 dbname=postgres
user=postgres password=test')
could not connect to server: Connection timed out (0x0000274C/10060)
Is the server running on host "x.y.z.com" (x.x.x.x) and accepting
TCP/IP connections on port 5432?
Tried modifying pg_hba as follows:
1st try
host all all 0.0.0.0/0 md5
2nd try
host all all .z.com md5
postgresql.conf looks good for connections and authentication:
listen_addresses = '*'
Please suggest?
Thanks...
On Wed, Feb 6, 2013 at 11:25 PM, Dev Kumkar <devdas.kumkar@gmail.com> wrote:
> Great.. thanks a lot Laurenz Albe!
>
> Works perfect !!
>
> Regards - Dev
>
>
> On Wed, Feb 6, 2013 at 7:00 PM, Albe Laurenz <laurenz.albe@wien.gv.at>wrote:
>
>> Dev Kumkar wrote:
>> > I am using postgres 9.2 and when executing function dblink facing a
>> fatal error while trying to
>> > execute dblink_connect as follows:
>> >
>> > SELECT * FROM dblink_connect('host=127.0.0.1 port=5432
>> dbname=postgres password=test')
>> >
>> > ERROR: could not establish connection DETAIL: FATAL: password
>> authentication failed for user
>> > "NETWORK SERVICE"
>> >
>> > What this error is related to? Do I need to modify pg_hba.conf file by
>> any chance?
>>
>> You should specify a user=username option in the connection string,
>> otherwise that defaults to your operating system user name.
>>
>> Yours,
>> Laurenz Albe
>>
>
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: Facing authentication error on postgres 9.2 -> dblink functions
@ 2013-02-06 20:18 Dev Kumkar <devdas.kumkar@gmail.com>
parent: Dev Kumkar <devdas.kumkar@gmail.com>
0 siblings, 0 replies; 7+ messages in thread
From: Dev Kumkar @ 2013-02-06 20:18 UTC (permalink / raw)
To: Albe Laurenz <laurenz.albe@wien.gv.at>; +Cc: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Checked further netstat and could see following lines:
TCP 0.0.0.0:5432 0.0.0.0:0 LISTENING
Then checked from remote machine 'telnet' to target database machine and
could see connection failing, looking further port was blocked and
unblocking port resolved this. Queries working fine.
So far so good..
Thanks...
On Thu, Feb 7, 2013 at 12:49 AM, Dev Kumkar <devdas.kumkar@gmail.com> wrote:
> Hey went ahead and tried to query across machines and facing following
> error:
>
> SELECT * FROM dblink_connect('host=x.x.x.x port=5432 dbname=postgres
> user=postgres password=test')
>
> could not connect to server: Connection timed out (0x0000274C/10060)
> Is the server running on host "x.y.z.com" (x.x.x.x) and accepting
> TCP/IP connections on port 5432?
>
> Tried modifying pg_hba as follows:
> 1st try
> host all all 0.0.0.0/0 md5
>
> 2nd try
> host all all .z.com md5
>
>
> postgresql.conf looks good for connections and authentication:
> listen_addresses = '*'
>
> Please suggest?
>
> Thanks...
>
> On Wed, Feb 6, 2013 at 11:25 PM, Dev Kumkar <devdas.kumkar@gmail.com>wrote:
>
>> Great.. thanks a lot Laurenz Albe!
>>
>> Works perfect !!
>>
>> Regards - Dev
>>
>>
>> On Wed, Feb 6, 2013 at 7:00 PM, Albe Laurenz <laurenz.albe@wien.gv.at>wrote:
>>
>>> Dev Kumkar wrote:
>>> > I am using postgres 9.2 and when executing function dblink facing a
>>> fatal error while trying to
>>> > execute dblink_connect as follows:
>>> >
>>> > SELECT * FROM dblink_connect('host=127.0.0.1 port=5432
>>> dbname=postgres password=test')
>>> >
>>> > ERROR: could not establish connection DETAIL: FATAL: password
>>> authentication failed for user
>>> > "NETWORK SERVICE"
>>> >
>>> > What this error is related to? Do I need to modify pg_hba.conf file by
>>> any chance?
>>>
>>> You should specify a user=username option in the connection string,
>>> otherwise that defaults to your operating system user name.
>>>
>>> Yours,
>>> Laurenz Albe
>>>
>>
>>
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2013-02-06 20:18 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-02-06 13:09 Facing authentication error on postgres 9.2 -> dblink functions Dev Kumkar <devdas.kumkar@gmail.com>
2013-02-06 13:30 ` Albe Laurenz <laurenz.albe@wien.gv.at>
2013-02-06 17:55 ` Dev Kumkar <devdas.kumkar@gmail.com>
2013-02-06 19:19 ` Dev Kumkar <devdas.kumkar@gmail.com>
2013-02-06 20:18 ` Dev Kumkar <devdas.kumkar@gmail.com>
2013-02-06 13:42 ` Andrew Dunstan <andrew@dunslane.net>
2013-02-06 17:59 ` Dev Kumkar <devdas.kumkar@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox