Thread: Re: No connection to a PG 8.0 Beta 1 win32 server
Hello ! I've corrected my win32 pg_hba.conf, it contains : host all all 127.0.0.1 255.255.255.255 md5 host all all 192.168.0.0 255.255.255.0 md5 but I can't connect from my W2k client at IP 192.168.0.11 ! My postgresql.conf contains : #--------------------------------------------------------------------------- # CONNECTIONS AND AUTHENTICATION #--------------------------------------------------------------------------- # - Connection Settings - #listen_addresses = 'localhost' # what IP interface(s) to listen on; # defaults to localhost, '*' = any tcpip_socket = true port = 5432 max_connections = 100 # note: increasing max_connections costs about 500 bytes of shared # memory per connection slot, in addition to costs from shared_buffers # and max_locks_per_transaction superuser_reserved_connections = 2 #unix_socket_directory = '' #unix_socket_group = '' #unix_socket_permissions = 0777 # octal #rendezvous_name = '' # defaults to the computer name # - Security & Authentication - #authentication_timeout = 60 # 1-600, in seconds #ssl = false #password_encryption = true #krb_server_keyfile = '' #db_user_namespace = false I create (in bin) the script reload.bat to reload the service : @echo. @C:\WINDOWS\system32\net.exe stop pgsql-8.0-beta1 @echo. @C:\WINDOWS\system32\net.exe start pgsql-8.0-beta1 pause With "tcpip_socket = true" the script reload.bat stop the service but can't start !? So I can't connect from the W2k client ... With "#tcpip_socket = true" the script reload.bat stop and start the service. But can't connect from the W2k client . I define NT user variables : PGDATA=C:\Program Files\PostgreSQL\8.0-beta1\data PGPORT=5432 No change. I don't understand what happen ... Luc
Secrétariat wrote: > Hello ! > > I've corrected my win32 pg_hba.conf, it contains : > host all all 127.0.0.1 255.255.255.255 md5 > host all all 192.168.0.0 255.255.255.0 md5 > but I can't connect from my W2k client at IP 192.168.0.11 ! Open a command-prompt on the client and try to telnet to your server, port 5432. Type "aa" and hit return - you should get an error message complaining about a bad "startup packet". Do the same from the server to the external IP address and then 127.0.0.1 If none of these work, then PG probably isn't listening. If 127.0.0.1 works but one or more of the others don't then check your firewall. -- Richard Huxton Archonet Ltd
I don't have a telnet server on the Win XP Pro PC acting as PG server for Beta1 ! The problem, as I explain before, is : if I enbled "tcpip_socket" in postgresql.conf the Beta1 service don't start !? On that LAN I have a Linux PG 7.4.3 working fine. Luc > Secrétariat wrote: > > Hello ! > > > > I've corrected my win32 pg_hba.conf, it contains : > > host all all 127.0.0.1 255.255.255.255 md5 > > host all all 192.168.0.0 255.255.255.0 md5 > > but I can't connect from my W2k client at IP 192.168.0.11 ! > > Open a command-prompt on the client and try to telnet to your server, > port 5432. > Type "aa" and hit return - you should get an error message complaining > about a bad "startup packet". > > Do the same from the server to the external IP address and then 127.0.0.1 > > If none of these work, then PG probably isn't listening. If 127.0.0.1 > works but one or more of the others don't then check your firewall. > > -- > Richard Huxton > Archonet Ltd >
I already receive 8 times this message, not responding to my question ! The question is : Why when I enable "tcpip_socket = true" in the postgresql.conf it becomes impossible to restart the service ?! (so hosts conections are impossible). Luc Secrétariat wrote: > Hello ! > > I've corrected my win32 pg_hba.conf, it contains : > host all all 127.0.0.1 255.255.255.255 md5 > host all all 192.168.0.0 255.255.255.0 md5 > but I can't connect from my W2k client at IP 192.168.0.11 ! Open a command-prompt on the client and try to telnet to your server, port 5432. Type "aa" and hit return - you should get an error message complaining about a bad "startup packet". Do the same from the server to the external IP address and then 127.0.0.1 If none of these work, then PG probably isn't listening. If 127.0.0.1 works but one or more of the others don't then check your firewall. -- Richard Huxton Archonet Ltd ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Luc, Your best bet is to look in the log files, to see why postgresql doesn't start up. Now I have no clue where you would find them on windows, but.. that's where I would look. Dave On Tue, 2004-08-24 at 10:12, Secrétariat wrote: > I already receive 8 times this message, not responding to my question ! > The question is : > Why when I enable "tcpip_socket = true" in the postgresql.conf it becomes > impossible to restart the service ?! (so hosts conections are impossible). > > Luc > > > Secrétariat wrote: > > Hello ! > > > > I've corrected my win32 pg_hba.conf, it contains : > > host all all 127.0.0.1 255.255.255.255 md5 > > host all all 192.168.0.0 255.255.255.0 md5 > > but I can't connect from my W2k client at IP 192.168.0.11 ! > > Open a command-prompt on the client and try to telnet to your server, > port 5432. > Type "aa" and hit return - you should get an error message complaining > about a bad "startup packet". > > Do the same from the server to the external IP address and then 127.0.0.1 > > If none of these work, then PG probably isn't listening. If 127.0.0.1 > works but one or more of the others don't then check your firewall. -- Dave Cramer 519 939 0336 ICQ # 14675561 www.postgresintl.com
Secrétariat wrote: > I already receive 8 times this message, not responding to my question ! > The question is : > Why when I enable "tcpip_socket = true" in the postgresql.conf it becomes > impossible to restart the service ?! (so hosts conections are impossible). If PostgreSQL won't start with tcpip_socket=true, but can otherwise then that suggests it can't open the socket. That might be because something else is using it, or it might be because a firewall won't let you. If something else is using the socket then by telnet-ing to port 5432 we can see what is there. If you get different results trying to connect from different places then that would suggest a firewall is involved. I'm assuming you have: 1. Tried stopping and starting manually 2. checked the logs and there is nothing there 3. have run netstat and it doesn't show anything useful. Given that you have done those, we need to start from outside and work in. -- Richard Huxton Archonet Ltd
Secrétariat wrote: > I don't have a telnet server on the Win XP Pro PC acting as PG server for > Beta1 ! So ? If you do: telnet <your server> 5432 the command only open a TCP connection to the port 5432, this will test if you are able to reach your server. Regards Gaetano Mendola
Richard Huxton <dev@archonet.com> writes: > Secr�tariat wrote: >> I already receive 8 times this message, not responding to my question ! >> The question is : >> Why when I enable "tcpip_socket = true" in the postgresql.conf it becomes >> impossible to restart the service ?! (so hosts conections are impossible). > If PostgreSQL won't start with tcpip_socket=true, but can otherwise then > that suggests it can't open the socket. No, it's easier than that: there is no "tcpip_socket" parameter anymore, so the postmaster is rejecting an invalid configuration file entry. (Looking at the postmaster's log would have told you this btw) regards, tom lane
I see in the log file that parameter "tcpip_socket" was invalid, but how can I connect my W2k client with pgAdmin III to my XP Pro server using Beta1 ? Is the Beta1 à standalone version ? regards, luc. > Tom Lane write : > No, it's easier than that: there is no "tcpip_socket" parameter anymore, > so the postmaster is rejecting an invalid configuration file entry. > (Looking at the postmaster's log would have told you this btw) > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) >
Secrétariat wrote: > I see in the log file that parameter "tcpip_socket" was invalid, > but how can I connect my W2k client with pgAdmin III to my XP Pro server > using Beta1 ? > Is the Beta1 à standalone version ? Nope - AFAIK it's a full version. The documentation for 8.0beta is available online at: http://developer.postgresql.org/docs/postgres/index.html If you look at the following page http://developer.postgresql.org/docs/postgres/runtime-config.html you should see that listen_addresses is the new value and should be set to "*" The documentation should be part of your installed package. -- Richard Huxton Archonet Ltd