| Author |
TCP/IP connection problem
|
|
| Jari Vauhkonen 2006-10-26, 7:25 pm |
|
Hello,
I have tried to set up a PostgreSQL server with no success. Connections from
other-than-local hosts won't work. I've tried to connect from Windows XP using
PgWorkSheet && pgAccess.
I have studied the internet for similar problems without an answer. the
following has been done:
-- PSQL & PSQL-server installation
-- configuring the pg_hba.conf with following lines:
host all 127.0.0.1 255.255.255.255 trust
host all <my_ip> 255.255.255.255 trustlocal all trust
host koli <my_ip> 255.255.255.255 trust
-- configuring the postgresql.conf wit following lines:
#listen_addresses = '*'
#port = 5432
#tcpip_socket = true
-- starting the postmaster with command
/usr/local/pgsql/bin/postmaster -i -D /usr/local/pgsql/data &
-- installing the PSQL ODBC driver for Windows
I wonder if the problem is related to the operating system's TCP/IP settings? I
tried netstat to find out if the port 5432 is used, but it seems that it isn't.
What should I do? Remember, I'm quite a newbie with linux-style operating
systems so keep it simple.
Thanks already,
Jari
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly
| |
| Ben Suffolk 2006-10-26, 7:25 pm |
| > -- configuring the postgresql.conf wit following lines:
> #listen_addresses = '*'
> #port = 5432
> #tcpip_socket = true
Jari,
You need to remove the # from the lines, a # comments the line out,
so although you have set the port and changed the address it will not
actually have done anything.
Regards
Ben
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
| |
| Jari Vauhkonen 2006-10-26, 7:25 pm |
| Quoting Ben Suffolk <ben@vanilla.net>:
>
> Jari,
>
> You need to remove the # from the lines, a # comments the line out,
> so although you have set the port and changed the address it will not
> actually have done anything.
>
Ben,
thank you for your reply. A truly amateurish mistake by me :)
BUT fixing that one did no good. The problem remains.
Jari
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
| |
| Alvaro Herrera 2006-10-26, 7:25 pm |
| Jari Vauhkonen wrote:
> Quoting Ben Suffolk <ben@vanilla.net>:
>
>
> thank you for your reply. A truly amateurish mistake by me :)
>
> BUT fixing that one did no good. The problem remains.
Did you restart the server after changing those lines?
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
| |
| Jari Vauhkonen 2006-10-26, 7:25 pm |
| Quoting Alvaro Herrera < alvherre@commandprom
pt.com>:
> Jari Vauhkonen wrote:
>
> Did you restart the server after changing those lines?
>
> --
Yes.
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
| |
| Ben Suffolk 2006-10-26, 7:25 pm |
| >>>> actually have done anything.
>
> Yes.
When you try and connect check /var/log/messages for any errors, and
let us know what (if any) errors are reported.
Regards
Ben
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
| |
| Enrico 2006-10-26, 7:25 pm |
| On Thu, 26 Oct 2006 16:02:01 +0300
Jari Vauhkonen <jari.vauhkonen@joensuu.fi> wrote:
>
>
> Hello,
>
> I have tried to set up a PostgreSQL server with no success. Connections from
> other-than-local hosts won't work. I've tried to connect from Windows XP using
> PgWorkSheet && pgAccess.
Is there any firwall between client and server like ZoneAlarm on Windows XP?
Enrico
--
If Bill Gates had a penny for everytime Windows crashed,he'd be a multi-billionaire by now .......oh look, he already is !!!!
scotty@linuxtime.it - Skype:sscotty71
http://www.linuxtime.it/enricopirozzi
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
| |
| Jari Vauhkonen 2006-10-26, 7:25 pm |
| Quoting Ben Suffolk <ben@vanilla.net>:
>
> When you try and connect check /var/log/messages for any errors, and
> let us know what (if any) errors are reported.
>
1) These are the latest messages ( /var/log/messages )
Only my test of closing down & reopening postgresql.
Oct 26 18:33:25 joymap su(pam_unix)[4901]: session opened for user postgres by
root(uid=0)
Oct 26 18:33:25 joymap su(pam_unix)[4901]: session closed for user postgres
Oct 26 18:33:33 joymap postgresql: postmaster shutdown succeeded
Oct 26 18:33:35 joymap su(pam_unix)[4951]: session opened for user postgres by
root(uid=0)
Oct 26 18:33:35 joymap su(pam_unix)[4951]: session closed for user postgres
2) Enrico's firewall propotion:
There is a firewall in WinXP ( F-Secure ). I allready tried disabling it. I have
also configured the Red Hat security level. Right now it allows all traffic
thru eth0.
3) I managed to get a connection-lookalike:
netstat print:
tcp 0 0 < my_psql_server_domai
n>:postgres <my_client_domain>:2429 TIME_WAIT
What next?
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
| |
| Ben Suffolk 2006-10-26, 7:25 pm |
| > 1) These are the latest messages ( /var/log/messages )
> Only my test of closing down & reopening postgresql.
>
> Oct 26 18:33:25 joymap su(pam_unix)[4901]: session opened for user
> postgres by
> root(uid=0)
> Oct 26 18:33:25 joymap su(pam_unix)[4901]: session closed for user
> postgres
> Oct 26 18:33:33 joymap postgresql: postmaster shutdown succeeded
> Oct 26 18:33:35 joymap su(pam_unix)[4951]: session opened for user
> postgres by
> root(uid=0)
> Oct 26 18:33:35 joymap su(pam_unix)[4951]: session closed for user
> postgres
>
> 2) Enrico's firewall propotion:
> There is a firewall in WinXP ( F-Secure ). I allready tried
> disabling it. I have
> also configured the Red Hat security level. Right now it allows all
> traffic
> thru eth0.
>
> 3) I managed to get a connection-lookalike:
> netstat print:
> tcp 0 0 < my_psql_server_domai
n>:postgres <my_client_domain>:2429
> TIME_WAIT
>
> What next?
I suggest you try and connect from the pgsql machine locally using
tcp :-
> psql -h = same.host.as.configured.from.windows.box -p = 5432 db user
Then we can see if the problem still lies with pgsql, or with the
firewall.
BEn
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
| |
| Jari Vauhkonen 2006-10-26, 7:25 pm |
| Quoting Ben Suffolk <ben@vanilla.net>:
>
>
> I suggest you try and connect from the pgsql machine locally using
> tcp :-
>
>
> Then we can see if the problem still lies with pgsql, or with the
> firewall.
>
Ben,
All right. Now it works.
I tested your suggestion and found out from logfiles that my pg_hba.conf file
was quite corrupted ( i.e. invalid IP masks ) . I re-arranged the file, tested,
re-arranged again... and finally, it works.
Thanks to everyone who helped. I hope all of you didn't get too annoyed with all
these "PRESS ANYKEY" - "Hey, where's the anykey???" -styled questions of mine.
Jari
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
|
|
|
|