Database connection problem
Database connection problem
Trying to connect in TPgConnection to server I receive "Cannot connect to database. Socket error on connect. WSAGetLast Error return 10060($274C)".
Serve definition is suspected. Any ideas? What is the Error meaning?
Thank you in advance...
Serve definition is suspected. Any ideas? What is the Error meaning?
Thank you in advance...
Hello,
Please specify the following information:
the exact version of PgDAC;
the exact version of the PostgreSQL server;
the exact version of your IDE.
Also please check that you specified all connection parameters correctly and you can connect to the server with the help of any third-party components, for example, PgAdmin.
Please specify the following information:
the exact version of PgDAC;
the exact version of the PostgreSQL server;
the exact version of your IDE.
Also please check that you specified all connection parameters correctly and you can connect to the server with the help of any third-party components, for example, PgAdmin.
Hi AlexP,
Thank you for your response.
Please, specify how I can get PgDAC and IDE version.
I use Delphi 6, build 6.240 and Postgre SQL 9.0 for win x64.
I succeed to connect to local server with Postgre SQL 9.0 x32 and hope that parameters for connection are correct.
Is it possible to get explanations for Errors?
Thank you in advance...
Thank you for your response.
Please, specify how I can get PgDAC and IDE version.
I use Delphi 6, build 6.240 and Postgre SQL 9.0 for win x64.
I succeed to connect to local server with Postgre SQL 9.0 x32 and hope that parameters for connection are correct.
Is it possible to get explanations for Errors?
Thank you in advance...
Hello,
You can find the exact version of PgDAC at the About tab of the PgConnection component.
As I have already written, please check if you can connect to your PostgreSQL x64 server using the standard PgAdmin utility. If you can connect using PgAdmin, you should use the same settings in PgDAC. If you cannot connect, contact your database administrator and ask him what are the exact parameters for connecting to the remote server.
You can get the description of the error by executing the following code:
Where ErrCode is the error code (in your case it is 10060: 'A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond')
You can find the exact version of PgDAC at the About tab of the PgConnection component.
As I have already written, please check if you can connect to your PostgreSQL x64 server using the standard PgAdmin utility. If you can connect using PgAdmin, you should use the same settings in PgDAC. If you cannot connect, contact your database administrator and ask him what are the exact parameters for connecting to the remote server.
You can get the description of the error by executing the following code:
Code: Select all
ShowMessage(SysErrorMessage(ErrCode));
Hi AlexP,
I appreciate you immediate response!!!
I could not find About Tab on the Components, but the version of "pgdac60.bpl" is 2.20.0.6. (Sorry, sometimes I become stupid....)
Connection to Postgre SQL from the local PgAdmin is simple and successful.
The same parameters does not help from remote.
I suspect a problem in pg_hba.conf. I have the next:
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
host all all 192.168.1.0/0 md5
and hope it work, but no....
Thank you for tip with "LastError" explanation...
I appreciate you immediate response!!!
I could not find About Tab on the Components, but the version of "pgdac60.bpl" is 2.20.0.6. (Sorry, sometimes I become stupid....)
Connection to Postgre SQL from the local PgAdmin is simple and successful.
The same parameters does not help from remote.
I suspect a problem in pg_hba.conf. I have the next:
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
host all all 192.168.1.0/0 md5
and hope it work, but no....
Thank you for tip with "LastError" explanation...
Hi Alex,
Maybe, the problem is that remote server is Windows 7 with Postgre SQL 9.0 for x64.
Client that I try to connect is 32 bit application from Windowa XP.
Are there any limitation between x-32 and x64 connections? Is it possible?
Now I'm installing Postgre server on the Windows XP computer for tests...
Maybe, the problem is that remote server is Windows 7 with Postgre SQL 9.0 for x64.
Client that I try to connect is 32 bit application from Windowa XP.
Are there any limitation between x-32 and x64 connections? Is it possible?
Now I'm installing Postgre server on the Windows XP computer for tests...
Hi Alex,
Sorry, it's me again...
I installed Postgre SQL 32 bit on Windows XP. And created the same Server with DB as on local.
Attempt to connect follows message "Cannot connect to database no pg_hba.conf entry for host "192.168.0.150", user "xxx", database "yyy", SSL off". Server IP is 192.168.1.142..
Sorry, it's me again...
I installed Postgre SQL 32 bit on Windows XP. And created the same Server with DB as on local.
Attempt to connect follows message "Cannot connect to database no pg_hba.conf entry for host "192.168.0.150", user "xxx", database "yyy", SSL off". Server IP is 192.168.1.142..
Hello,
To check connection to the PostgreSQL server, it's better to use the standard PgAdmin utility that is available in the PostgreSQL installation. You can also download it separately from the developers' site.
As PgDAC does not use the PostgreSQL client to work with server, OS capacity and version as well as those of PostgreSQL do not have any meaning.
PgDAC working capacity was tested on most OSs and PostgreSQL servers.
To check connection to the PostgreSQL server, it's better to use the standard PgAdmin utility that is available in the PostgreSQL installation. You can also download it separately from the developers' site.
As PgDAC does not use the PostgreSQL client to work with server, OS capacity and version as well as those of PostgreSQL do not have any meaning.
PgDAC working capacity was tested on most OSs and PostgreSQL servers.
Hello,
As PgDAC does not use PostgreSQL client for connecting and works with server directly through the network TCP/IP protocol, the problem seems to be connected with the firewall settings (some ports may be closed or access from definite addresses may be forbidden, etc). Try to turn the firewall off and connect to the PostgreSQL server once more.
As PgDAC does not use PostgreSQL client for connecting and works with server directly through the network TCP/IP protocol, the problem seems to be connected with the firewall settings (some ports may be closed or access from definite addresses may be forbidden, etc). Try to turn the firewall off and connect to the PostgreSQL server once more.