exception UniError
Re: exception UniError
Hello,
Use DtSQL to check if can you connect to a database on computer A. It is portable tool. Install it into C:\DtSQL folder. Then define connection and check if it works at all.
When it will work check in your application if connection parameters are proper. Check user name, password, Port etc. If you are using the LoginPrompt component you must check what parameters are you set. The LoginPrompt remembers last parameters of success connection. It is possible that these parameters are send to the server from the B computer.
If you have set for example "localhost" as a server name computer this connection will not be established.
Try remove the loginPrompt component and set connection parameters directly on the connection component.
The PostgreSQL is case sensitive database, check letters in database name, user, password.
Regards
Michal
Use DtSQL to check if can you connect to a database on computer A. It is portable tool. Install it into C:\DtSQL folder. Then define connection and check if it works at all.
When it will work check in your application if connection parameters are proper. Check user name, password, Port etc. If you are using the LoginPrompt component you must check what parameters are you set. The LoginPrompt remembers last parameters of success connection. It is possible that these parameters are send to the server from the B computer.
If you have set for example "localhost" as a server name computer this connection will not be established.
Try remove the loginPrompt component and set connection parameters directly on the connection component.
The PostgreSQL is case sensitive database, check letters in database name, user, password.
Regards
Michal
Re: exception UniError
Hello,
I have tried with DtSQL. but after I test the same error occur :
"no pg_hba.conf entry for host 192.168.1.2 , user postgres database TEST sll off "
setting pg_hba.conf file
# TYPE DATABASE USER ADDRESS METHOD
@remove-line-for-nolocal@# "local" is for Unix domain socket connections only
@remove-line-for-nolocal@local all all @authmethodlocal@
# IPv4 local connections:
host all all 127.0.0.1/32 @authmethod@
host all all 192.168.1.2/32 trust
# IPv6 local connections:
host all all ::1/128 @authmethod@
setting postgresql.conf file
# - Connection Settings -
listen_addresses = '*'
# what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)
port = 5432 # (change requires restart)
#max_connections = 100 # (change requires restart)
any suggestions ? thanks a lot
I have tried with DtSQL. but after I test the same error occur :
"no pg_hba.conf entry for host 192.168.1.2 , user postgres database TEST sll off "
setting pg_hba.conf file
# TYPE DATABASE USER ADDRESS METHOD
@remove-line-for-nolocal@# "local" is for Unix domain socket connections only
@remove-line-for-nolocal@local all all @authmethodlocal@
# IPv4 local connections:
host all all 127.0.0.1/32 @authmethod@
host all all 192.168.1.2/32 trust
# IPv6 local connections:
host all all ::1/128 @authmethod@
setting postgresql.conf file
# - Connection Settings -
listen_addresses = '*'
# what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)
port = 5432 # (change requires restart)
#max_connections = 100 # (change requires restart)
any suggestions ? thanks a lot
Re: exception UniError
I have pg_hba.conf set like this and I have no problem with connections.
# TYPE DATABASE USER ADDRESS METHOD
# IPv4 local connections:
host all all 127.0.0.1/32 md5
host all all 192.168.1.0/24 md5
# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#host replication postgres 127.0.0.1/32 md5
#host replication postgres ::1/128 md5
and in postgresql.conf:
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)
port = 5432 # (change requires restart)
max_connections = 100 # (change requires restart)
Is computer B set on the virtual machine ?
Regards
Michal
# TYPE DATABASE USER ADDRESS METHOD
# IPv4 local connections:
host all all 127.0.0.1/32 md5
host all all 192.168.1.0/24 md5
# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#host replication postgres 127.0.0.1/32 md5
#host replication postgres ::1/128 md5
and in postgresql.conf:
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)
port = 5432 # (change requires restart)
max_connections = 100 # (change requires restart)
Is computer B set on the virtual machine ?
Regards
Michal
Re: exception UniError
Hello,
computer B is not virtual machine,just install windows XP...
what is that means error "user postgres database TEST sll off " ?should i on sll ? i dont understand this error.. any suggestions please.. thanks a lot
computer B is not virtual machine,just install windows XP...
what is that means error "user postgres database TEST sll off " ?should i on sll ? i dont understand this error.. any suggestions please.. thanks a lot
Re: exception UniError
Restart PostgreSQL after you change the conf files.
Have you only one installation of PostgreSQL ? Maybe you change conf files from other instance.
Reinstall PostgreSQL and try again.
Install PostgreSQL on computer B and try connect to it from computer A.
Before test UniDac Connection, you have to establish connection using other software (DtSQL, you can use Demo project from UniDac).
It looks like you set SLL connection to this PG database server.
I have no other ideas.
Regards
Michal
Have you only one installation of PostgreSQL ? Maybe you change conf files from other instance.
Reinstall PostgreSQL and try again.
Install PostgreSQL on computer B and try connect to it from computer A.
Before test UniDac Connection, you have to establish connection using other software (DtSQL, you can use Demo project from UniDac).
It looks like you set SLL connection to this PG database server.
I have no other ideas.
Regards
Michal
Re: exception UniError
Hello,
I have restarted the computer, Only install One PostgreSQL in computer A.
I install PostgresSQL at Comp C, windows XP. then at comp D without install PostgreSQL I run that application.. the same error occur?
"no pg_hba.conf entry for host 192.168.1.2 , user postgres database test sll off "
# TYPE DATABASE USER ADDRESS METHOD
# IPv4 local connections:
host all all 127.0.0.1/32 md5
host all all 192.168.1.2/32 trust
and in postgresql.conf:
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)
port = 5432 # (change requires restart)
max_connections = 100 # (change requires restart)
why this always happened ? thanks a lot
I have restarted the computer, Only install One PostgreSQL in computer A.
I install PostgresSQL at Comp C, windows XP. then at comp D without install PostgreSQL I run that application.. the same error occur?
"no pg_hba.conf entry for host 192.168.1.2 , user postgres database test sll off "
# TYPE DATABASE USER ADDRESS METHOD
# IPv4 local connections:
host all all 127.0.0.1/32 md5
host all all 192.168.1.2/32 trust
and in postgresql.conf:
listen_addresses = '*' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all
# (change requires restart)
port = 5432 # (change requires restart)
max_connections = 100 # (change requires restart)
why this always happened ? thanks a lot
Re: exception UniError
Try
host all all 127.0.0.1/32 md5
host all all 192.168.1.0/24 md5
In my opinion you have bad these lines.
Regards
Michal
host all all 127.0.0.1/32 md5
host all all 192.168.1.0/24 md5
In my opinion you have bad these lines.
Regards
Michal
Re: exception UniError
Hello,
Computer A : IP address 192.168.1.1
computer B : IP address 192.168.1.2
do you mean setting this lines ????
host all all 127.0.0.1/32 md5
host all all 192.168.1.2/24 md5
Computer A : IP address 192.168.1.1
computer B : IP address 192.168.1.2
do you mean setting this lines ????
host all all 127.0.0.1/32 md5
host all all 192.168.1.2/24 md5
Re: exception UniError
Hello,
Should I share folder "C" or "D" at computer B ?? thanks a lot
Should I share folder "C" or "D" at computer B ?? thanks a lot
Re: exception UniError
Hello,
I have set like this, and have no problem to connect to PG server:
host all all 127.0.0.1/32 md5
host all all 192.168.1.0/24 md5
These settings are proper if your network mask is
255.255.255.0
The "/24" means active 3x8 first bits, it is similar to network mask.
255=11111111
24= 11111111.11111111.11111111.00000000
8 bits 8 bits 8 bits 8 bits
You can set directly hosts IP's:
host all all 192.168.1.1 md5
host all all 192.168.1.2 md5
host all all 192.168.1.3 md5
host all all 192.168.1.4 md5
....
host all all 192.168.1.250 md5
For UniDac and PostgreSQL you needn't share any folder on the server computer. You don't need use any dlls or lib files from PostgreSQL. The UniDac connects directly into PG database.
Regards
Michal
I have set like this, and have no problem to connect to PG server:
host all all 127.0.0.1/32 md5
host all all 192.168.1.0/24 md5
These settings are proper if your network mask is
255.255.255.0
The "/24" means active 3x8 first bits, it is similar to network mask.
255=11111111
24= 11111111.11111111.11111111.00000000
8 bits 8 bits 8 bits 8 bits
You can set directly hosts IP's:
host all all 192.168.1.1 md5
host all all 192.168.1.2 md5
host all all 192.168.1.3 md5
host all all 192.168.1.4 md5
....
host all all 192.168.1.250 md5
For UniDac and PostgreSQL you needn't share any folder on the server computer. You don't need use any dlls or lib files from PostgreSQL. The UniDac connects directly into PG database.
Regards
Michal
Last edited by FCS on Thu 06 Jun 2013 12:32, edited 1 time in total.
Re: exception UniError
hi, try this on computer B:
uniconnection.close;
uniconnection.server := '192.168.1.1';
uniconnection.Port := 5432;
uniconnection.connect;
regards,
uniconnection.close;
uniconnection.server := '192.168.1.1';
uniconnection.Port := 5432;
uniconnection.connect;
regards,
Re: exception UniError
Hello
Suhaimin can't connect to the PG server at all. There isn't problem of UniDac at this moment.
Regards
Michal
Suhaimin can't connect to the PG server at all. There isn't problem of UniDac at this moment.
Regards
Michal
Re: exception UniError
yes i know. it's an authentification problem.
i just want to know if he use computer b ip (not localhost ip 127.0.0.1) he can connect to postgresql server. if he can't, we iliminate firewall problem.
regards.
i just want to know if he use computer b ip (not localhost ip 127.0.0.1) he can connect to postgresql server. if he can't, we iliminate firewall problem.
regards.
Re: exception UniError
Hello,
i have tried to sett at pg_hba.conf then restart computer.
host all all 192.168.1.2 md5
but after connect from comp B errot still occur :
"no pg_hba.conf entry for host 192.168.1.2 , user postgres database pos sll off "
i have tried use these code the same error occurs..
uniconnection.close;
uniconnection.port :=5432;
uniconnection.server :='192.168.1.1';
uniconnection.connect;
i have tried to sett at pg_hba.conf then restart computer.
host all all 192.168.1.2 md5
but after connect from comp B errot still occur :
"no pg_hba.conf entry for host 192.168.1.2 , user postgres database pos sll off "
i have tried use these code the same error occurs..
uniconnection.close;
uniconnection.port :=5432;
uniconnection.server :='192.168.1.1';
uniconnection.connect;
Re: exception UniError
Hello,
Maybe the problem is here:
Start -> Control panel -> Administrative tools -> Services
Search for "Secondary Logon Service" and run it.
PG during installation creates account for postgres user and it needs Secondary Logon Service to be active.
When you restart PG Server the settings in pg_hba.conf should be work.
If it doesn't work it means that PG doesn't see your changes.
The default folder for this configuration file is (maybe you change bad file):
C:\PostgreSQL\9.1\data\pg_hba.conf
Regards
Michal
Maybe the problem is here:
Start -> Control panel -> Administrative tools -> Services
Search for "Secondary Logon Service" and run it.
PG during installation creates account for postgres user and it needs Secondary Logon Service to be active.
When you restart PG Server the settings in pg_hba.conf should be work.
If it doesn't work it means that PG doesn't see your changes.
The default folder for this configuration file is (maybe you change bad file):
C:\PostgreSQL\9.1\data\pg_hba.conf
Regards
Michal