Dovecot-common Install Error

Bug #611226 reported by Ian Barton on 2010-07-29
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
dovecot (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: dovecot-common

I am trying to install dovecot-imapd on a computer runming the following kernel: 2.6.32-305-ec2. I get the following errors:

root@xenmail:~# dpkg --configure dovecot-common
Setting up dovecot-common (1:1.2.9-1ubuntu6.1) ...
Creating generic self-signed certificate: /etc/ssl/certs/dovecot.pem
(replace with hand-crafted or authorized one if needed).
hostname: Name or service not known
dpkg: error processing dovecot-common (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 dovecot-common

I have xenmail.wilkesley.net in /etc/hosts. It looks as though the postinst script is failing somehow.

Running dpkg --reconfigure dovecot-common gives the same error.

After a bit of googling I found that I can install without errors if I first add the Dovecot security certificates to /etc/ssl/certs and /etc/private/ssl manually.

Ian.

Antonis Kanouras (akanouras) wrote :

Hello Ian!

The revealing message here is "hostname: Name or service not known" which means there is a DNS issue on your system.
"hostname -i" and "hostname -d" should get you going on debugging this. Also take a look at /etc/nsswitch.conf.

Of course the package installation shouldn't have barfed that badly, but you'll be running into trouble all the time if your mail server has DNS issues.

Cheers,
Antonio

Ian Barton (ian-manor-farm) wrote :

Antonio,

It is a DNS error. Let me explain what I have done. I am using a pre-built xen image from http://stacklet.com/

Download stacklet for Ubuntu lucid X64. Create a xen instance using the image and login:

root@ubuntu:~# hostname
ubuntu
root@ubuntu:~# hostname -f
ubuntu.bantercat.co.uk

OK so that works as expected.

Now do a apt-get update and apt-get dist-upgrade, which installs a new EC2 kernel.

root@ubuntu:~# hostname
ubuntu
root@ubuntu:~# hostname -f
hostname: Name or service not known
root@ubuntu:~#

In /etc/hostname I have just ubuntu. This happens using either DHCP, or a static IP. I am running bind9 on one of my servers and I am pretty confident that my DNS is OK. Note that hostname -f works fine on all other computers in my network.

So it looks as though it's something to do with the kernel which is:

root@ubuntu:~# uname -r
2.6.32-305-ec2

Ian.

Antonis Kanouras (akanouras) wrote :

This is evolving to a subject better discussed at the forums by the way, as this seems to be a misconfiguration in the "stacklet".

The hostname is kept by the kernel in /proc/sys/kernel/hostname. In your case, it is "ubuntu".

What hostname -f does, is the equivalent of running

getent hosts `hostname` | awk '{print $2}'

on the command line. If that command doesn't work, "hostname -f" won't work either.

Please attach your /etc/resolv.conf, /etc/nsswitch.conf and /etc/hosts so I can see what's wrong with the NSS resolver on your system.

Cheers,
Antonio

Ian Barton (ian-manor-farm) wrote :

Antonio,

Thanks for the feedback. Attached is the information you requested. The computer has a static ip address of 192.168.0.30. It has bind9 installed, which is configured the same as my primary DNS server, which it will eventually replace. The computer 192.168.0.32 is my secondary DNS. As far as I can tell bind is working correctly.

Ian.

resolv.conf:
nameserver 192.168.0.30
nameserver 192.168.0.32
domain bantercat.co.uk
search bantercat.co.uk

/etc/hosts:

127.0.0.1 mail.wilkesley.net
192.168.0.30 mail.wilkesley.net firewall.bantercat.co.uk

::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

/etc/nsswitch.conf:
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd: compat
group: compat
shadow: compat

hosts: files dns
networks: files

protocols: db files
services: db files
ethers: db files
rpc: db files

netgroup: nis

On 31.07.2010 14:29, Ian Barton wrote:

> 127.0.0.1 mail.wilkesley.net
> 192.168.0.30 mail.wilkesley.net firewall.bantercat.co.uk

This is terribly wrong. Should be:

127.0.0.1 localhost.localdomain localhost
192.168.0.30 mail.wilkesley.net firewall.bantercat.co.uk

Mathias Gug (mathiaz) wrote :

Thank you for taking the time to report this issue and helping to make Ubuntu better. Examining the information you have given us, this does not appear to be a bug report so we are closing it and converting it to a question in the support tracker. We appreciate the difficulties you are facing, but it would make more sense to raise problems you are having in the support tracker at https://answers.launchpad.net/ubuntu if you are uncertain if they are bugs. For help on reporting bugs, see https://help.ubuntu.com/community/ReportingBugs .

Changed in dovecot (Ubuntu):
importance: Undecided → Low
status: New → Won't Fix
Bill Mills (wmills) wrote :

I also had this issue. I saw a good number of questions but no answers so I am linking to my resolution in the forum.

http://newyork.ubuntuforums.org/showthread.php?p=9839614#post9839614

It may not be a bug but hostname -f is definitely picker in 10.04 than it was in 9.10. I duplicated the same config in both (via a script using the official cononical EC2 AMIs for each) and the simple setup works in 9.10 and not in 10.04. editing /etc/hosts and /etc/dhcp3/dhclient.conf gets me to a working solution in 10.04.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers