Timeout connecting to localhost

Some of my mailinglists have been remarkably quiet of late.  And some specific mail I’ve been expecting has … also gone quiet.

That’s the kind of thing you furrow your brow at first time, and get increasingly concerned if it persists.  Today I reached a critical point: chased down the problem and sorted it.

Background: I run an IMAP server that manages most of my mail.  It’s on the server that receives mail for my most widely-used address, and it collects mail from from other servers with a cron job running fetchmail.  One of those servers is apache’s minotaur (people.apache.org), which collects all mail addressed to my @apache.org address.  And that had stopped working.  Not just an occasional failure (that’s usual), but persistently over several days.

I had already logged in to minotaur, and with a local mailer (alpine) verified that mail was arriving for that address.  So it’s the fetchmail that was failing.  I logged into the imap server, and tried running fetchmail from the commandline.  It timed out trying to connect to minotaur.

OK, that’s a POP3 connection tunneled over ssh.  What happens if I log in to minotaur and try to connect to POP3 directly from there?

minotaur% telnet localhost pop3
Trying ::1...
telnet: connect to address ::1: Operation timed out
Connected to localhost.apache.org.

Right.  It’s trying an IPv6 connection.  But there’s none to be had, and evidently no TCP response.  So it’s timing out like a sticky firewall.  It stuck on “Trying ::1…” for a very long time – enough for fetchmail to time out.

Solution: change “localhost” to “” in my .fetchmailrc.  Now to wade through all that newly-collected mail 😦


Posted on May 5, 2009, in apache, email. Bookmark the permalink. 2 Comments.

  1. Steve Loughran

    Or remove the ::1 localhost mapping from /etc/hosts?

  2. Steve, I don’t have root access to minotaur. Do you?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: