[Dovecot] Connection to PGSQL fails?

2013-03-16 Thread Bjørn T Johansen
I have configured a new server and copied the dovecot-sql.conf file that works 
a different server to the new server... But when Dovecot tries to connect to 
the database, the
following error appears..:

Mar 16 22:28:25 smtp dovecot: auth: Debug: Loading modules from directory: 
/usr/lib64/dovecot/auth
Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
/usr/lib64/dovecot/auth/libauthdb_ldap.so
Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
/usr/lib64/dovecot/auth/libdriver_pgsql.so
Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
/usr/lib64/dovecot/auth/libdriver_sqlite.so
Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
/usr/lib64/dovecot/auth/libmech_gssapi.so
Mar 16 22:28:25 smtp dovecot: auth: Error: pgsql: Connect failed to 
serviceadmin: could not connect to server: Permission denied
Mar 16 22:28:25 smtp dovecot: auth: Error: #011Is the server running on host 
10.50.150.35 and accepting
Mar 16 22:28:25 smtp dovecot: auth: Error: #011TCP/IP connections on port 5432?
Mar 16 22:28:25 smtp dovecot: auth: Debug: auth client connected (pid=1768)

But if I use psql and connects to the same db server with the same username and 
password, I can successfully connect...

What am I missing?


Regards,

BTJ 

-- 
---
Bjørn T Johansen

b...@havleik.no
---
Someone wrote:
I understand that if you play a Windows CD backwards you hear strange Satanic 
messages
To which someone replied:
It's even worse than that; play it forwards and it installs Windows
---


Re: [Dovecot] Connection to PGSQL fails?

2013-03-16 Thread Reindl Harald


Am 16.03.2013 22:36, schrieb Bjørn T Johansen:
 I have configured a new server and copied the dovecot-sql.conf file that 
 works a different server to the new server... But when Dovecot tries to 
 connect to the database, the
 following error appears..:
 
 Mar 16 22:28:25 smtp dovecot: auth: Debug: Loading modules from directory: 
 /usr/lib64/dovecot/auth
 Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
 /usr/lib64/dovecot/auth/libauthdb_ldap.so
 Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
 /usr/lib64/dovecot/auth/libdriver_pgsql.so
 Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
 /usr/lib64/dovecot/auth/libdriver_sqlite.so
 Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
 /usr/lib64/dovecot/auth/libmech_gssapi.so
 Mar 16 22:28:25 smtp dovecot: auth: Error: pgsql: Connect failed to 
 serviceadmin: could not connect to server: Permission denied
 Mar 16 22:28:25 smtp dovecot: auth: Error: #011Is the server running on host 
 10.50.150.35 and accepting
 Mar 16 22:28:25 smtp dovecot: auth: Error: #011TCP/IP connections on port 
 5432?
 Mar 16 22:28:25 smtp dovecot: auth: Debug: auth client connected (pid=1768)
 
 But if I use psql and connects to the same db server with the same username 
 and password, I can successfully connect...
 What am I missing?

most likely the difference between TCP and socket-connection



signature.asc
Description: OpenPGP digital signature


Re: [Dovecot] Connection to PGSQL fails?

2013-03-16 Thread Patrick Westenberg

Bjørn T Johansen schrieb:

I have configured a new server and copied the dovecot-sql.conf file that works 
a different server to the new server... But when Dovecot tries to connect to 
the database, the
following error appears..:
Mar 16 22:28:25 smtp dovecot: auth: Error: pgsql: Connect failed to 
serviceadmin: could not connect to server: Permission denied
Mar 16 22:28:25 smtp dovecot: auth: Error: #011Is the server running on host 
10.50.150.35 and accepting
Mar 16 22:28:25 smtp dovecot: auth: Error: #011TCP/IP connections on port 5432?
Mar 16 22:28:25 smtp dovecot: auth: Debug: auth client connected (pid=1768)

But if I use psql and connects to the same db server with the same username and 
password, I can successfully connect...


Is your dovecot server allowed to connect to your db server (pg_hba.conf)?

Patrick


Re: [Dovecot] Connection to PGSQL fails?

2013-03-16 Thread Bjørn T Johansen
On Sat, 16 Mar 2013 22:38:20 +0100
Reindl Harald h.rei...@thelounge.net wrote:

 
 
 Am 16.03.2013 22:36, schrieb Bjørn T Johansen:
  I have configured a new server and copied the dovecot-sql.conf file that 
  works a different server to the new server... But when Dovecot tries to 
  connect to the database, the
  following error appears..:
  
  Mar 16 22:28:25 smtp dovecot: auth: Debug: Loading modules from directory: 
  /usr/lib64/dovecot/auth
  Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
  /usr/lib64/dovecot/auth/libauthdb_ldap.so
  Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
  /usr/lib64/dovecot/auth/libdriver_pgsql.so
  Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
  /usr/lib64/dovecot/auth/libdriver_sqlite.so
  Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
  /usr/lib64/dovecot/auth/libmech_gssapi.so
  Mar 16 22:28:25 smtp dovecot: auth: Error: pgsql: Connect failed to 
  serviceadmin: could not connect to server: Permission denied
  Mar 16 22:28:25 smtp dovecot: auth: Error: #011Is the server running on 
  host 10.50.150.35 and accepting
  Mar 16 22:28:25 smtp dovecot: auth: Error: #011TCP/IP connections on port 
  5432?
  Mar 16 22:28:25 smtp dovecot: auth: Debug: auth client connected (pid=1768)
  
  But if I use psql and connects to the same db server with the same username 
  and password, I can successfully connect...
  What am I missing?
 
 most likely the difference between TCP and socket-connection
 

Using tcp for both dovecot and my test with psql...

BTJ


Re: [Dovecot] Connection to PGSQL fails?

2013-03-16 Thread Bjørn T Johansen
On Sat, 16 Mar 2013 22:39:49 +0100
Patrick Westenberg p...@wk-serv.de wrote:

 Bjørn T Johansen schrieb:
  I have configured a new server and copied the dovecot-sql.conf file that 
  works a different server to the new server... But when Dovecot tries to 
  connect to the database, the
  following error appears..:
  Mar 16 22:28:25 smtp dovecot: auth: Error: pgsql: Connect failed to 
  serviceadmin: could not connect to server: Permission denied
  Mar 16 22:28:25 smtp dovecot: auth: Error: #011Is the server running on 
  host 10.50.150.35 and accepting
  Mar 16 22:28:25 smtp dovecot: auth: Error: #011TCP/IP connections on port 
  5432?
  Mar 16 22:28:25 smtp dovecot: auth: Debug: auth client connected (pid=1768)
 
  But if I use psql and connects to the same db server with the same username 
  and password, I can successfully connect...
 
 Is your dovecot server allowed to connect to your db server (pg_hba.conf)?
 
 Patrick

Yes, as I said, it is working when using psql from my dovecot server...

BTJ


Re: [Dovecot] Connection to PGSQL fails?

2013-03-16 Thread Reindl Harald


Am 16.03.2013 22:50, schrieb Bjørn T Johansen:
 On Sat, 16 Mar 2013 22:38:20 +0100
 Reindl Harald h.rei...@thelounge.net wrote:
 
 Am 16.03.2013 22:36, schrieb Bjørn T Johansen:
 I have configured a new server and copied the dovecot-sql.conf file that 
 works a different server to the new server... But when Dovecot tries to 
 connect to the database, the
 following error appears..:

 Mar 16 22:28:25 smtp dovecot: auth: Debug: Loading modules from directory: 
 /usr/lib64/dovecot/auth
 Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
 /usr/lib64/dovecot/auth/libauthdb_ldap.so
 Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
 /usr/lib64/dovecot/auth/libdriver_pgsql.so
 Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
 /usr/lib64/dovecot/auth/libdriver_sqlite.so
 Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
 /usr/lib64/dovecot/auth/libmech_gssapi.so
 Mar 16 22:28:25 smtp dovecot: auth: Error: pgsql: Connect failed to 
 serviceadmin: could not connect to server: Permission denied
 Mar 16 22:28:25 smtp dovecot: auth: Error: #011Is the server running on 
 host 10.50.150.35 and accepting
 Mar 16 22:28:25 smtp dovecot: auth: Error: #011TCP/IP connections on port 
 5432?
 Mar 16 22:28:25 smtp dovecot: auth: Debug: auth client connected (pid=1768)

 But if I use psql and connects to the same db server with the same username 
 and password, I can successfully connect...
 What am I missing?

 most likely the difference between TCP and socket-connection
 
 Using tcp for both dovecot and my test with psql...

i do not believe it..

but however, if you do not post config informations and at teast the
exact command of psql i doubt someone can help you

most people do not realize that localhost is implicitly a unix-connection
and not the same as 127.0.0.1 as example



signature.asc
Description: OpenPGP digital signature


Re: [Dovecot] Connection to PGSQL fails?

2013-03-16 Thread Bjørn T Johansen
On Sat, 16 Mar 2013 23:00:07 +0100
Reindl Harald h.rei...@thelounge.net wrote:

 
 
 Am 16.03.2013 22:50, schrieb Bjørn T Johansen:
  On Sat, 16 Mar 2013 22:38:20 +0100
  Reindl Harald h.rei...@thelounge.net wrote:
  
  Am 16.03.2013 22:36, schrieb Bjørn T Johansen:
  I have configured a new server and copied the dovecot-sql.conf file that 
  works a different server to the new server... But when Dovecot tries to 
  connect to the database, the
  following error appears..:
 
  Mar 16 22:28:25 smtp dovecot: auth: Debug: Loading modules from 
  directory: /usr/lib64/dovecot/auth
  Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
  /usr/lib64/dovecot/auth/libauthdb_ldap.so
  Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
  /usr/lib64/dovecot/auth/libdriver_pgsql.so
  Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
  /usr/lib64/dovecot/auth/libdriver_sqlite.so
  Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
  /usr/lib64/dovecot/auth/libmech_gssapi.so
  Mar 16 22:28:25 smtp dovecot: auth: Error: pgsql: Connect failed to 
  serviceadmin: could not connect to server: Permission denied
  Mar 16 22:28:25 smtp dovecot: auth: Error: #011Is the server running on 
  host 10.50.150.35 and accepting
  Mar 16 22:28:25 smtp dovecot: auth: Error: #011TCP/IP connections on port 
  5432?
  Mar 16 22:28:25 smtp dovecot: auth: Debug: auth client connected 
  (pid=1768)
 
  But if I use psql and connects to the same db server with the same 
  username and password, I can successfully connect...
  What am I missing?
 
  most likely the difference between TCP and socket-connection
  
  Using tcp for both dovecot and my test with psql...
 
 i do not believe it..
 
 but however, if you do not post config informations and at teast the
 exact command of psql i doubt someone can help you
 
 most people do not realize that localhost is implicitly a unix-connection
 and not the same as 127.0.0.1 as example
 

Hmmm... Well, I am not most people... :P ;)

psql -h 10.50.150.35 -U serviceadmin -d serviceadmin
Password for user serviceadmin: 
psql (9.1.8, server 9.1.6)
Type help for help.


And my connection string for dovecot, looks like this:

connect = host=10.50.150.35 dbname=serviceadmin user=serviceadmin 
password=xx


And can not see any difference?


BTJ


Re: [Dovecot] Connection to PGSQL fails?

2013-03-16 Thread Bjørn T Johansen
On Sat, 16 Mar 2013 23:22:22 +0100
Bjørn T Johansen b...@havleik.no wrote:

 On Sat, 16 Mar 2013 23:00:07 +0100
 Reindl Harald h.rei...@thelounge.net wrote:
 
  
  
  Am 16.03.2013 22:50, schrieb Bjørn T Johansen:
   On Sat, 16 Mar 2013 22:38:20 +0100
   Reindl Harald h.rei...@thelounge.net wrote:
   
   Am 16.03.2013 22:36, schrieb Bjørn T Johansen:
   I have configured a new server and copied the dovecot-sql.conf file 
   that works a different server to the new server... But when Dovecot 
   tries to connect to the database, the
   following error appears..:
  
   Mar 16 22:28:25 smtp dovecot: auth: Debug: Loading modules from 
   directory: /usr/lib64/dovecot/auth
   Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
   /usr/lib64/dovecot/auth/libauthdb_ldap.so
   Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
   /usr/lib64/dovecot/auth/libdriver_pgsql.so
   Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
   /usr/lib64/dovecot/auth/libdriver_sqlite.so
   Mar 16 22:28:25 smtp dovecot: auth: Debug: Module loaded: 
   /usr/lib64/dovecot/auth/libmech_gssapi.so
   Mar 16 22:28:25 smtp dovecot: auth: Error: pgsql: Connect failed to 
   serviceadmin: could not connect to server: Permission denied
   Mar 16 22:28:25 smtp dovecot: auth: Error: #011Is the server running on 
   host 10.50.150.35 and accepting
   Mar 16 22:28:25 smtp dovecot: auth: Error: #011TCP/IP connections on 
   port 5432?
   Mar 16 22:28:25 smtp dovecot: auth: Debug: auth client connected 
   (pid=1768)
  
   But if I use psql and connects to the same db server with the same 
   username and password, I can successfully connect...
   What am I missing?
  
   most likely the difference between TCP and socket-connection
   
   Using tcp for both dovecot and my test with psql...
  
  i do not believe it..
  
  but however, if you do not post config informations and at teast the
  exact command of psql i doubt someone can help you
  
  most people do not realize that localhost is implicitly a unix-connection
  and not the same as 127.0.0.1 as example
  
 
 Hmmm... Well, I am not most people... :P ;)
 
 psql -h 10.50.150.35 -U serviceadmin -d serviceadmin
 Password for user serviceadmin: 
 psql (9.1.8, server 9.1.6)
 Type help for help.
 
 
 And my connection string for dovecot, looks like this:
 
 connect = host=10.50.150.35 dbname=serviceadmin user=serviceadmin 
 password=xx
 
 
 And can not see any difference?
 
 
 BTJ

OK, found the guilty one... Just discovered than someone had enabled SELinux 
and it of course stopped the suspicous traffic from dovecot :-S

BTJ