pgsql continuing network issues

Started by David Bernalabout 20 years ago8 messagesgeneral
Jump to latest
#1David Bernal
david.bernal@gmail.com

Hey all,

I wrote a few days ago regarding networking issues I'm having. At this
point, I'm at my wit's end and am hoping someone can help me.

I am running postgres 8.1.0 on Windows XP w\SP2. I currently have
PGSQL configured to accept connections from my local IP, 192.168.0.100
using the listen_addresses directive.

If I try to connect to the database from the same machine using the
psql program or using NPGSQL (.NET pgsql provider) it simply hangs.
Nothing happens at all. I don't get errors in my event viewer, nor do
I get any errors in the textfile log postgresql maintains.

IF I change the listen_addresses directive to localhost, I can connect
fine and everything works EXCEPT I get the message "NOTICE: Unknown
win32 socket error code: 10107" repeatedly anytime I do something.
This would be acceptable, except that I need to be able to access this
database at client sites.

Can anyone help me or direct me to someone who can? I'm trying to push
postgres to my clients, because it seems like a great RDBMs, but if I
can't even get a server to work, I'm going to have to switch to
something else.

Thank you,

David

#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: David Bernal (#1)
Re: pgsql continuing network issues

On Friday 31 March 2006 02:55 am, David Bernal wrote:

Hey all,

I wrote a few days ago regarding networking issues I'm having. At this
point, I'm at my wit's end and am hoping someone can help me.

I am running postgres 8.1.0 on Windows XP w\SP2. I currently have
PGSQL configured to accept connections from my local IP, 192.168.0.100
using the listen_addresses directive.

If I try to connect to the database from the same machine using the
psql program or using NPGSQL (.NET pgsql provider) it simply hangs.
Nothing happens at all. I don't get errors in my event viewer, nor do
I get any errors in the textfile log postgresql maintains.

IF I change the listen_addresses directive to localhost, I can connect
fine and everything works EXCEPT I get the message "NOTICE: Unknown
win32 socket error code: 10107" repeatedly anytime I do something.
This would be acceptable, except that I need to be able to access this
database at client sites.

Can anyone help me or direct me to someone who can? I'm trying to push
postgres to my clients, because it seems like a great RDBMs, but if I
can't even get a server to work, I'm going to have to switch to
something else.

Thank you,

David

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Would it be possible to post the contents of your postgresql.conf and
pg_hba.conf files?

--
Adrian Klaver
aklaver@comcast.net

#3Walter Stier
walter.stier@t-online.de
In reply to: Adrian Klaver (#2)
unsubscribe from pgsql-de-allgemein

unsubscribe from pgsql-de-allgemein

#4Tony Caduto
tony_caduto@amsoftwaredesign.com
In reply to: Adrian Klaver (#2)
Re: pgsql continuing network issues

Adrian Klaver wrote:

On Friday 31 March 2006 02:55 am, David Bernal wrote:

Hey all,

I wrote a few days ago regarding networking issues I'm having. At this
point, I'm at my wit's end and am hoping someone can help me.

I am running postgres 8.1.0 on Windows XP w\SP2. I currently have
PGSQL configured to accept connections from my local IP, 192.168.0.100
using the listen_addresses directive.

Why don't you try this:
set listen_addresses to * like so:
listen_addresses = '*'

Then set your pg_hba.conf to this:

# TYPE DATABASE USER CIDR-ADDRESS METHOD

# IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all 192.168.0.100/32 trust

For this example I put trust for the method to rule out any password
issues, if you are confident
you have no password issues change the method to md5 or whatever your
choice is.

You should for sure change the listen_addresses to * because you may
have two NICs in the server or PC and somehow the external connections
are connecting to the other nic.

I always setup my win32 and Unix servers this way and have never had
problems.

Hope this helps,

--
Tony Caduto
AM Software Design
http://www.amsoftwaredesign.com
Home of PG Lightning Admin for Postgresql
Your best bet for Postgresql Administration

#5Steve Atkins
steve@blighty.com
In reply to: David Bernal (#1)
Re: pgsql continuing network issues

On Mar 31, 2006, at 2:55 AM, David Bernal wrote:

Hey all,

I wrote a few days ago regarding networking issues I'm having. At this
point, I'm at my wit's end and am hoping someone can help me.

I am running postgres 8.1.0 on Windows XP w\SP2. I currently have
PGSQL configured to accept connections from my local IP, 192.168.0.100
using the listen_addresses directive.

If I try to connect to the database from the same machine using the
psql program or using NPGSQL (.NET pgsql provider) it simply hangs.
Nothing happens at all. I don't get errors in my event viewer, nor do
I get any errors in the textfile log postgresql maintains.

What IP address are you trying to connect to? If you're trying to
connect to 127.0.0.1 and it's listening on 192.168.0.100 then
that won't work.

IF I change the listen_addresses directive to localhost, I can connect
fine and everything works EXCEPT I get the message "NOTICE: Unknown
win32 socket error code: 10107" repeatedly anytime I do something.
This would be acceptable, except that I need to be able to access this
database at client sites.

10107 is WSASYSCALLFAILURE. A pretty generic message, but I've
seen it when some broken software has inserted itself into the IP
stack.

Can anyone help me or direct me to someone who can? I'm trying to push
postgres to my clients, because it seems like a great RDBMs, but if I
can't even get a server to work, I'm going to have to switch to
something else.

Can you connect to TCP port 5432 using telnet, or somesuch? If
not, are you running any sort of crapware on the windows box that
will break your network stack ("personal firewall" or "antivirus" are
some of the buzzwords there - I'd look at your "personal firewall"
settings first).

Cheers,
Steve

#6David Bernal
david.bernal@gmail.com
In reply to: Steve Atkins (#5)
Re: pgsql continuing network issues

What IP address are you trying to connect to? If you're trying to
connect to 127.0.0.1 and it's listening on 192.168.0.100 then
that won't work.

I'm trying to connect to 192.168.0.100

10107 is WSASYSCALLFAILURE. A pretty generic message, but I've
seen it when some broken software has inserted itself into the IP
stack.

Right, I ran a program to check the stack, and it actually didn't find anything.

Can you connect to TCP port 5432 using telnet, or somesuch? If
not, are you running any sort of crapware on the windows box that
will break your network stack ("personal firewall" or "antivirus" are
some of the buzzwords there - I'd look at your "personal firewall"
settings first).

I CAN telnet to 192.168.0.100 5432.

#7David Bernal
david.bernal@gmail.com
In reply to: Tony Caduto (#4)
Re: pgsql continuing network issues

You should for sure change the listen_addresses to * because you may
have two NICs in the server or PC and somehow the external connections
are connecting to the other nic.

I tried this as well, but it didn't change anything.

#8Magnus Hagander
magnus@hagander.net
In reply to: David Bernal (#7)
Re: pgsql continuing network issues

IF I change the listen_addresses directive to localhost, I

can connect

fine and everything works EXCEPT I get the message "NOTICE: Unknown
win32 socket error code: 10107" repeatedly anytime I do something.
This would be acceptable, except that I need to be able to

access this

database at client sites.

10107 is WSASYSCALLFAILURE. A pretty generic message, but
I've seen it when some broken software has inserted itself
into the IP stack.

For those who prefer enlgish, the text for that message is "A system
call that should never fail has failed.". I'd say that indicates
something is not healthy about your machine :)

Usually when these things happen, I'd recommend looking at firewall,
antivirus or antispyware products. And try to actually remove them, not
just disable it. Failing that, look at virus or spyware - it is windows
after all :-)

I CAN telnet to 192.168.0.100 5432.

That, however, makes it look like it might be something different.
*Might* - it cna still be a fw or such.

It could be an issue with DNS resolving, considering you definitly have
problems looking up "localhost" (which really should always work). Can
you ping to arbitrary dns names? Or specifically to the DNS name you're
trying to connect to?

//Magnus