Re: Connection Problem

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Rob Stone <robstone(at)mira(dot)net>
Cc: Radosław Smogura <rsmogura(at)softperience(dot)eu>, Oliver Jowett <oliver(at)opencloud(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Connection Problem
Date: 2010-12-10 01:18:12
Message-ID: AANLkTi=4DOwv7O+PCGPCRowdTMzhFR8+S4rPzatJ4CSO@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Rob,

can you turn of IPV6 and retest this ? Yes, I'm grasping at straws.

Dave

On Thu, Dec 9, 2010 at 6:48 PM, Rob Stone <robstone(at)mira(dot)net> wrote:
> Hi Radek,
>
> Output from those commands attached.
>
> I always completely shutdown my laptop and pull the plug. So, it is
> doing a complete cold boot each time.
>
> When I try connecting to the database with ExecuteQuery, the same error
> is returned for both "localhost" and 127.0.0.1, when entering those
> values as the "host" on the connection dialogue.
>
> Via a browser, if I access http://localhost it returns the "It Work's!"
> output from apache.
>
> Thanks to everybody for your help.
>
> Cheers,
> Rob
>
>
>
> On Thu, 2010-12-09 at 15:43 -0500, Radosław Smogura wrote:
>> Hi,
>>
>> Check with netstat -atnp (it shows the process associated with port),
>> but psql should be there.
>>
>> Do route -n to see routing traces, execute ifconfig next.
>>
>> But this can be kernel driver problem. Do you "shut down" laptop by
>> closing it, I mean do you put it in sleep mode? Maybe you need to
>> restart network interfaces instead.
>>
>> On my PC when I put it on sleep mode, SATA controller doesn't wakes up.
>>
>> Kind regards,
>> Radek Smogura
>> > Rob,
>> >
>> > Have you tried 127.0.0.1 instead of localhost ? It's not that it isn't
>> > listening, the problem is there is no route to localhost which seems
>> > strange on it's own.
>> >
>> > Dave
>> >
>> > On Thu, Dec 9, 2010 at 8:18 AM, Rob Stone <robstone(at)mira(dot)net> wrote:
>> >> Hi Oliver,
>> >>
>> >> Thanks for the reply.
>> >>
>> >> Output from netstat shows port 5432 as being listened. Don't know what
>> >> to try next.
>> >>
>> >> Sometimes when I shut down my laptop the "stop" messages are displayed.
>> >> I noticed last night that pg_ctl could not find the postmaster.pid file,
>> >> even though PGHOST and PGDATA variables are set. I'm starting it with
>> >> the -i and -D options with -D pointing explicitly to the PGDATA path
>> >> using the full path name. Could not finding a postmaster.pid file be
>> >> linked in any way with my problem??
>> >>
>> >>
>> >> Cheers,
>> >> Rob
>> >>
>> >> rob(at)roblaptop:~> netstat -ln --tcp
>> >> Active Internet connections (only servers)
>> >> Proto Recv-Q Send-Q Local Address           Foreign Address
>> >> State
>> >> tcp        0      0 0.0.0.0:22              0.0.0.0:*
>> >> LISTEN
>> >> tcp        0      0 127.0.0.1:631           0.0.0.0:*
>> >> LISTEN
>> >> tcp        0      0 0.0.0.0:5432            0.0.0.0:*
>> >> LISTEN
>> >> tcp        0      0 0.0.0.0:58112           0.0.0.0:*
>> >> LISTEN
>> >> tcp        0      0 0.0.0.0:2049            0.0.0.0:*
>> >> LISTEN
>> >> tcp        0      0 0.0.0.0:44739           0.0.0.0:*
>> >> LISTEN
>> >> tcp        0      0 0.0.0.0:6566            0.0.0.0:*
>> >> LISTEN
>> >> tcp        0      0 0.0.0.0:60135           0.0.0.0:*
>> >> LISTEN
>> >> tcp        0      0 0.0.0.0:111             0.0.0.0:*
>> >> LISTEN
>> >> tcp6       0      0 :::22                   :::*
>> >> LISTEN
>> >> tcp6       0      0 ::1:631                 :::*
>> >> LISTEN
>> >> tcp6       0      0 :::5432                 :::*
>> >> LISTEN
>> >> tcp6       0      0 :::6566                 :::*
>> >> LISTEN
>> >> tcp6       0      0 :::80                   :::*
>> >> LISTEN
>> >> rob(at)roblaptop:~>
>> >>
>> >>
>> >>
>> >>
>> >> On Wed, 2010-12-08 at 08:52 +1300, Oliver Jowett wrote:
>> >>> On 08/12/10 02:29, Rob Stone wrote:
>> >>>
>> >>> > Wrote a mickey mouse java class (testdbconn) to see if I could access
>> >>> > the database and read data from a table that has two rows. See attached.
>> >>> > When it runs it displays the same SQL error code as ExecuteQuery --
>> >>> > 08001 -- which is the "can't connect error".
>> >>>
>> >>> You have a network configuration problem of some sort:
>> >>>
>> >>> > Caused by: java.net.SocketException: Network is unreachable
>> >>>
>> >>> (This isn't "connection refused", it's "I have no configured route to
>> >>> that address")
>> >>>
>> >>> Oliver
>> >>
>> >>
>> >>
>> >> --
>> >> Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
>> >> To make changes to your subscription:
>> >> http://www.postgresql.org/mailpref/pgsql-jdbc
>> >>
>> >
>> > --
>> > Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
>> > To make changes to your subscription:
>> > http://www.postgresql.org/mailpref/pgsql-jdbc
>> >
>>
>>
>
>

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Thomas Markus 2010-12-10 07:27:50 Re: Connection Problem
Previous Message Jeff Hubbach 2010-12-10 01:07:59 Re: Connection Problem