Dovecot: Failed to connect to localhost:143

39 posts / 0 new
Last post
#1 Fri, 05/24/2013 - 12:41
zuli65

Dovecot: Failed to connect to localhost:143

Hi all, I've read several threads without being at the head. When I access to webmail (https://www.domain.com:20000) I will return this error: An error occurred listing mail in this folder : Failed to connect to localhost:143 : Connection refused Dovecot is active. Before upgrading Usermin and Virtualmin worked perfectly. I think it's the fault of packages ssl.

What do you advise me to do?

Thanks all, Lorenzo

Fri, 05/24/2013 - 14:51
andreychek

Howdy,

What output does this command produce:

netstat -an | grep :143

Fri, 05/24/2013 - 15:26
zuli65

no output...

Fri, 05/24/2013 - 16:20
andreychek

Howdy,

Okay, that means that Dovecot isn't listening on the IMAP port.

Does it help to restart Dovecot?

You can do that by running this command:

/etc/init.d/dovecot restart

Fri, 05/24/2013 - 16:30
zuli65

Output:

root@host:~# /etc/init.d/dovecot restart Restarting IMAP/POP3 mail server: dovecot. root@host:~#

And the problem doesn't change...

Fri, 05/24/2013 - 18:00
andreychek

It sounds like Dovecot may have been configured to stop listening for connections on port 143.

What is the output of "dovecot -n"?

-Eric

Fri, 05/24/2013 - 18:17
zuli65

Hi Eric,

This is output:

2.1.7: /etc/dovecot/dovecot.conf OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.0

protocols = " pop3" ssl = no protocol pop3 { pop3_uidl_format = %08Xu%08Xv }

Fri, 05/24/2013 - 19:01
miner

Hi.

Looks like you need to go to webmin dovecot and configure Networking and Protocols to include IMAP

Fri, 05/24/2013 - 19:17
zuli65

Is there any guide that explains how to configure it?

Fri, 05/24/2013 - 22:07
andreychek

Howdy,

You can do that by logging into Virtualmin, and click Webmin -> Servers -> Dovecot -> Networking and Protocols, and in that screen, make sure IMAP is included in the list of "Serve mail protocols".

-Eric

Sat, 05/25/2013 - 05:19
zuli65

Hi Eric, I've actived IMAP, but now it's give me this error:

Can't use an undefined value as a symbol reference at /usr/share/usermin/mailbox/folders-lib.pl line 1988.

Tue, 05/28/2013 - 04:10
zuli65

Can any one help me? I 've enable IMAP, but when i try to login in :2000 appears this error:

Error - Perl execution failed

Can't use an undefined value as a symbol reference at /usr/share/usermin/mailbox/folders-lib.pl line 1988.

Tue, 05/28/2013 - 12:00
andreychek

There may be a problem with the Usermin metadata.

You may want to go into that user's home directory, and rename the .usermin directory to something else... perhaps .usermin.old or so. That'll get re-created next time the user logs in, and that should resolve the issue.

-Eric

Tue, 05/28/2013 - 13:19
zuli65

I renamed it and I added a new user, but it's gives the same error and didn't create a new folder ".usermin".

Tue, 05/28/2013 - 14:14
andreychek

Just to clarify -- did you rename the .usermin folder for this particular user?

That is, you wouldn't want to rename /home/DOMAIN/.usermin, if you're logging in as "user.domain".

If you're using "user.domain" to log in, the home directory for that user is in /home/DOMAIN/homes/user. And in there, you'd see a .usermin directory.

-Eric

Wed, 05/29/2013 - 02:44
zuli65

Ok sorry, I misunderstood.

I've renamed the correctly folder now: /home/domain/homes/user/.usermin

There is nothing to do, It' always make the same mistake http://img690.imageshack.us/img690/2053/errorevz.jpg

Wed, 05/29/2013 - 19:28
JamieCameron

So I can correlate this line number with our code - what version of Usermin are you running there?

The command dpkg --list usermin will tell you.

''

Thu, 05/30/2013 - 02:57
zuli65

ii usermin 1.550 all web-based user account administra

Thu, 05/30/2013 - 14:50
JamieCameron

It looks like the IMAP login is failing in some odd way.

What gets logged to /var/log/mail.log when you try to access Usermin?

''

Sat, 06/01/2013 - 19:38
zuli65

Jun 2 02:31:04 host dovecot: auth: Fatal: No passdbs specified in configuration file. PLAIN mechanism needs one

Jun 2 02:31:04 host dovecot: master: Error: service(auth): command startup failed, throttling for 60 secs

Jun 2 02:31:04 host dovecot: imap-login: Disconnected: Auth process broken (disconnected before greeting, waited 0 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, secured, session=<EWSh9iDe1gB/AAAB>

Sun, 06/02/2013 - 20:22
JamieCameron

That message about "no passdbs specified" looks like the cause of the problem.

You may need to go to Webmin -> Servers -> Dovecot IMAP Server -> User and Login Options , and set "Password authentication source" to something valid like "Default PAM service". Then restart the Dovecot server.

''

Mon, 06/03/2013 - 03:05
zuli65

After saving it's gives me this error: Failed to save user and login options : Failed to find section auth default !

Mon, 06/03/2013 - 12:47
JamieCameron

It seems like your Dovecot config is in a strange state. You may need to un-install Dovecot, purge its config files, and then re-install.

''

Mon, 06/03/2013 - 13:06
zuli65

root@host:~# apt-get remove --purge dovecot Reading package lists... Done Building dependency tree
Reading state information... Done Package 'dovecot' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

So...

root@host:~# ps auxw | grep dovecot root 11305 0.0 0.0 21648 1072 ? Ss May25 0:00 /usr/sbin/dovecot -c /etc/dovecot/dovecot.conf dovecot 11306 0.0 0.0 13044 1040 ? S May25 0:00 dovecot/anvil root 11307 0.0 0.0 13172 1292 ? S May25 0:00 dovecot/log root 24070 0.0 0.0 7832 880 pts/0 S+ 20:05 0:00 grep dovecot

Mon, 06/03/2013 - 14:26
andreychek

There's a few Dovecot related packages... you'd want to purge any that you have installed, and then also make sure you have the IMAP related ones reinstalled once that's completed.

What is the output of this command:

dpkg -l 'dovecot*'

Mon, 06/03/2013 - 14:41
zuli65

I have to remove all these packages?

http://imm.io/18b3g

Mon, 06/03/2013 - 16:58
andreychek

Well, as Jamie mentioned, you need to completely purge Dovecot, and reinstall it, as there's something wrong with the config.

However, as seen in the image you attached, there isn't a package named "dovecot".

You don't need to reinstall all the packages in the image you attached, just the ones that are installed (packages with 'ii' in front of them are installed).

-Eric

Mon, 06/03/2013 - 17:23
zuli65

Done...

there is something wrong though ... I have not seen virtualmin http://imm.io/18bVl

Mon, 06/03/2013 - 21:58
andreychek

What output do you see if you run this command:

dpkg -l 'webmin-virtual-server*'

Tue, 06/04/2013 - 02:14
zuli65

dpkg-query: no packages found matching webmin-virtual-server*

Tue, 06/04/2013 - 07:52
andreychek

Hmm, how did you perform your Virtualmin installation? Did you use the install.sh script?

You don't seem to have the Virtualmin and Virtualmin theme packages installed on your server.

-Eric

Tue, 06/04/2013 - 08:21
zuli65

Virtualmin was installed before i just delete dovecot. I had installed Virtualmin with the install.sh script, yes.

Tue, 06/04/2013 - 09:07
andreychek

Did dpkg/apt prompt you about removing other packages, in addition to Dovecot?

If so, and those were removed too, that would explain the issue you're seeing now.

If packages other than just Dovecot were removed, those would need to be reinstalled.

You can review the dpkg log, /var/log/dpkg.log, to see what all had been removed.

-Eric

Tue, 06/04/2013 - 09:33
zuli65

Excluding dovecot:

2013-06-03 23:56:09 startup packages purge
2013-06-03 23:56:37 startup packages purge
2013-06-03 23:56:37 status installed virtualmin-base:all 1.0-29
2013-06-03 23:56:37 remove virtualmin-base:all 1.0-29 <none>
2013-06-03 23:56:37 status half-configured virtualmin-base:all 1.0-29
2013-06-03 23:56:37 status half-installed virtualmin-base:all 1.0-29
2013-06-03 23:56:37 status config-files virtualmin-base:all 1.0-29
2013-06-03 23:56:37 status config-files virtualmin-base:all 1.0-29
2013-06-03 23:56:38 status config-files virtualmin-base:all 1.0-29
2013-06-03 23:56:38 status not-installed virtualmin-base:all <none>
2013-06-03 23:56:46 trigproc man-db:amd64 2.6.2-1 <none>
2013-06-03 23:56:46 status half-configured man-db:amd64 2.6.2-1
2013-06-03 23:56:48 status installed man-db:amd64 2.6.2-1
2013-06-03 23:57:53 startup packages remove
2013-06-03 23:57:53 status installed usermin-virtual-server-theme:all 6.8
2013-06-03 23:57:53 remove usermin-virtual-server-theme:all 6.8 <none>
2013-06-03 23:57:53 status half-configured usermin-virtual-server-theme:all 6.8
2013-06-03 23:57:56 status half-installed usermin-virtual-server-theme:all 6.8
2013-06-03 23:57:56 status config-files usermin-virtual-server-theme:all 6.8
2013-06-03 23:57:56 status config-files usermin-virtual-server-theme:all 6.8
2013-06-03 23:57:57 status config-files usermin-virtual-server-theme:all 6.8
2013-06-03 23:57:57 status not-installed usermin-virtual-server-theme:all <none>
2013-06-03 23:57:57 status installed webmin-security-updates:all 4.4
2013-06-03 23:57:57 remove webmin-security-updates:all 4.4 <none>
2013-06-03 23:57:57 status half-configured webmin-security-updates:all 4.4
2013-06-03 23:57:57 status half-installed webmin-security-updates:all 4.4
2013-06-03 23:57:57 status config-files webmin-security-updates:all 4.4
2013-06-03 23:57:57 status config-files webmin-security-updates:all 4.4
2013-06-03 23:57:57 status config-files webmin-security-updates:all 4.4
2013-06-03 23:57:57 status not-installed webmin-security-updates:all <none>
2013-06-03 23:57:57 status installed webmin-virtualmin-awstats:all 4.9
2013-06-03 23:57:57 remove webmin-virtualmin-awstats:all 4.9 <none>
2013-06-03 23:57:57 status half-configured webmin-virtualmin-awstats:all 4.9
2013-06-03 23:57:58 status half-installed webmin-virtualmin-awstats:all 4.9
2013-06-03 23:57:58 status config-files webmin-virtualmin-awstats:all 4.9
2013-06-03 23:57:58 status config-files webmin-virtualmin-awstats:all 4.9
2013-06-03 23:57:58 status config-files webmin-virtualmin-awstats:all 4.9
2013-06-03 23:57:58 status not-installed webmin-virtualmin-awstats:all <none>
2013-06-03 23:57:58 status installed webmin-virtualmin-htpasswd:all 2.6
2013-06-03 23:57:58 remove webmin-virtualmin-htpasswd:all 2.6 <none>
2013-06-03 23:57:58 status half-configured webmin-virtualmin-htpasswd:all 2.6
2013-06-03 23:57:58 status half-installed webmin-virtualmin-htpasswd:all 2.6
2013-06-03 23:57:58 status config-files webmin-virtualmin-htpasswd:all 2.6
2013-06-03 23:57:58 status config-files webmin-virtualmin-htpasswd:all 2.6
2013-06-03 23:57:59 status config-files webmin-virtualmin-htpasswd:all 2.6
2013-06-03 23:57:59 status not-installed webmin-virtualmin-htpasswd:all <none>
2013-06-03 23:57:59 status installed webmin-virtualmin-dav:all 3.6
2013-06-03 23:57:59 remove webmin-virtualmin-dav:all 3.6 <none>
2013-06-03 23:57:59 status half-configured webmin-virtualmin-dav:all 3.6
2013-06-03 23:57:59 status half-installed webmin-virtualmin-dav:all 3.6
2013-06-03 23:57:59 status config-files webmin-virtualmin-dav:all 3.6
2013-06-03 23:57:59 status config-files webmin-virtualmin-dav:all 3.6
2013-06-03 23:57:59 status config-files webmin-virtualmin-dav:all 3.6
2013-06-03 23:57:59 status not-installed webmin-virtualmin-dav:all <none>
2013-06-03 23:58:00 status installed webmin-virtualmin-svn:all 5.0
2013-06-03 23:58:00 remove webmin-virtualmin-svn:all 5.0 <none>
2013-06-03 23:58:00 status half-configured webmin-virtualmin-svn:all 5.0
2013-06-03 23:58:00 status half-installed webmin-virtualmin-svn:all 5.0
2013-06-03 23:58:00 status config-files webmin-virtualmin-svn:all 5.0
2013-06-03 23:58:00 status config-files webmin-virtualmin-svn:all 5.0
2013-06-03 23:58:00 status config-files webmin-virtualmin-svn:all 5.0
2013-06-03 23:58:00 status not-installed webmin-virtualmin-svn:all <none>
2013-06-03 23:58:00 status installed webmin-virtualmin-mailman:all 6.2
2013-06-03 23:58:00 remove webmin-virtualmin-mailman:all 6.2 <none>
2013-06-03 23:58:00 status half-configured webmin-virtualmin-mailman:all 6.2
2013-06-03 23:58:00 status half-installed webmin-virtualmin-mailman:all 6.2
2013-06-03 23:58:01 status config-files webmin-virtualmin-mailman:all 6.2
2013-06-03 23:58:01 status config-files webmin-virtualmin-mailman:all 6.2
2013-06-03 23:58:01 status config-files webmin-virtualmin-mailman:all 6.2
2013-06-03 23:58:01 status not-installed webmin-virtualmin-mailman:all <none>
2013-06-03 23:58:01 status installed webmin-virtual-server:all 4.00.gpl
2013-06-03 23:58:01 remove webmin-virtual-server:all 4.00.gpl <none>
2013-06-03 23:58:01 status half-configured webmin-virtual-server:all 4.00.gpl
2013-06-03 23:58:01 status half-installed webmin-virtual-server:all 4.00.gpl
2013-06-03 23:58:01 status config-files webmin-virtual-server:all 4.00.gpl
2013-06-03 23:58:01 status config-files webmin-virtual-server:all 4.00.gpl
2013-06-03 23:58:02 status config-files webmin-virtual-server:all 4.00.gpl
2013-06-03 23:58:02 status not-installed webmin-virtual-server:all <none>
2013-06-03 23:58:02 status installed webmin-virtual-server-theme:all 8.7
2013-06-03 23:58:02 remove webmin-virtual-server-theme:all 8.7 <none>
2013-06-03 23:58:02 status half-configured webmin-virtual-server-theme:all 8.7
2013-06-03 23:58:04 status half-installed webmin-virtual-server-theme:all 8.7
2013-06-03 23:58:05 status config-files webmin-virtual-server-theme:all 8.7
2013-06-03 23:58:05 status config-files webmin-virtual-server-theme:all 8.7
2013-06-03 23:58:05 status config-files webmin-virtual-server-theme:all 8.7
2013-06-03 23:58:05 status not-installed webmin-virtual-server-theme:all <none>
2013-06-04 00:14:16 startup archives unpack
2013-06-04 00:14:16 status triggers-pending man-db:amd64 2.6.2-1
2013-06-04 00:14:20 trigproc man-db:amd64 2.6.2-1 2.6.2-1
2013-06-04 00:14:20 status half-configured man-db:amd64 2.6.2-1
2013-06-04 00:14:21 status installed man-db:amd64 2.6.2-1
2013-06-04 00:14:22 startup packages configure
Tue, 06/04/2013 - 10:12
andreychek

Okay, so it does indeed look like you removed Virtualmin and it's related plugins, and not just Dovecot :-)

It may be a matter of just reinstalling those... you can do that with this command:

apt-get install virtualmin-base usermin-virtual-server-theme webmin-security-updates webmin-virtualmin-awstats webmin-virtualmin-htpasswd webmin-virtualmin-dav webmin-virtualmin-svn webmin-virtualmin-mailman webmin-virtual-server webmin-virtual-server-theme

Tue, 06/04/2013 - 10:34
zuli65

Ok installed virtualmin but i can't see it yet

http://imm.io/18bVl

root@host:~# dpkg -l 'webmin-virtual-server*'
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                      Version                   Architecture              Description
+++-=========================================-=========================-=========================-=======================================================================================
ii  webmin-virtual-server                     4.00.gpl                  all                       Webmin module for 'Virtualmin Virtual Servers (GPL)'
ii  webmin-virtual-server-theme               8.7                       all                       Webmin theme 'Virtualmin Framed Theme'
root@host:~#
Tue, 06/04/2013 - 12:09
andreychek

It may not be configured to use the Virtualmin theme... if you go into Webmin -> Change Language and Theme, you'd want the Webmin theme to be "Virtualmin Framed Theme".

-Eric

Tue, 06/04/2013 - 18:24
zuli65

Yeah! Thanks Eric. Now I have no error in webmail :)

So.. when I try restart dovecot, it gives me this error:

root@host:~# /etc/init.d/dovecot restart
doveconf: Warning: NOTE: You can get a new clean config file with: doveconf -n > dovecot-new.conf
doveconf: Warning: Obsolete setting in /usr/share/dovecot/protocols.d/imapd.protocol:1: 'imaps' protocol is no longer necessary, remove it
doveconf: Warning: Obsolete setting in /usr/share/dovecot/protocols.d/imapd.protocol:1: 'pop3s' protocol is no longer necessary, remove it
Restarting IMAP/POP3 mail server: dovecotdoveconf: Warning: NOTE: You can get a new clean config file with: doveconf -n > dovecot-new.conf
doveconf: Warning: Obsolete setting in /usr/share/dovecot/protocols.d/imapd.protocol:1: 'imaps' protocol is no longer necessary, remove it
doveconf: Warning: Obsolete setting in /usr/share/dovecot/protocols.d/imapd.protocol:1: 'pop3s' protocol is no longer necessary, remove it
Tue, 06/04/2013 - 22:01
andreychek

Howdy,

Those are just warning messages, and are safe to ignore.

Alternatively, if you don't want to see them, you can remove the obsolete setting that they refer to in the Dovecot config.

-Eric

Topic locked