From: | "Robert J(dot) Sanford, Jr(dot)" <rsanford(at)nolimitsystems(dot)com> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: odd psql behaviour on OSX |
Date: | 2002-04-25 20:21:16 |
Message-ID: | HAEKIEGIHMCDGLOIEKGMCEGCEFAA.rsanford@nolimitsystems.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
okay, i'm doing a little more testing and i have some oddities. i'm hoping
to get some additional help with the additional info i'm providing here.
i'm testing in two different networks - at home and at work. each of the
networks has postgres server on it. both of the servers have a public and
private ip address for each of the networks. the private ip address for both
is a 192.168.69.xxx and the public ip address is, well, a public ip address.
the network at home is a cable modem network with a linksys router/firewall
that is assigning dynamic ip addresses. the router passes requests coming
from outside through the port that i have selected to the machine running
postgres. when i attempt to use psql to access the private ip address i get
the unknown host error listed below. when i attempt to use psql to access
the public ip address it responds and lets me in!
the network at work is running a bunch of cisco routers and switches and all
that good sort of stuff that i have no control over. when i attempt to
access the private ip address from my osx machine it fails to connect with
the unknown host error. when i try to connect to the public ip address it
also fails with the same error. when i try to connect to either the public
or private ip addresses from a windows machine running cygwin (i've tried
from both at work and at home) it works just fine.
i have loaded up the netinfo manager application listed below but i have no
idea as to what to do with it. i'm not a unix guy by any stretch of the
imagination. not afraid of it, just don't any experience with it but willing
to learn.
from my network at work i have explicitly set the DNS servers but still no
joy.
i can still ping the server and get a response but psql is not seeing it.
aaaaaauuuuuuugggggghhhhhhhh!
so why can i see the one public ip address but not the other or the two
private ip addresses?
many thanks!
rjsjr
> -----Original Message-----
> From: pgsql-general-owner(at)postgresql(dot)org
> [mailto:pgsql-general-owner(at)postgresql(dot)org]On Behalf Of Gregory Seidman
> Sent: Wednesday, April 24, 2002 10:48 PM
> To: pgsql-general(at)postgresql(dot)org
> Subject: Re: [GENERAL] odd psql behaviour on OSX
>
>
> Robert J. Sanford, Jr. sez:
> } i am running postgresql 7.2 for OSX (10.1.4?) that was pre-built by marc
> } liyange (thank you very much mr. liyange!). whenever i'm
> working on my local
> } machine everything works gloriously. but when i attempt to use psql to
> } attach to a remote host i always receive the error message of "unknown
> } host".
> }
> } i will type in a command line of
> } $psql -h 192.168.1.128 -U myName myDBName
> }
> } and get back
> } psql: unknown host:192.168.1.128
> }
> } that server responds when i ping it. i have tried adding entries into my
> } hosts file and restarting the system but that didn't help either. i have
> } tried the -p 4532 option to specify the port but that doesn't
> work either.
>
> Incidentally, MacOS X normally ignores the /etc/hosts file. If you want to
> set up that sort of thing, you need to do it in NetInfo Manager.app (or
> with niutil) to add an entry to /machines.
>
> } when i use dbvisualizer with the postgresql jdbc driver i can
> connect with
> } no problems. when i try psql on a win2k machine using cygin i
> can connect
> } with no problems. this leads me to believe that there is an
> issue with psql
> } accessing the network on osx.
> }
> } any ideas and/or suggestions?
>
> I am using the same package and version without any such difficulties. I
> suspect that it is a DNS issue. See if it has the same problem if
> you add a
> period to the end of the host. This will make the DNS lookup behave a bit
> differently (I forget exactly what it shortcuts... maybe just expanding
> with search domains, maybe all lookups altogether on a numeric address).
> Thus:
>
> psql -h 192.168.1.128. -U myName myDBName
>
> } rjsjr
> --Greg
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>
From | Date | Subject | |
---|---|---|---|
Next Message | Risko Peter | 2002-04-25 20:37:49 | large object dump-restore problem(bug?) |
Previous Message | Stephan Szabo | 2002-04-25 19:35:00 | Re: Performance Issues with count() |