Re: Server doesn't listen error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The problem is resolved now. It occured to be caused by two things:
first human factor - I made a typo in server's IP address (have
several remote machines and confused Linux machine with one of
Windows' ones), second was the OS factor - somehow, although local
host connection on port 5432 was allowed, the firewall denied outgoing
connection through this port. Turning off the firewall solved the
problem.

Thank You for all your advice and input on this topic I learned new
things in terms of diagnostics and realized how much there is still to
learn. Thank You once again.

2011/3/4 Frank Brendel <Frank.Brendel@xxxxxxxxxxx>:
>
>> Hello,
>>
>> The ifconfig showed I was wrong about IP address yet still problem
> You are a little quiet when it comes to provide some information.
> Did you change the IP address of the server or have you made a typo when
> connecting the server?
>
>> remains. The output of iptables on Ubuntu:
>> Chain INPUT (policy ACCEPT)
>> target   prot opt source        destination
>>
>> Chain FORWARD (policy ACCEPT)
>> target   prot opt source        destination
>>
>> Chain OUTPUT (policy ACCEPT)
>> target   prot opt source        destination
>>
>> The firewall is not blocking the port because I can connect to the
>> Windows machine with PG installed on it.
>>
> But we don't want connect TO the Windows machine. We want connect FROM
> the Windows machine.
>
>
> Ok, lets start again ;-)
>
> At first we have to check the IP address and the interface of the
> postgres server.
> As you mentioned the server has the IP address 10.10.128.145.
> Connect to this machine and post the output of the following command
> # ifconfig
>
>
>
> 2011/3/4 Frank Brendel <Frank.Brendel@xxxxxxxxxxx>:
>>>> I forgo to tell that client is a Windows machine so the iptables won't
>>>> run on it.
>>>>
>>> But on the server it will.
>>> So please post the output of the two commands and make sure that your
>>> Windows firewall (if activated) doesn't block outgoing traffic to port 5432.
>>>
>>> I feel it in my bones it's your Windows firewall ;-)
>>>
>>>> 2011/3/4 Frank Brendel<Frank.Brendel@xxxxxxxxxxx>:
>>>>>> output form psql:
>>>>>>
>>>>>> psql: could not connect to server: Connection refused (0x0000274D/10061)
>>>>>> Â Â Â Â Â ÂIs the server running on host "10.10.128.145" and accepting
>>>>>> Â Â Â Â Â ÂTCP/IP connections on port 5432?
>>>>>>
>>>>> Ok, seems that the server is up but either it is the wrong IP address or
>>>>> something is blocking us.
>>>>>
>>>>> Firstly check the IP address on the server:
>>>>> # ifconfig | grep inet
>>>>>
>>>>> and secondly if I remember right, Ubuntu configures a standard firewall.
>>>>> Please run the following iptables command on the server and on the
>>>>> client and post the output:
>>>>> # iptables -L
>>>>>
>>>>>
>>>>>
>>>>>> 2011/3/4 Frank Brendel<Frank.Brendel@xxxxxxxxxxx>:
>>>>>>>> The netstat command output:
>>>>>>>> tcp    Â0   Â0 0.0.0.0:5432      Â0.0.0.0:*
>>>>>>>> LISTEN Â Â Â13040/postgres
>>>>>>>> tcp6 Â Â Â 0 Â Â Â0 :::5432 Â Â Â Â Â Â Â Â :::*
>>>>>>>> LISTEN Â Â Â13040/postgres
>>>>>>>>
>>>>>>> Ok, the server is listening.
>>>>>>>
>>>>>>> So what is the output of
>>>>>>> # psql -h<your_database_ip>
>>>>>>>
>>>>>>> E.g. if you can't connect you should see something like this
>>>>>>>
>>>>>>> psql: could not connect to server: No route to host
>>>>>>> Â Â Â ÂIs the server running on host "x.x.x.x" and accepting
>>>>>>> Â Â Â ÂTCP/IP connections on port 5432?
>>>>>>>
>>>>>>> Please post the output of the psql command.
>>>>>>>
>>>>>>>
>>>>>>>> 2011/3/4 Frank Brendel<Frank.Brendel@xxxxxxxxxxx>:
>>>>>>>>> Hi Åukasz,
>>>>>>>>>
>>>>>>>>> is postgres really listening on all addresses?
>>>>>>>>>
>>>>>>>>> Please run the following command on your postgres server and post the
>>>>>>>>> output:
>>>>>>>>> # netstat -nltp | grep postgres
>>>>>>>>>
>>>>>>>>> And what is the error message when you try to connect with
>>>>>>>>> # psql -h<your_database_ip>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Regards
>>>>>>>>> Frank
>>>>>>>>>
>>>>>>>>> Am 04.03.2011 07:53, schrieb Lukasz Brodziak:
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> I have a problem with PostgreSQL 8.2.4 I've installed it on Ubuntu
>>>>>>>>>> configured to listen to all addresses started and still can't add the
>>>>>>>>>> server to pgAdmin on a remote machine neither can I connect through my
>>>>>>>>>> own app. All the credentials are ok, there is no NAT (it's LAN),
>>>>>>>>>> firewall or antivirus.
>>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
>>>>>>>>> To make changes to your subscription:
>>>>>>>>> http://www.postgresql.org/mailpref/pgsql-admin
>>>>>>>>>
>>>>>>> --
>>>>>>> Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
>>>>>>> To make changes to your subscription:
>>>>>>> http://www.postgresql.org/mailpref/pgsql-admin
>>>>>>>
>>>>> --
>>>>> Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
>>>>> To make changes to your subscription:
>>>>> http://www.postgresql.org/mailpref/pgsql-admin
>>>>>
>>>>
>>> --
>>> Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
>>> To make changes to your subscription:
>>> http://www.postgresql.org/mailpref/pgsql-admin
>>>
>>
>>
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
>



-- 
Åukasz Brodziak
"What if everyting around You isn't quite as it seems,
What if all the world You think You know is an inelaborate dream
When You look at Your reflection is that all you want it to be
What if You could look right through the cracks
Would You find Yourself...... Find Yourself afraid to see"

-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux