#1  
Old 8th December 2011, 17:53
Spheerys Spheerys is offline
Junior Member
 
Join Date: Dec 2011
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dovecor doesn't want to start

I have a problem after following the "The Perfect Server Debian Squeeze (Debian 6.0) With BIND & Dovecot [ISPConfig 3]" documentation

But Dovecot doesn't want to start :

Code:
# /etc/init.d/dovecot restart
Restarting IMAP/POP3 mail server: dovecotIf you have trouble with authentication failures,
enable auth_debug setting. See http://wiki.dovecot.org/WhyDoesItNotWork
This message goes away after the first successful login.
.
I read the indicated page, but can't solve the problem.

When I try to send a mail from command line, I have this on the mail.err log :
Code:
Dec  7 07:37:51 osireion dovecot: auth-worker(default): mysql: Connect failed to localhost (dbispconfig): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) - waiting for 1 seconds before retry
Dec  7 07:37:51 osireion dovecot: auth-worker(default): sql(admin@spheerys.net,190.12.37.90): Password query failed: Not connected to database
What's wrong ?

Last edited by Spheerys; 8th December 2011 at 17:58.
Reply With Quote
Sponsored Links
  #2  
Old 8th December 2011, 18:16
cbj4074 cbj4074 is offline
Senior Member
 
Join Date: Nov 2010
Posts: 370
Thanks: 26
Thanked 49 Times in 44 Posts
Default

The first message is just a notice. It's not an error, and as the message says, it will go away after the first successful login. So, Dovecot is not refusing to start; it's starting just fine.

The problem is a MySQL error. More specifically, the MySQL server is refusing the connection when Dovecot attempts authentication against the database.

Have a look here:

http://stackoverflow.com/questions/1...rver-error-111

Still have questions? Let us know.
Reply With Quote
  #3  
Old 8th December 2011, 18:32
Spheerys Spheerys is offline
Junior Member
 
Join Date: Dec 2011
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the quick answer
I already have commented the lines :
Code:
#skip-networking
#bind-address = 127.0.0.1
So maybe the solution is with this tip :
Quote:
If all the previous answers didn't give any solution, you should check your user privileges.

If you could login as root to mysql then you should add this:

Code:
CREATE USER 'root'@'192.168.1.100' IDENTIFIED BY  '***';
GRANT ALL PRIVILEGES ON * . * TO  'root'@'192.168.1.100' IDENTIFIED BY  '***' WITH GRANT
But I'm not sure to understand exactly what I have to do...
Because normaly, Dovecot should be able to connect itself doesn't it ?
How can I check the dovecot mysql connection ?

Last edited by Spheerys; 8th December 2011 at 18:35.
Reply With Quote
  #4  
Old 8th December 2011, 18:49
cbj4074 cbj4074 is offline
Senior Member
 
Join Date: Nov 2010
Posts: 370
Thanks: 26
Thanked 49 Times in 44 Posts
Default

It looks like your issue was resolved here: http://www.howtoforge.com/forums/showthread.php?t=55020

Given that you both followed the same tutorial and both had the same issue, maybe the tutorial needs revision or clarification...
Reply With Quote
  #5  
Old 8th December 2011, 19:01
Spheerys Spheerys is offline
Junior Member
 
Join Date: Dec 2011
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

sorry cbj4074, but on the other thread I used irony (because the solution given by Jolman looks ironic too!!)

So my problem is still there...
Reply With Quote
  #6  
Old 8th December 2011, 23:24
cbj4074 cbj4074 is offline
Senior Member
 
Join Date: Nov 2010
Posts: 370
Thanks: 26
Thanked 49 Times in 44 Posts
Default

Oh, hahaha... I see.

Well, the file you should examine is

Code:
/etc/dovecot/dovecot-sql.conf
The credentials that Dovecot uses to connect to the ISPConfig user database are contained at the bottom of that file.

Normally, all of this is configured automatically, so it sounds like you may have missed/skipped a step or there is an error in the tutorial.

If you are having problems with Dovecot, it's possible that other services are mis-configured, too, and it may be prudent to have ISPConfig reconfigure all related services automatically (in which case ISPConfig will modify the relevant configuration files accordingly).

If everything else seems to be working as designed, and you want to tackle only the Dovecot issue, see if you're able to connect to MySQL using the credentials specified in the aforementioned file...
Reply With Quote
  #7  
Old 9th December 2011, 09:19
Spheerys Spheerys is offline
Junior Member
 
Join Date: Dec 2011
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The other components looks good (I'm running 2 website for now on it)
There is just a problem with the mail...

In dovecot-sql.conf, I have this line :
Code:
connect = host=localhost dbname=dbispconfig user=ispconfig password=cd77xxxxxxxe4bf912725b1f9xxxxxxxx
I try to connect myselft with this :
Code:
mysql -u ispconfig -pcd77xxxxxxxe4bf912725b1f9xxxxxxxx
That's work !
I try a "USE dbispconfig" and the change works too

What can I check else ?
Reply With Quote
  #8  
Old 13th December 2011, 00:53
cbj4074 cbj4074 is offline
Senior Member
 
Join Date: Nov 2010
Posts: 370
Thanks: 26
Thanked 49 Times in 44 Posts
Default

Okay, that's good. The problem is not an incorrect MySQL password.

a.) Is the MySQL server that contains the ISPConfig database running on the same server (same IP address) as Dovecot?

b.) What command, exactly, are you using to send mail from the command line when you receive the errors cited in your first post?

c.) When you attempt to send mail via a normal POP/IMAP client, what messages are logged in /var/log/mail.log?
Reply With Quote
  #9  
Old 13th December 2011, 12:27
Spheerys Spheerys is offline
Junior Member
 
Join Date: Dec 2011
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
a.) Is the MySQL server that contains the ISPConfig database running on the same server (same IP address) as Dovecot?
Yes, I just verify this point

Quote:
b.) What command, exactly, are you using to send mail from the command line when you receive the errors cited in your first post?
I use this command :
Code:
echo "Test message" | mail -s "Test subject" hedy.dargere@spheerys.fr
Just after, I have this in the mail.log :
Quote:
Dec 13 12:22:46 osireion postfix/pickup[4582]: 635364093: uid=0 from=<root>
Dec 13 12:22:46 osireion postfix/cleanup[5837]: 635364093: message-id=<20111213112246.635364093@osireion.spheerys.net >
Dec 13 12:22:46 osireion postfix/qmgr[2259]: 635364093: from=<root@osireion.spheerys.net>, size=370, nrcpt=1 (queue active)
Dec 13 12:22:46 osireion postfix/smtp[5839]: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused
Dec 13 12:22:46 osireion postfix/smtp[5839]: 635364093: to=<hedy.dargere@spheerys.fr>, relay=none, delay=0.01, delays=0.01/0/0/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
Dec 13 12:25:01 osireion dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Dec 13 12:25:01 osireion dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Dec 13 12:25:01 osireion postfix/smtpd[5901]: connect from localhost[127.0.0.1]
Dec 13 12:25:01 osireion postfix/smtpd[5901]: lost connection after CONNECT from localhost[127.0.0.1]
Dec 13 12:25:01 osireion postfix/smtpd[5901]: disconnect from localhost[127.0.0.1]
Dec 13 12:30:01 osireion dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Dec 13 12:30:01 osireion dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Dec 13 12:30:01 osireion postfix/smtpd[5981]: connect from localhost[127.0.0.1]
Dec 13 12:30:01 osireion postfix/smtpd[5981]: lost connection after CONNECT from localhost[127.0.0.1]
Dec 13 12:30:01 osireion postfix/smtpd[5981]: disconnect from localhost[127.0.0.1]
Quote:
c.) When you attempt to send mail via a normal POP/IMAP client, what messages are logged in /var/log/mail.log?
For now, I never try to attempt to send a mail via a normal pop/imap client because in my mind, the first step is to send a mail from the command line with success
On my others servers, this process works good...

Last edited by Spheerys; 13th December 2011 at 12:39.
Reply With Quote
  #10  
Old 13th December 2011, 14:24
Spheerys Spheerys is offline
Junior Member
 
Join Date: Dec 2011
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

OK I have finaly found an issue : I remove Amavis and clamavd and the mails are now working.
I don't need anti-spam and anti-virus, so for me it's OK
Thanks cbj4074for your presence
Reply With Quote
Reply

Bookmarks

Tags
dovecot

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
monitrc configuration for Debian ISPConfig 3 server Hans Tips/Tricks/Mods 2 27th March 2011 23:22
Monitoring server Ubuntu wiss Installation/Configuration 7 20th November 2010 12:56
packet loss Chad Server Operation 2 12th June 2008 14:13
Monit & Munin SamTzu HOWTO-Related Questions 1 4th May 2008 18:03
"Too many open files in system" problems Berry Installation/Configuration 3 10th November 2007 21:58


All times are GMT +2. The time now is 22:47.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.